public class SingletonStateContextLookup extends java.lang.Object implements StateContextLookup
StateContextLookup implementation which always returns the same
StateContext instance.| 构造器和说明 |
|---|
SingletonStateContextLookup()
Creates a new instance which always returns the same
DefaultStateContext instance. |
SingletonStateContextLookup(StateContextFactory contextFactory)
Creates a new instance which uses the specified
StateContextFactory
to create the single instance. |
| 限定符和类型 | 方法和说明 |
|---|---|
StateContext |
lookup(java.lang.Object[] eventArgs)
Searches the arguments from an
Event and returns a
StateContext if any of the arguments holds one. |
public SingletonStateContextLookup()
DefaultStateContext instance.public SingletonStateContextLookup(StateContextFactory contextFactory)
StateContextFactory
to create the single instance.contextFactory - the StateContextFactory to use to create
the singleton instance.public StateContext lookup(java.lang.Object[] eventArgs)
StateContextLookupEvent and returns a
StateContext if any of the arguments holds one. NOTE! This method
must create a new StateContext if a compatible object is in
the arguments and the next time that same object is passed to this
method the same StateContext should be returned.lookup 在接口中 StateContextLookupeventArgs - The arguments we are looking for