*** This interface provides Binary Compatibility only, not Source Compatibility ***
Interface SessionServiceInterface
- All Superinterfaces:
com.sas.entities.EntityKeyInterface,QuiesceInterface,Remote,RemoteServiceInterface,ServiceNotificationBroadcasterInterface
- All Known Implementing Classes:
SessionService,SessionServiceProxy
- Since:
- 1.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final longDeprecated.serialVersionUID will be deleted in a future release.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
Modifier and TypeMethodDescriptionbooleandestroySession(UserContextInterface userContext, String sessionContextId) Forcibly destroys the session context identified by the session context id.voiddestroySessions(UserContextInterface userContext) Forces a destroy of all session contexts created by this Session Service.fromByteArray(byte[] data) Instantiate a SessionContext from a passivated byte array.getSessionContext(UserContextInterface userContext, String uniqueId) Obtains the session context interface identified by the unique identifer or null if no session context exists with this id.getSessionContext(String uniqueId) Obtains the session context interface identified by the unique identifer or null if no session context exists with this id.ListgetSummaryData(UserContextInterface userContext) Return summary information for all active session contexts created by this Session Service.booleanReturns a flag indicating whether the Session Service is in a quiesce state or not.newSessionContext(UserContextInterface userContext) Creates and returns a new session context interface.voidquiesce(UserContextInterface userContext) Quiesce the Session Service.voidresume(UserContextInterface userContext) Resume the Session Service.Methods inherited from interface com.sas.entities.EntityKeyInterface
getEntityKey, sameEntity, setEntityKeyMethods inherited from interface com.sas.services.RemoteServiceInterface
configure, destroy, getCreationTime, getServiceConfiguration, getServiceConfiguration, getServiceProxy, getServiceState, isAccessibleToRemoteClients, isExported, reconfigure, setServiceStateMethods inherited from interface com.sas.services.mgmt.ServiceNotificationBroadcasterInterface
addServiceObserver, notifyServiceObservers, removeAllServiceObservers, removeServiceObserver
-
Field Details
-
serialVersionUID
static final long serialVersionUIDDeprecated.serialVersionUID will be deleted in a future release.Serial version ID.- See Also:
-
-
Method Details
-
newSessionContext
SessionContextInterface newSessionContext(UserContextInterface userContext) throws InitializationException, RemoteException Creates and returns a new session context interface. The user context to bind to the session context can be provided. If a null user context is provided, it can be set at a later time. Once the user context has been set to a non-null value, it cannot be changed.The creation will fail if the session service is in a quiesce state. If a quiesce state failure occurs, the
InitializationException.getRootExceptionwill return aQuiesceException.- Parameters:
userContext- User context for this session context; can be null.- Returns:
SessionContextInterfaceThe created session context interface.- Throws:
InitializationException- If the context fails to initialize.RemoteException- If a network anomaly is encountered.
-
getSessionContext
Obtains the session context interface identified by the unique identifer or null if no session context exists with this id. The unique identifier is required to identify the desired context so that applications don't have access to all session contexts. This method is protected using JAAS permissions. ASessionContextPermissionis required to obtain the session context from the Session Service.- Parameters:
uniqueId- Unique identifier of the session context to be returned.- Returns:
SessionContextInterfaceThe session context interface.- Throws:
RemoteException- If a network anomaly is encountered.
-
getSessionContext
SessionContextInterface getSessionContext(UserContextInterface userContext, String uniqueId) throws RemoteException Obtains the session context interface identified by the unique identifer or null if no session context exists with this id. The unique identifier is required to identify the desired context so that applications don't have access to all session contexts. This method is protected using JAAS permissions. ASessionContextPermissionis required to obtain the session context from the Session Service.- Parameters:
userContext- 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.- Returns:
SessionContextInterfaceThe session context interface.- Throws:
RemoteException- If a network anomaly is encountered.
-
quiesce
void quiesce(UserContextInterface userContext) throws ServiceException, QuiesceException, RemoteException Quiesce the Session Service. This will prevent the Session Service from creating any new session contexts.This method is protected using JAAS permissions. A
SessionPermissionis required to quiesce the Session Service.- Specified by:
quiescein interfaceQuiesceInterface- Parameters:
userContext- The user context.- Throws:
ServiceException- If a service error occurs.QuiesceException- If an error occurs quiescing the service.RemoteException- If a network anomaly is encountered.
-
resume
void resume(UserContextInterface userContext) throws ServiceException, QuiesceException, RemoteException Resume the Session Service. This should be called after the Session Service has been quiesced, to allow the Session Service to start creating new session contexts again.This method is protected using JAAS permissions. A
SessionPermissionis required to resume the Session Service.- Specified by:
resumein interfaceQuiesceInterface- Parameters:
userContext- The user context.- Throws:
ServiceException- If a service error occurs.QuiesceException- If an error occurs resuming the service.RemoteException- If a network anomaly is encountered.
-
destroySessions
Forces a destroy of all session contexts created by this Session Service. The session contexts will be destroyed even if they are locked. The Session Service itself is not destroyed, The root session context is not destroyed. The root session context is created when the Session Service is initialized, and is available throughout the life time of the Session Service. It is not destroyed until the Session Service itself is destroyed.This method is protected using JAAS permissions. A
SessionPermissionis required to destroy the active session contexts.- Parameters:
userContext- The user context.- Throws:
RemoteException- If a network anomaly is encountered.
-
destroySession
boolean destroySession(UserContextInterface userContext, String sessionContextId) throws RemoteException Forcibly destroys the session context identified by the session context id. The session context will be destroyed even if is locked.This method is protected using JAAS permissions. A
SessionPermissionis required to destroy the active session context.- Parameters:
userContext- The user context.sessionContextId- The unique identifier of the session context to destroy.- Returns:
booleanthat is false if the session context identified by the unique id could not be found; otherwise true is returned.- Throws:
RemoteException- If a network anomaly is encountered.
-
getSummaryData
Return summary information for all active session contexts created by this Session Service. Each session context can be bound to a user context. The summary data for each active session contains information such as the user context name, the user's email addresses, and the user's global profile.This method is protected using JAAS permissions. A
SessionPermissionis required to retrieve the user summary data.- Parameters:
userContext- The user context.- Returns:
ListA list ofSummaryDataInterfaceobjects.- Throws:
RemoteException- if a network error occurs
-
isQuiesced
boolean isQuiesced() throws RemoteExceptionReturns a flag indicating whether the Session Service is in a quiesce state or not.- Returns:
trueif the Session Service is in a quiesce state; otherwisefalseis returned.- Throws:
RemoteException- if a network error occurs.
-
fromByteArray
Instantiate a SessionContext from a passivated byte array. The first item in the passivated stream is the session ID. If that session ID is one this session service has in its known list, get it and return it.- Parameters:
data- The passivated data stream.- Returns:
- The instantiated Session Context
- Throws:
RemoteException- In the event of remote object failure.ServiceException- If an error occurs processing the data.
-