net.sf.crispy.server
Interface SingleServiceContainer

All Known Implementing Classes:
HttpServlet, RmiInvocationHandlerImpl, SingleServiceContainerImpl, XmlRpcHttpServlet

public interface SingleServiceContainer

Container for the service implementation. This is a mapping from service-interface to the service-implementation. The service instance exist once. They must be Thread safe.

Since:
1.1.0
Author:
Linke

Method Summary
 void addService(java.lang.String pvServiceInterfaceName, java.lang.Object pvServiceImpl)
          Add service implementation.
 void addService(java.lang.String pvServiceInterfaceName, java.lang.String pvServiceImplName)
          Create a instance from the service impl class name.
 java.lang.Object getService(java.lang.String pvServiceInterfaceName)
          Find the service impl.
 int getServiceSize()
          Size of services in the container.
 void removeService(java.lang.String pvServiceInterfaceName)
          Remove the service from the container.
 

Method Detail

addService

public void addService(java.lang.String pvServiceInterfaceName,
                       java.lang.Object pvServiceImpl)
Add service implementation.

Parameters:
pvServiceInterfaceName - Is the key in a map.
pvServiceImpl - Is the value in a map.

addService

public void addService(java.lang.String pvServiceInterfaceName,
                       java.lang.String pvServiceImplName)
Create a instance from the service impl class name.

Parameters:
pvServiceInterfaceName - Is the key in a map.
pvServiceImplName - Is the class name from the service impl.

removeService

public void removeService(java.lang.String pvServiceInterfaceName)
Remove the service from the container.

Parameters:
pvServiceInterfaceName - Is the key in a map.

getService

public java.lang.Object getService(java.lang.String pvServiceInterfaceName)
Find the service impl.

Parameters:
pvServiceInterfaceName - Is the key in a map.
Returns:
The service impl or null.

getServiceSize

public int getServiceSize()
Size of services in the container.

Returns:
Size of services.


Copyright © 2005-2006 Crispy. All Rights Reserved.