cgl.narada.wsinfra.deployment.impl
Class SOAPServletContainerImpl

java.lang.Object
  extended by cgl.narada.wsinfra.deployment.SOAPServletContainer
      extended by cgl.narada.wsinfra.deployment.impl.SOAPServletContainerImpl

public class SOAPServletContainerImpl
extends SOAPServletContainer

This container will be used to register SOAP Based roles. It is expected that in some cases there may be a servlet associated per role. Typically, this need not be the case. Upon the receipt of a SOAP message, a special class will parse the SOAP message to determine all the targeted roles. Depending on the roles, appropriate filter pipelines will be deployed to ensure complete processing of a SOAP message. In some cases, a set of default roles may be associated with a given SOAP message. This may include processing related to logging every SOAP message etc.


Method Summary
 void deregisterServlet(String servletName)
          This method deregisters a servlet.
 void deregisterServletForRole(String servletName, String role)
          This method de-registers a servlet associated witha a specific role.
static SOAPServletContainer getInstance()
           
 ServletConfig getServletConfigForRole(String role)
          Retrieve the ServletContext associated with a specific role.
 void initializeServices(int portNum)
          Starts up the HTTP Servlet container at this port number.
 boolean isServletRegisteredForRole(String servletName, String role)
          Checks to see if a servlet has been registered for the specified role.
 void processSOAPMessage(SOAPMessage soapMessage, String servletName)
          Method used by servlets to notify about SOAP messages received over the network.
 void registerServlet(String servletName, String servletPath, String servletClass)
          This method registers a servlet.
 void registerServletForRole(String role, String servletName, String servletPath, String servletClass)
          This method registers a servlet associated with a specific role.
 void startServices()
          Start Services
 void stopServices()
          Stop Services
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static SOAPServletContainer getInstance()

initializeServices

public void initializeServices(int portNum)
                        throws DeploymentException
Starts up the HTTP Servlet container at this port number. This method throws an exception

Specified by:
initializeServices in class SOAPServletContainer
Throws:
DeploymentException

startServices

public void startServices()
                   throws DeploymentException
Start Services

Specified by:
startServices in class SOAPServletContainer
Throws:
DeploymentException

stopServices

public void stopServices()
                  throws DeploymentException
Stop Services

Specified by:
stopServices in class SOAPServletContainer
Throws:
DeploymentException

registerServlet

public void registerServlet(String servletName,
                            String servletPath,
                            String servletClass)
                     throws DeploymentException
This method registers a servlet. The servlet is not associated with a specific role.

Specified by:
registerServlet in class SOAPServletContainer
Throws:
DeploymentException

deregisterServlet

public void deregisterServlet(String servletName)
                       throws DeploymentException
This method deregisters a servlet. The servlet is not associated with a specific role.

Specified by:
deregisterServlet in class SOAPServletContainer
Throws:
DeploymentException

registerServletForRole

public void registerServletForRole(String role,
                                   String servletName,
                                   String servletPath,
                                   String servletClass)
                            throws DeploymentException
This method registers a servlet associated with a specific role. This method throws an exception if another servlet has been previously registered for this role or if there are problems deploying this servlet.

Specified by:
registerServletForRole in class SOAPServletContainer
Throws:
DeploymentException

deregisterServletForRole

public void deregisterServletForRole(String servletName,
                                     String role)
                              throws DeploymentException
This method de-registers a servlet associated witha a specific role. This method throws an exception if there are no servlets registered for this role.

Specified by:
deregisterServletForRole in class SOAPServletContainer
Throws:
DeploymentException

isServletRegisteredForRole

public boolean isServletRegisteredForRole(String servletName,
                                          String role)
                                   throws DeploymentException
Checks to see if a servlet has been registered for the specified role.

Specified by:
isServletRegisteredForRole in class SOAPServletContainer
Throws:
DeploymentException

getServletConfigForRole

public ServletConfig getServletConfigForRole(String role)
                                      throws DeploymentException
Retrieve the ServletContext associated with a specific role.

Specified by:
getServletConfigForRole in class SOAPServletContainer
Throws:
DeploymentException

processSOAPMessage

public void processSOAPMessage(SOAPMessage soapMessage,
                               String servletName)
                        throws DeploymentException
Method used by servlets to notify about SOAP messages received over the network.

Specified by:
processSOAPMessage in class SOAPServletContainer
Throws:
DeploymentException


For comments and suggestions please send e-mail to The NaradaBrokering Project