|
|||||||||
| 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.ServiceAgent
com.cometway.om.SessionManager
public class SessionManager
Reference implementation of the SessionManagerInterface.
| Field Summary | |
|---|---|
protected IObjectManager |
om
|
protected PropsType |
sessionType
|
| 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 | |
|---|---|
SessionManager()
|
|
| Method Summary | |
|---|---|
java.lang.String |
createSession()
Creates a new session and returns its sessionID. |
boolean |
destroySession(java.lang.String sessionID)
Destroys the specified session and returns true; false if the session did not exist. |
static SessionManagerInterface |
getSessionManager()
Returns the session manager registered as session_manager. |
static SessionManagerInterface |
getSessionManager(java.lang.String serviceName)
Returns the session manager registered as the specified serviceName. |
Props |
getSessionProps(java.lang.String sessionID)
Returns the Props for the specified session; false if the session does not exist. |
void |
initProps()
Initializes this agent's properties by providing default values for each of the following missing properties: session_type (default: session) service_name (default: session_manager) om_service_name (default: object_manager) |
void |
start()
Obtains a reference to the object manager specified by the om_service_name property, which it uses to serve session information using the SessionManagerInterface. |
void |
stop()
Unregisters this agent from the service manager, and invalidate's its reference to the object manager. |
| Methods inherited from class com.cometway.ak.Agent |
|---|
currentStateEquals, debug, destroy, error, error, getAgentController, getDateTimeStr, getProps, getServiceImpl, getStateMachineModel, 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 PropsType sessionType
protected IObjectManager om
| Constructor Detail |
|---|
public SessionManager()
| Method Detail |
|---|
public void initProps()
initProps in interface AgentInterfaceinitProps in class Agentpublic void start()
start in interface AgentInterfacestart in class ServiceAgentpublic void stop()
stop in interface AgentInterfacestop in class ServiceAgentpublic java.lang.String createSession()
createSession in interface SessionManagerInterfacepublic boolean destroySession(java.lang.String sessionID)
destroySession in interface SessionManagerInterfacepublic Props getSessionProps(java.lang.String sessionID)
getSessionProps in interface SessionManagerInterfacepublic static SessionManagerInterface getSessionManager()
public static SessionManagerInterface getSessionManager(java.lang.String serviceName)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||