|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.cometway.props.Props
com.cometway.ak.Agent
com.cometway.ak.ServiceManager
public class ServiceManager
Reference implementation of the ServiceManagerInterface.
| Nested Class Summary | |
|---|---|
class |
ServiceManager.ServiceManagerImpl
|
| Field Summary | |
|---|---|
protected ServiceManagerInterface |
sm
|
| Fields inherited from class com.cometway.ak.Agent |
|---|
agent_id, agentController, CREATING_STATE, debugReporter, DESTROYED_STATE, DESTROYING_STATE, errorReporter, FAILED_STATE, printlnReporter, props, RUNNING_STATE, STARTING_STATE, STOPPED_STATE, STOPPING_STATE, warningReporter |
| Constructor Summary | |
|---|---|
ServiceManager()
|
|
| Method Summary | |
|---|---|
static java.lang.Object |
getService(java.lang.String serviceName)
Returns an implementation for the specified service name; null if none found. |
static java.lang.Object |
getService(java.lang.String serviceName,
java.lang.Object authorization)
Returns an implementation for the specified service name if the service was found, and the authorization was accepted; null otherwise. |
static ServiceManagerInterface |
getServiceManager()
Returns a reference to the service manager. |
static boolean |
register(java.lang.String serviceName,
java.lang.Object serviceImpl)
Registers a service implementation using the specified service name and returns true if successful; false otherwise. |
static boolean |
register(java.lang.String serviceName,
java.lang.Object serviceImpl,
java.lang.Object authorization)
Registers a service implementation using the specified service name and if authorization is accepted returns true; returns false otherwise. |
static void |
setServiceManager(ServiceManagerInterface serviceManager)
Sets the service manager returned by getServiceManager. |
void |
start()
Starts the service manager. |
void |
stop()
Stops the service manager. |
static boolean |
unregister(java.lang.String serviceName,
java.lang.Object serviceImpl)
Unregisters a service implementation using the specified service name and returns true if successful; returns false otherwise. |
static boolean |
unregister(java.lang.String serviceName,
java.lang.Object serviceImpl,
java.lang.Object authorization)
Unregisters a service implementation using the specified service name and if authorization is accepted returns true; returns false otherwise. |
| Methods inherited from class com.cometway.ak.Agent |
|---|
currentStateEquals, debug, destroy, error, error, getAgentController, getDateTimeStr, getProps, getServiceImpl, getStateMachineModel, initProps, println, register, registerService, setAgentController, setProps, toString, unregister, unregisterService, warning, warning |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected ServiceManagerInterface sm
| Constructor Detail |
|---|
public ServiceManager()
| Method Detail |
|---|
public void start()
start in interface AgentInterfacestart in class Agentpublic void stop()
stop in interface AgentInterfacestop in class Agentpublic static ServiceManagerInterface getServiceManager()
public static void setServiceManager(ServiceManagerInterface serviceManager)
public static java.lang.Object getService(java.lang.String serviceName)
public static java.lang.Object getService(java.lang.String serviceName,
java.lang.Object authorization)
public static boolean register(java.lang.String serviceName,
java.lang.Object serviceImpl)
public static boolean register(java.lang.String serviceName,
java.lang.Object serviceImpl,
java.lang.Object authorization)
public static boolean unregister(java.lang.String serviceName,
java.lang.Object serviceImpl)
public static boolean unregister(java.lang.String serviceName,
java.lang.Object serviceImpl,
java.lang.Object authorization)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||