public class IoSessionStateContextLookup extends AbstractStateContextLookup
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_SESSION_ATTRIBUTE_NAME
The default name of the
IoSession attribute used to store the
StateContext object. |
| Constructor and Description |
|---|
IoSessionStateContextLookup()
Creates a new instance using a
DefaultStateContextFactory to
create StateContext objects for new IoSessions. |
IoSessionStateContextLookup(StateContextFactory contextFactory)
Creates a new instance using the specified
StateContextFactory to
create StateContext objects for new IoSessions. |
IoSessionStateContextLookup(StateContextFactory contextFactory,
String sessionAttributeName)
Creates a new instance using the specified
StateContextFactory to
create StateContext objects for new IoSessions. |
IoSessionStateContextLookup(String sessionAttributeName)
Creates a new instance using a
DefaultStateContextFactory to
create StateContext objects for new IoSessions. |
| Modifier and Type | Method and Description |
|---|---|
protected StateContext |
lookup(Object eventArg)
Extracts a
StateContext from the specified event argument which
is an instance of a class AbstractStateContextLookup.supports(Class) returns
true for. |
protected void |
store(Object eventArg,
StateContext context)
Stores a new
StateContext in the specified event argument which
is an instance of a class AbstractStateContextLookup.supports(Class) returns
true for. |
protected boolean |
supports(Class<?> c)
Must return
true for any Class that this
StateContextLookup can use to store and lookup
StateContext objects. |
lookuppublic static final String DEFAULT_SESSION_ATTRIBUTE_NAME
IoSession attribute used to store the
StateContext object.public IoSessionStateContextLookup()
DefaultStateContextFactory to
create StateContext objects for new IoSessions.public IoSessionStateContextLookup(String sessionAttributeName)
DefaultStateContextFactory to
create StateContext objects for new IoSessions.sessionAttributeName - the name of the IoSession attribute
used to store the StateContext object.public IoSessionStateContextLookup(StateContextFactory contextFactory)
StateContextFactory to
create StateContext objects for new IoSessions.contextFactory - the StateContextFactory.public IoSessionStateContextLookup(StateContextFactory contextFactory, String sessionAttributeName)
StateContextFactory to
create StateContext objects for new IoSessions.contextFactory - the StateContextFactory.sessionAttributeName - the name of the IoSession attribute
used to store the StateContext object.protected StateContext lookup(Object eventArg)
AbstractStateContextLookupStateContext from the specified event argument which
is an instance of a class AbstractStateContextLookup.supports(Class) returns
true for.lookup in class AbstractStateContextLookupeventArg - the event argument.StateContext.protected void store(Object eventArg, StateContext context)
AbstractStateContextLookupStateContext in the specified event argument which
is an instance of a class AbstractStateContextLookup.supports(Class) returns
true for.store in class AbstractStateContextLookupeventArg - the event argument.context - the StateContext to be stored.protected boolean supports(Class<?> c)
AbstractStateContextLookuptrue for any Class that this
StateContextLookup can use to store and lookup
StateContext objects.supports in class AbstractStateContextLookupc - the class.true or false.Copyright © 2004–2017 Apache MINA Project. All rights reserved.