ist.palcom.service.manager
Class ServiceManager

java.lang.Object
  extended by ist.palcom.services.AbstractService
      extended by ist.palcom.service.manager.ServiceManager
All Implemented Interfaces:
Service, IHgraphNode, CommandEventListener, ServiceManagerConstants

public class ServiceManager
extends AbstractService
implements CommandEventListener, ServiceManagerConstants


Field Summary
static java.lang.String COMMAND_LIST_SERVICES
           
static java.lang.String COMMAND_LOAD
           
static java.lang.String COMMAND_REGISTER
           
static java.lang.String COMMAND_SERVICES
           
static java.lang.String COMMAND_UNLOAD_ALL
           
 
Fields inherited from class ist.palcom.services.AbstractService
_node, connectionsMonitor, context, info, siid
 
Fields inherited from interface ist.palcom.services.ServiceManagerConstants
SERVICE_NAME, URN_SUFFIX
 
Fields inherited from interface ist.palcom.hgraph.IHgraphNode
CHILD_NAME_CLASH, CIRCULARITY_CLASH, COMMAND_OR_NODE_MISSING, ERROR, HANDLER_MISSING, INVOKATOR_MISSING, LISTENER_MISSING, NODE_NOT_CHILD, PATH_MISSING, SIBLING_ALREADY_EXISTS, SIBLING_NONEXISTENT, SIBLING_REFERENCE_ALREADY_EXISTS, SIBLING_REFERENCE_NONEXISTENT, STATUS_OK, VALUE_ALREADY_EXISTS, VALUE_NOT_PRESENT
 
Constructor Summary
ServiceManager(DeviceContext context, java.lang.String serviceName, java.lang.String root)
           
 
Method Summary
 void commandReceived(CommandEvent e)
           
protected  SelfTestProvider getSelfTestService(java.lang.String urn)
           
 ServiceID getServiceID()
           
 ServiceInstanceID getUnboundServiceSIID(java.lang.String className, java.lang.String versionString)
           
static boolean isSameService(ServiceID sid)
           
 void loadUnboundService(ServiceInstanceID siid)
           
protected  void loadUnboundService(ServiceInstanceID siid, UnboundService service)
           
protected  UnboundService lookupAndCreateUnboundService(ServiceInstanceID siid)
           
 ServiceInstanceID registerUnboundService(java.lang.String className, java.lang.String versionString)
           
 void removeAllServices()
           
 void serviceUnloaded(UnboundService service)
           
 void stop()
           
 void unloadService(ServiceInstanceID siid)
           
 void unloadService(UnboundService c)
           
 ServiceInstanceID unRegisterUnboundService(java.lang.String className, java.lang.String versionString)
           
 
Methods inherited from class ist.palcom.services.AbstractService
addNodeChild, addServiceProxyListener, connectionClosed, connectionCreated, connectTo, disconnectFrom, getChildIterator, getConnections, getFuncFunc, getNodeName, getNodeParent, getPath, getRemoteServiceProxy, getSelector, getServiceInfo, getServiceInstanceID, getServiceProxy, getSiblingFunc, getValueFunc, hasChildNamed, isAncestorOf, remoteServiceProxyIterator, removeNodeChild, removeServiceProxyListener, sendToAll, setGroupID, setLocalSID, setName, setNodeName, setNodeParent, setServiceInstanceID, setServiceProxy, setStatus, setTopic, start, toXML, toXMLFull, toXMLFullRecursively, toXMLRecursively, updatePath
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COMMAND_SERVICES

public static final java.lang.String COMMAND_SERVICES
See Also:
Constant Field Values

COMMAND_UNLOAD_ALL

public static final java.lang.String COMMAND_UNLOAD_ALL
See Also:
Constant Field Values

COMMAND_LIST_SERVICES

public static final java.lang.String COMMAND_LIST_SERVICES
See Also:
Constant Field Values

COMMAND_LOAD

public static final java.lang.String COMMAND_LOAD
See Also:
Constant Field Values

COMMAND_REGISTER

public static final java.lang.String COMMAND_REGISTER
See Also:
Constant Field Values
Constructor Detail

ServiceManager

public ServiceManager(DeviceContext context,
                      java.lang.String serviceName,
                      java.lang.String root)
               throws java.io.IOException
Throws:
java.io.IOException
Method Detail

isSameService

public static boolean isSameService(ServiceID sid)

getServiceID

public ServiceID getServiceID()
Specified by:
getServiceID in class AbstractService
Returns:
the ServiceID of the service.

getSelfTestService

protected SelfTestProvider getSelfTestService(java.lang.String urn)

commandReceived

public void commandReceived(CommandEvent e)
Specified by:
commandReceived in interface CommandEventListener

registerUnboundService

public ServiceInstanceID registerUnboundService(java.lang.String className,
                                                java.lang.String versionString)

unRegisterUnboundService

public ServiceInstanceID unRegisterUnboundService(java.lang.String className,
                                                  java.lang.String versionString)

getUnboundServiceSIID

public ServiceInstanceID getUnboundServiceSIID(java.lang.String className,
                                               java.lang.String versionString)

lookupAndCreateUnboundService

protected UnboundService lookupAndCreateUnboundService(ServiceInstanceID siid)

loadUnboundService

public void loadUnboundService(ServiceInstanceID siid)

loadUnboundService

protected void loadUnboundService(ServiceInstanceID siid,
                                  UnboundService service)

unloadService

public void unloadService(ServiceInstanceID siid)

unloadService

public void unloadService(UnboundService c)

removeAllServices

public void removeAllServices()

serviceUnloaded

public void serviceUnloaded(UnboundService service)

stop

public void stop()
          throws java.io.IOException
Overrides:
stop in class AbstractService
Throws:
java.io.IOException