*** This class provides Binary Compatibility only, not Source Compatibility ***
Package com.sas.services.session
Class SessionContextStateChangedEvent
java.lang.Object
java.util.EventObject
com.sas.services.session.SessionContextStateChangedEvent
- All Implemented Interfaces:
Serializable
@SASScope("ALL")
@BinaryCompatibilityOnly
public class SessionContextStateChangedEvent
extends EventObject
implements Serializable
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.
- Since:
- 1.0
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intObject removed.static final longSerial version ID.static final intSession context destroyed.Fields inherited from class java.util.EventObject
source -
Constructor Summary
ConstructorsConstructorDescriptionSessionContextStateChangedEvent(SessionContextInterface sessionContext, String name, 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
Modifier and TypeMethodDescriptionStringgetName()Returns the name with which the object is bound in the session context.ObjectReturns the object that was bound to the session context.Returns the session context from which the object is removed.ObjectReturns the object that originated the event.intReturns the type of state change that occurred.StringtoString()Returns a String representation of this SessionContextStateChangedEvent.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Field Details
-
serialVersionUID
public static final long serialVersionUIDSerial version ID. This value should be changed if backward compatibility with previosly serialized versions is no longer desired.- See Also:
-
OBJECT_REMOVED
public static final int OBJECT_REMOVEDObject removed.- See Also:
-
SESSION_CONTEXT_DESTROYED
public static final int SESSION_CONTEXT_DESTROYEDSession context destroyed.- See Also:
-
-
Constructor Details
-
SessionContextStateChangedEvent
public SessionContextStateChangedEvent(SessionContextInterface sessionContext, String name, 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.If an object added to a session context with
SessionContextInterface.setAttribute(Object)implementsRemoteSessionContextStateChangedListener, the session context will invokeRemoteSessionContextStateChangedListener.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.- Parameters:
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, eitherSESSION_CONTEXT_DESTROYEDorOBJECT_REMOVED.
-
-
Method Details
-
getName
public String getName()Returns the name with which the object is bound in the session context.- Returns:
StringThe name with which the object is bound in the session context.
-
getSessionContext
Returns the session context from which the object is removed.- Returns:
SessionContextInterfaceThe session context from which the object is unbound.
-
getObject
public Object getObject()Returns the object that was bound to the session context.- Returns:
ObjectThe object that was bound to the session context..
-
getSource
public Object getSource()Returns the object that originated the event. In this case, the object is the session context.- Overrides:
getSourcein classEventObject- Returns:
ObjectThe object that originated the event
-
toString
public String toString()Returns a String representation of this SessionContextStateChangedEvent.- Overrides:
toStringin classEventObject- Returns:
StringThe String represenation of this SessionContextStateChangedEvent.
-
getStateChange
public int getStateChange()Returns the type of state change that occurred. Supported state changes includeOBJECT_REMOVEDandSESSION_CONTEXT_DESROYED.- Returns:
intThe type of state change.
-