|
Foundation |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.services.session.SessionServiceProxy
public class SessionServiceProxy
Session Service proxy. If this proxy is serialized to a remote process then the proxy will optimize calls to ensure that a local object reference is used where appropriate and that static data is cached locally to minimize remote calls.
Field Summary |
---|
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 |
Constructor Summary | |
---|---|
SessionServiceProxy(SessionServiceInterface sessionService)
Constructs a proxy to the specified session service. |
Method Summary | |
---|---|
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. |
SessionContextInterface |
fromByteArray(byte[] data)
Instantiate a SessionContext from a passivated byte array. |
SessionContextInterface |
getSessionContext(java.lang.String uniqueId)
Obtains the session context interface identified by the unique identifer 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)
Creates and returns a new session context interface. |
void |
quiesce(UserContextInterface userContext)
Resumes the session service. |
void |
resume(UserContextInterface userContext)
Resume the session service. |
Methods inherited from interface com.sas.services.RemoteServiceInterface |
---|
configure, destroy, getCreationTime, getServiceConfiguration, getServiceConfiguration, getServiceProxy, getServiceState, isAccessibleToRemoteClients, isExported, reconfigure, setServiceState |
Methods inherited from interface com.sas.services.mgmt.ServiceNotificationBroadcasterInterface |
---|
addServiceObserver, notifyServiceObservers, removeAllServiceObservers, removeServiceObserver |
Constructor Detail |
---|
public SessionServiceProxy(SessionServiceInterface sessionService) throws InitializationException
sessionService
- Session service to be proxied.
InitializationException
- if unable to create a
proxy for the logging service.Method Detail |
---|
public final SessionContextInterface newSessionContext(UserContextInterface userContext) throws InitializationException, java.rmi.RemoteException
newSessionContext
in interface SessionServiceInterface
userContext
- User context for this session context; can be null.
SessionContextInterface
The created session context interface.
InitializationException
- If the context fails to initialize.
java.rmi.RemoteException
- If a network anomaly is encountered.public final SessionContextInterface getSessionContext(java.lang.String uniqueId) throws java.rmi.RemoteException
getSessionContext
in interface SessionServiceInterface
uniqueId
- Unique identifier of the session context to be returned.
SessionContextInterface
The session context interface.
java.rmi.RemoteException
- If a network anomaly is encountered.public final SessionContextInterface getSessionContext(UserContextInterface userContext, java.lang.String uniqueId) throws java.rmi.RemoteException
SessionContextPermission
is required to obtain the
session context from the Session Service.
getSessionContext
in interface SessionServiceInterface
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.
SessionContextInterface
The session context interface.
java.rmi.RemoteException
- If a network anomaly is encountered.public final void quiesce(UserContextInterface userContext) throws ServiceException, QuiesceException, java.rmi.RemoteException
quiesce
in interface QuiesceInterface
quiesce
in interface SessionServiceInterface
userContext
- The user context.
ServiceException
- If a service error occurs.
QuiesceException
- If an error occurs quiescing the service.
java.rmi.RemoteException
- If a network anomaly is encountered.public boolean isQuiesced() throws java.rmi.RemoteException
isQuiesced
in interface SessionServiceInterface
true
if the Session
Service is in a quiesce state; otherwise false
is
returned.
java.rmi.RemoteException
- if a network error occurs.public final void resume(UserContextInterface userContext) throws ServiceException, QuiesceException, java.rmi.RemoteException
resume
in interface QuiesceInterface
resume
in interface SessionServiceInterface
userContext
- The user context.
ServiceException
- If a service error occurs.
QuiesceException
- If an error occurs quiescing the service.
java.rmi.RemoteException
- If a network anomaly is encountered.public void destroySessions(UserContextInterface userContext) throws java.rmi.RemoteException
When each session context is destroyed, all objects are unbound from it.
If the bound objects implement
RemoteSessionContextStateChangedListener
, the session context will
invoke
RemoteSessionContextStateChangedListener.contextStateChanged(SessionContextStateChangedEvent)
.
This allows objects to be notified when they are removed from the
session context so they can perform any necessary cleanup.
destroySessions
in interface SessionServiceInterface
userContext
- the user context.
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 SessionPermission
is required to destroy the
active session context.
destroySession
in interface SessionServiceInterface
userContext
- 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
getSummaryData
in interface SessionServiceInterface
userContext
- The user context.
List
A list of SummaryDataInterface objects.
java.rmi.RemoteException
- if a network error occurspublic SessionContextInterface fromByteArray(byte[] data) throws java.rmi.RemoteException, ServiceException
SessionServiceInterface
fromByteArray
in interface SessionServiceInterface
data
- 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 |