|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.mina.statemachine.context.AbstractStateContextLookup
org.apache.mina.statemachine.context.IoSessionStateContextLookup
public class IoSessionStateContextLookup
MINA specific StateContextLookup
which uses an IoSession
attribute to store the StateContextLookup
.
Field Summary | |
---|---|
static String |
DEFAULT_SESSION_ATTRIBUTE_NAME
The default name of the IoSession attribute used to store the
StateContext object. |
Constructor Summary | |
---|---|
IoSessionStateContextLookup()
Creates a new instance using a DefaultStateContextFactory to
create StateContext objects for new IoSession s. |
|
IoSessionStateContextLookup(StateContextFactory contextFactory)
Creates a new instance using the specified StateContextFactory to
create StateContext objects for new IoSession s. |
|
IoSessionStateContextLookup(StateContextFactory contextFactory,
String sessionAttributeName)
Creates a new instance using the specified StateContextFactory to
create StateContext objects for new IoSession s. |
|
IoSessionStateContextLookup(String sessionAttributeName)
Creates a new instance using a DefaultStateContextFactory to
create StateContext objects for new IoSession s. |
Method Summary | |
---|---|
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. |
Methods inherited from class org.apache.mina.statemachine.context.AbstractStateContextLookup |
---|
lookup |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String DEFAULT_SESSION_ATTRIBUTE_NAME
IoSession
attribute used to store the
StateContext
object.
Constructor Detail |
---|
public IoSessionStateContextLookup()
DefaultStateContextFactory
to
create StateContext
objects for new IoSession
s.
public IoSessionStateContextLookup(String sessionAttributeName)
DefaultStateContextFactory
to
create StateContext
objects for new IoSession
s.
sessionAttributeName
- the name of the IoSession
attribute
used to store the StateContext
object.public IoSessionStateContextLookup(StateContextFactory contextFactory)
StateContextFactory
to
create StateContext
objects for new IoSession
s.
contextFactory
- the StateContextFactory
.public IoSessionStateContextLookup(StateContextFactory contextFactory, String sessionAttributeName)
StateContextFactory
to
create StateContext
objects for new IoSession
s.
contextFactory
- the StateContextFactory
.sessionAttributeName
- the name of the IoSession
attribute
used to store the StateContext
object.Method Detail |
---|
protected StateContext lookup(Object eventArg)
AbstractStateContextLookup
StateContext
from the specified event argument which
is an instance of a class AbstractStateContextLookup.supports(Class)
returns
true
for.
lookup
in class AbstractStateContextLookup
eventArg
- the event argument.
StateContext
.protected void store(Object eventArg, StateContext context)
AbstractStateContextLookup
StateContext
in the specified event argument which
is an instance of a class AbstractStateContextLookup.supports(Class)
returns
true
for.
store
in class AbstractStateContextLookup
eventArg
- the event argument.context
- the StateContext
to be stored.protected boolean supports(Class<?> c)
AbstractStateContextLookup
true
for any Class
that this
StateContextLookup
can use to store and lookup
StateContext
objects.
supports
in class AbstractStateContextLookup
c
- the class.
true
or false
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |