|
Foundation |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.services.session.SessionContextStateChangedEvent
public class SessionContextStateChangedEvent
Sent to an object that implements
RemoteSessionContextStateChangedListener
when the object's state changes
within the session context; currently, this is when the object is removed
from the session context or when the session context is destroyed.
The session context binds the object by a call to
SessionContextInterface.setAttribute(Object)
and removes the object by a call to
SessionContextInterface.removeAttribute(String)
or SessionContextInterface.destroy
.
Field Summary | |
---|---|
static int |
OBJECT_REMOVED
Object removed. |
static long |
serialVersionUID
Serial version ID. |
static int |
SESSION_CONTEXT_DESTROYED
Session context destroyed. |
Constructor Summary | |
---|---|
SessionContextStateChangedEvent(SessionContextInterface sessionContext,
java.lang.String name,
java.lang.Object object,
int stateChange)
Constructs an event that notifies an object that its state has changed within the session context; currently, this is when the object is removed from the session context. |
Method Summary | |
---|---|
java.lang.String |
getName()
Returns the name with which the object is bound in the session context. |
java.lang.Object |
getObject()
Returns the object that was bound to the session context. |
SessionContextInterface |
getSessionContext()
Returns the session context from which the object is removed. |
java.lang.Object |
getSource()
Returns the object that originated the event. |
int |
getStateChange()
Returns the type of state change that occurred. |
java.lang.String |
toString()
Returns a String representation of this SessionContextStateChangedEvent. |
Field Detail |
---|
public static final long serialVersionUID
public static final int OBJECT_REMOVED
public static final int SESSION_CONTEXT_DESTROYED
Constructor Detail |
---|
public SessionContextStateChangedEvent(SessionContextInterface sessionContext, java.lang.String name, java.lang.Object object, int stateChange)
If an object added to a session context with
SessionContextInterface.setAttribute(Object)
implements
RemoteSessionContextStateChangedListener
, the session context will invoke
RemoteSessionContextStateChangedListener.contextStateChanged(SessionContextStateChangedEvent)
when the session context is destroyed or when the object is removed from
the session context. This notification will allow the object to cleanup
any resources that are necessary.
sessionContext
- The session context to which the object is bound.name
- The name with which the object is bound in the session
context.object
- The bound object.stateChange
- The type of state change, either
SESSION_CONTEXT_DESTROYED
or
OBJECT_REMOVED
.Method Detail |
---|
public java.lang.String getName()
String
The name with which the object is bound in
the session context.public SessionContextInterface getSessionContext()
SessionContextInterface
The session context from
which the object is unbound.public java.lang.Object getObject()
Object
The object that was bound to the session
context..public java.lang.Object getSource()
getSource
in class java.util.EventObject
Object
The object that originated the eventpublic java.lang.String toString()
toString
in class java.util.EventObject
String
The String represenation of this
SessionContextStateChangedEvent.public int getStateChange()
OBJECT_REMOVED
and
SESSION_CONTEXT_DESROYED
.
int
The type of state change.
|
Foundation |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |