|
| Foundation |
|
| |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||
com.sas.services.session.SessionService
@SASScope(value="ALL") @BinaryCompatibilityOnly public class SessionService
The Session Service provides a mechanism for creating and accessing session contexts. The session context provides a control structure for maintaining state within a bound session and facilitates resource management and context passing. It is a convenience container for passing multiple contexts.
SessionServiceFactory,
SessionServiceInitObject| Field Summary | |
|---|---|
static java.lang.String |
RB_KEY
Resource bundle key prefix. |
static long |
serialVersionUID
Serial version ID. |
| Fields inherited from interface com.sas.services.RemoteServiceInterface |
|---|
CLASS_IDENTIFIER, CLASS_IDENTIFIER_1_1, CLASS_IDENTIFIER_1_2, CLASS_IDENTIFIER_SERVICE_TYPE, CLASS_IDENTIFIER_SERVICE_TYPE_1_1, CLASS_IDENTIFIER_SERVICE_TYPE_1_2 |
| Method Summary | |
|---|---|
void |
configure(ServiceConfigurationInterface serviceConfiguration)
Configures service. |
void |
contextStateChanged(SessionContextStateChangedEvent event)
The session service implementation implements the RemoteSessionContextStateChangedListener so that it can be notified when the session context is a destroyed. |
void |
destroy()
Destroys the service. |
boolean |
destroySession(UserContextInterface userContext,
java.lang.String sessionContextId)
Forcibly destroys the session context identified by the session context id. |
void |
destroySessions(UserContextInterface userContext)
This destroys all session contexts created by this Session Service, without destroying the Session Service itself. |
protected void |
finalize()
Destroys all the session contexts that are being managed. |
SessionContextInterface |
fromByteArray(byte[] data)
Instantiate a SessionContext from a passivated byte array. |
static SessionServiceInterface |
getInstance(ServiceConfigurationInterface serviceConfiguration)
Returns the singleton instance of the session service. |
static SessionServiceInterface |
getInstance(ServiceConfigurationInterface serviceConfiguration,
DiscoveryServiceInterface discoveryService)
Returns the singleton instance of the session service. |
static SessionContextInterface |
getRootSessionContext()
Get the root SessionContext. |
static java.lang.String |
getRootSessionContextEntityKey()
Returns the entity key for the root session context. |
RemoteServiceInterface |
getServiceProxy()
Gets the service proxy. |
SessionContextInterface |
getSessionContext(java.lang.String uniqueId)
Obtains the session context interface identified by unique identifier or null if no session context exists with this id. |
SessionContextInterface |
getSessionContext(UserContextInterface userContext,
java.lang.String uniqueId)
Obtains the session context interface identified by the unique identifer or null if no session context exists with this id. |
java.util.List |
getSummaryData(UserContextInterface userContext)
Return summary information for all active session contexts created by this Session Service. |
boolean |
isQuiesced()
Returns a flag indicating whether the Session Service is in a quiesce state or not. |
SessionContextInterface |
newSessionContext(UserContextInterface userContext)
Create and return a new session context. |
void |
quiesce(UserContextInterface userContext)
Quiesce the Session Service. |
void |
resume(UserContextInterface userContext)
Resume the Session Service. |
| Methods inherited from interface com.sas.services.RemoteServiceInterface |
|---|
getCreationTime, getServiceConfiguration, getServiceConfiguration, getServiceState, isAccessibleToRemoteClients, isExported, reconfigure, setServiceState |
| Methods inherited from interface com.sas.entities.EntityKeyInterface |
|---|
getEntityKey, sameEntity, setEntityKey |
| Methods inherited from interface com.sas.services.mgmt.ServiceNotificationBroadcasterInterface |
|---|
addServiceObserver, notifyServiceObservers, removeAllServiceObservers, removeServiceObserver |
| Field Detail |
|---|
public static final java.lang.String RB_KEY
public static final long serialVersionUID
| Method Detail |
|---|
public void configure(ServiceConfigurationInterface serviceConfiguration)
throws java.rmi.RemoteException,
ServiceException
configure in interface RemoteServiceInterfaceconfigure in class AbstractRemoteServiceserviceConfiguration - An object containing configuration data
necessary to initialize or re-configure a service. Note that the
service provider must verify that the object type is supported.
An InitializationException should be thrown if
the initialization was not completed successfully to indicate
that the instance should not be used.
java.rmi.RemoteException - if a network anomaly is encountered.
ServiceException - if unable to configure the service.
public void destroy()
throws ServiceException,
java.rmi.RemoteException
destroy in interface RemoteServiceInterfacedestroy in class AbstractRemoteServicejava.rmi.RemoteException - if a network anomaly is encountered.
ServiceException - if the service is unable to prepare itself for
destruction.
public static SessionServiceInterface getInstance(ServiceConfigurationInterface serviceConfiguration)
throws ServiceException
serviceConfiguration - Session Service's initialization object.
SessionServiceInterface The session service.
ServiceException - If an error is encountered creating the singelton
instance.
public static SessionServiceInterface getInstance(ServiceConfigurationInterface serviceConfiguration,
DiscoveryServiceInterface discoveryService)
throws ServiceException
serviceConfiguration - Session Service's initialization object.discoveryService - Discovery service to which the service will be
registered.
SessionServiceInterface The session service.
ServiceException - If an error is encountered creating the singelton
instance.public static final SessionContextInterface getRootSessionContext()
SessionContextPermissionis required to obtain the root session
context.
SessionContextInterface The root session context.
public static final java.lang.String getRootSessionContextEntityKey()
throws java.rmi.RemoteException
null if the Session Service has not been deployed within
this JVM.
String the entity key for the root session context.
This may be null if the Session Service has not
been deployed in this JVM.
java.lang.IllegalStateException - If the session context has already been
destroyed.
java.rmi.RemoteException - If a network anomaly is encountered.
public SessionContextInterface newSessionContext(UserContextInterface userContext)
throws InitializationException,
java.rmi.RemoteException,
java.lang.IllegalStateException
newSessionContext in interface SessionServiceInterfaceuserContext - User context for this session context; can be null. If
null, it can be set later using setUserContext().
SessionContextInterface The new session context.
InitializationException - If the context fails to initialize.
java.lang.IllegalStateException - If the session service has already been
destroyed.
java.rmi.RemoteException - If a network anomaly is encountered.
public SessionContextInterface getSessionContext(java.lang.String uniqueId)
throws java.rmi.RemoteException,
java.lang.IllegalStateException
SessionContextPermissionis required to obtain the session context
from the Session Service.
getSessionContext in interface SessionServiceInterfaceuniqueId - Unique identifier of the session context be to returned.
SessionContextInterface The session context
interface.
java.lang.IllegalStateException - If the session service has already been
destroyed.
java.rmi.RemoteException - If a network anomaly is encountered.
public SessionContextInterface getSessionContext(UserContextInterface userContext,
java.lang.String uniqueId)
throws java.rmi.RemoteException,
java.lang.IllegalStateException
SessionContextPermissionis required to obtain the session context
from the Session Service.
getSessionContext in interface SessionServiceInterfaceuserContext - A user context whose principals will be checked for
permission to perform the getSessionContext function. This can
be null, but if the method is invoked remotely, it will always
fail with a null user context.uniqueId - Unique identifier of the session context to be returned.
SessionContextInterface The session context
interface.
java.lang.IllegalStateException - If the session service has already been
destroyed.
java.rmi.RemoteException - If a network anomaly is encountered.public void contextStateChanged(SessionContextStateChangedEvent event)
contextStateChanged in interface RemoteSessionContextStateChangedListenerevent - The event notifying us that the context has been destroyed.public final RemoteServiceInterface getServiceProxy()
getServiceProxy in interface RemoteServiceInterfacegetServiceProxy in class AbstractRemoteServicenull if a proxy is not
available.
public void quiesce(UserContextInterface userContext)
throws ServiceException,
QuiesceException,
java.lang.IllegalStateException
This method is protected using JAAS permissions. A
SessionPermissionis required to quiesce the Session Service.
quiesce in interface QuiesceInterfacequiesce in interface SessionServiceInterfaceuserContext - The user context.
ServiceException - If a service error occurs.
QuiesceException - If an error occurs quiescing the session service.
java.lang.IllegalStateException - If the session service has already been
destroyed.
public boolean isQuiesced()
throws java.rmi.RemoteException
isQuiesced in interface SessionServiceInterfacetrue if the Session Service is in a quiesce state;
otherwise false is returned.
java.rmi.RemoteException - if a network error occurs.
public void resume(UserContextInterface userContext)
throws ServiceException,
QuiesceException,
java.lang.IllegalStateException
This method is protected using JAAS permissions. A
SessionPermissionis required to resume the Session Service.
resume in interface QuiesceInterfaceresume in interface SessionServiceInterfaceuserContext - The user context.
ServiceException - If a service error occurs.
QuiesceException - If an error occurs resuming the session service.
java.lang.IllegalStateException - If the session service has already been
destroyed.
public void destroySessions(UserContextInterface userContext)
throws java.rmi.RemoteException,
java.lang.IllegalStateException
This method is protected using JAAS permissions. A
SessionPermissionis required to destroy the active session
contexts.
destroySessions in interface SessionServiceInterfaceuserContext - The user context
java.lang.IllegalStateException - If the session service has already been
destroyed.
java.rmi.RemoteException - If a network anomaly is encountered.
public boolean destroySession(UserContextInterface userContext,
java.lang.String sessionContextId)
throws java.rmi.RemoteException
This method is protected using JAAS permissions. A
SessionPermissionis required to destroy the active session
context.
destroySession in interface SessionServiceInterfaceuserContext - The user context.sessionContextId - The unique identifier of the session context to
destroy.
boolean that is false if the session
context identified by the unique id could not be found; otherwise
true is returned.
java.rmi.RemoteException - If a network anomaly is encountered.
public java.util.List getSummaryData(UserContextInterface userContext)
throws java.rmi.RemoteException,
java.lang.IllegalStateException
This method is protected using JAAS permissions. A
SessionPermissionis required to retrieve the user summary data.
getSummaryData in interface SessionServiceInterfaceuserContext - The user context.
List A list of SummaryDataInterface objects.
java.lang.IllegalStateException - If the session service has already been
destroyed.
java.rmi.RemoteException - if a network error occurs
protected void finalize()
throws java.lang.Throwable
finalize in class java.lang.Objectjava.lang.Throwable - if uanble to finalize
public SessionContextInterface fromByteArray(byte[] data)
throws java.rmi.RemoteException,
ServiceException
SessionServiceInterface
fromByteArray in interface SessionServiceInterfacedata - The passivated data stream.
java.rmi.RemoteException - In the event of remote object failure.
ServiceException - If an error occurs processing the data.
|
| Foundation |
|
| |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||