org.apache.soap.server
Class BaseConfigManager

java.lang.Object
  |
  +--org.apache.soap.server.BaseConfigManager
Direct Known Subclasses:
DefaultConfigManager, XMLConfigManager

public abstract class BaseConfigManager
extends java.lang.Object
implements ConfigManager

An XMLConfigManager ...

Author:
Dug (dug@us.ibm.com), Magnus Thor Torfason This class should be almost identical in function to the DefaultConfigManager.

The only notable difference is that while the DefaultConfigManager uses java readObject() and writeObject() methods, this class uses the XML routines of DeploymentDescriptor to save and load the DeploymentDescriptors from the underlying registry file (typically DeployedServices.xml).


Field Summary
protected  javax.servlet.ServletContext context
           
protected  java.util.Hashtable dds
           
protected  java.lang.String[] serviceNamesCache
           
 
Constructor Summary
BaseConfigManager()
           
 
Method Summary
 void deploy(DeploymentDescriptor dd)
          Used to deploy a service using a specified DeploymentDescriptor.
 void init()
          The init method loads any services that are defined in the underlying registry file.
 java.lang.String[] list()
          Returns a list of all currently deployed services.
abstract  void loadRegistry()
          The loadRegistry() method must be implemented in non-abstract subclasses of BaseConfigManager.
 DeploymentDescriptor query(java.lang.String id)
          Returns a DeploymentDescriptor from the ConfigManager.
abstract  void saveRegistry()
          The saveRegistry() method must be implemented in non-abstract subclasses of BaseConfigManager.
 void setContext(javax.servlet.ServletContext context)
          Sets the Servlet Context.
 DeploymentDescriptor undeploy(java.lang.String id)
          Undeploy previously deployed services.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

dds

protected java.util.Hashtable dds

serviceNamesCache

protected java.lang.String[] serviceNamesCache

context

protected javax.servlet.ServletContext context
Constructor Detail

BaseConfigManager

public BaseConfigManager()
Method Detail

setContext

public void setContext(javax.servlet.ServletContext context)
Sets the Servlet Context.
Specified by:
setContext in interface ConfigManager

init

public void init()
          throws SOAPException
The init method loads any services that are defined in the underlying registry file.
Specified by:
init in interface ConfigManager

deploy

public void deploy(DeploymentDescriptor dd)
            throws SOAPException
Used to deploy a service using a specified DeploymentDescriptor.

Note that this method will save the currently deployed services to the underlying registry file, overriding the old configuration.

Specified by:
deploy in interface ConfigManager

undeploy

public DeploymentDescriptor undeploy(java.lang.String id)
                              throws SOAPException
Undeploy previously deployed services.

Note that this method will save the currently deployed services to the underlying registry file, overriding the old configuration.

Specified by:
undeploy in interface ConfigManager

list

public java.lang.String[] list()
                        throws SOAPException
Returns a list of all currently deployed services.
Specified by:
list in interface ConfigManager

query

public DeploymentDescriptor query(java.lang.String id)
                           throws SOAPException
Returns a DeploymentDescriptor from the ConfigManager.

This method will simply return null if there is no descriptor corresponding to the id (should it throw a SOAPException ?).

Specified by:
query in interface ConfigManager

loadRegistry

public abstract void loadRegistry()
                           throws SOAPException
The loadRegistry() method must be implemented in non-abstract subclasses of BaseConfigManager.

saveRegistry

public abstract void saveRegistry()
                           throws SOAPException
The saveRegistry() method must be implemented in non-abstract subclasses of BaseConfigManager.


Copyright © 2001 Apache XML Project. All Rights Reserved.