net.sf.crispy.server
Class SingleServiceContainerImpl

java.lang.Object
  extended bynet.sf.crispy.server.SingleServiceContainerImpl
All Implemented Interfaces:
SingleServiceContainer

public class SingleServiceContainerImpl
extends java.lang.Object
implements 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

Constructor Summary
SingleServiceContainerImpl()
           
 
Method Summary
 void addService(java.lang.String pvServiceInterfaceName, java.lang.Object pvServiceImpl)
          see net.sf.crispy.server.SingleServiceContainer#addService(java.lang.String, java.lang.Object)
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SingleServiceContainerImpl

public SingleServiceContainerImpl()
Method Detail

addService

public void addService(java.lang.String pvServiceInterfaceName,
                       java.lang.Object pvServiceImpl)
see net.sf.crispy.server.SingleServiceContainer#addService(java.lang.String, java.lang.Object)

Specified by:
addService in interface SingleServiceContainer
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)
Description copied from interface: SingleServiceContainer
Create a instance from the service impl class name.

Specified by:
addService in interface SingleServiceContainer
Parameters:
pvServiceInterfaceName - Is the key in a map.
pvServiceImplName - Is the class name from the service impl.
See Also:
SingleServiceContainer.addService(java.lang.String, java.lang.String)

removeService

public void removeService(java.lang.String pvServiceInterfaceName)
Description copied from interface: SingleServiceContainer
Remove the service from the container.

Specified by:
removeService in interface SingleServiceContainer
Parameters:
pvServiceInterfaceName - Is the key in a map.
See Also:
SingleServiceContainer.removeService(java.lang.String)

getService

public java.lang.Object getService(java.lang.String pvServiceInterfaceName)
Description copied from interface: SingleServiceContainer
Find the service impl.

Specified by:
getService in interface SingleServiceContainer
Parameters:
pvServiceInterfaceName - Is the key in a map.
Returns:
The service impl or null.
See Also:
SingleServiceContainer.getService(java.lang.String)

getServiceSize

public int getServiceSize()
Description copied from interface: SingleServiceContainer
Size of services in the container.

Specified by:
getServiceSize in interface SingleServiceContainer
Returns:
Size of services.
See Also:
SingleServiceContainer.getServiceSize()


Copyright © 2005-2006 Crispy. All Rights Reserved.