Class IoSessionStateContextLookup
java.lang.Object
org.apache.mina.statemachine.context.AbstractStateContextLookup
org.apache.mina.statemachine.context.IoSessionStateContextLookup
- All Implemented Interfaces:
StateContextLookup
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe default name of theIoSessionattribute used to store theStateContextobject.private final String -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new instance using aDefaultStateContextFactoryto createStateContextobjects for newIoSessions.IoSessionStateContextLookup(String sessionAttributeName) Creates a new instance using aDefaultStateContextFactoryto createStateContextobjects for newIoSessions.IoSessionStateContextLookup(StateContextFactory contextFactory) Creates a new instance using the specifiedStateContextFactoryto createStateContextobjects for newIoSessions.IoSessionStateContextLookup(StateContextFactory contextFactory, String sessionAttributeName) Creates a new instance using the specifiedStateContextFactoryto createStateContextobjects for newIoSessions. -
Method Summary
Modifier and TypeMethodDescriptionprotected StateContextExtracts aStateContextfrom the specified event argument which is an instance of a classAbstractStateContextLookup.supports(Class)returnstruefor.protected voidstore(Object eventArg, StateContext context) Stores a newStateContextin the specified event argument which is an instance of a classAbstractStateContextLookup.supports(Class)returnstruefor.protected booleanMust returntruefor anyClassthat thisStateContextLookupcan use to store and lookupStateContextobjects.Methods inherited from class AbstractStateContextLookup
lookup
-
Field Details
-
DEFAULT_SESSION_ATTRIBUTE_NAME
The default name of theIoSessionattribute used to store theStateContextobject. -
sessionAttributeName
-
-
Constructor Details
-
IoSessionStateContextLookup
public IoSessionStateContextLookup()Creates a new instance using aDefaultStateContextFactoryto createStateContextobjects for newIoSessions. -
IoSessionStateContextLookup
Creates a new instance using aDefaultStateContextFactoryto createStateContextobjects for newIoSessions.- Parameters:
sessionAttributeName- the name of theIoSessionattribute used to store theStateContextobject.
-
IoSessionStateContextLookup
Creates a new instance using the specifiedStateContextFactoryto createStateContextobjects for newIoSessions.- Parameters:
contextFactory- theStateContextFactory.
-
IoSessionStateContextLookup
Creates a new instance using the specifiedStateContextFactoryto createStateContextobjects for newIoSessions.- Parameters:
contextFactory- theStateContextFactory.sessionAttributeName- the name of theIoSessionattribute used to store theStateContextobject.
-
-
Method Details
-
lookup
Description copied from class:AbstractStateContextLookupExtracts aStateContextfrom the specified event argument which is an instance of a classAbstractStateContextLookup.supports(Class)returnstruefor.- Specified by:
lookupin classAbstractStateContextLookup- Parameters:
eventArg- the event argument.- Returns:
- the
StateContext.
-
store
Description copied from class:AbstractStateContextLookupStores a newStateContextin the specified event argument which is an instance of a classAbstractStateContextLookup.supports(Class)returnstruefor.- Specified by:
storein classAbstractStateContextLookup- Parameters:
eventArg- the event argument.context- theStateContextto be stored.
-
supports
Description copied from class:AbstractStateContextLookupMust returntruefor anyClassthat thisStateContextLookupcan use to store and lookupStateContextobjects.- Specified by:
supportsin classAbstractStateContextLookup- Parameters:
c- the class.- Returns:
trueorfalse.
-