public class StateMachineProxyBuilder extends Object
StateMachine.| Constructor and Description |
|---|
StateMachineProxyBuilder() |
| Modifier and Type | Method and Description |
|---|---|
Object |
create(Class<?>[] ifaces,
StateMachine sm)
Creates a proxy for the specified interfaces and which uses the specified
StateMachine. |
<T> T |
create(Class<T> iface,
StateMachine sm)
Creates a proxy for the specified interface and which uses the specified
StateMachine. |
StateMachineProxyBuilder |
setClassLoader(ClassLoader cl)
Sets the class loader to use for instantiating proxies.
|
StateMachineProxyBuilder |
setEventArgumentsInterceptor(EventArgumentsInterceptor interceptor)
Sets the
EventArgumentsInterceptor to be used. |
StateMachineProxyBuilder |
setEventFactory(EventFactory eventFactory)
Sets the
EventFactory to be used. |
StateMachineProxyBuilder |
setIgnoreStateContextLookupFailure(boolean b)
Sets whether the failure to lookup a
StateContext corresponding
to a method call on the proxy produced by this builder will raise an
exception or be silently ignored. |
StateMachineProxyBuilder |
setIgnoreUnhandledEvents(boolean b)
Sets whether events which have no handler in the current state will raise
an exception or be silently ignored.
|
StateMachineProxyBuilder |
setName(String name)
Sets the name of the proxy created by this builder.
|
StateMachineProxyBuilder |
setStateContextLookup(StateContextLookup contextLookup)
Sets the
StateContextLookup to be used. |
public StateMachineProxyBuilder setName(String name)
toString() method. If not specified a default
auto generated name will be used.name - the name.StateMachineProxyBuilder for method chaining.public StateMachineProxyBuilder setStateContextLookup(StateContextLookup contextLookup)
StateContextLookup to be used. The default is to use
a SingletonStateContextLookup.contextLookup - the StateContextLookup to use.StateMachineProxyBuilder for method chaining.public StateMachineProxyBuilder setEventFactory(EventFactory eventFactory)
EventFactory to be used. The default is to use a
DefaultEventFactory.eventFactory - the EventFactory to use.StateMachineProxyBuilder for method chaining.public StateMachineProxyBuilder setEventArgumentsInterceptor(EventArgumentsInterceptor interceptor)
EventArgumentsInterceptor to be used. By default no
EventArgumentsInterceptor will be used.interceptor - the EventArgumentsInterceptor to use.StateMachineProxyBuilder for method chaining.public StateMachineProxyBuilder setIgnoreUnhandledEvents(boolean b)
b - true to ignore context lookup failures.StateMachineProxyBuilder for method chaining.public StateMachineProxyBuilder setIgnoreStateContextLookupFailure(boolean b)
StateContext corresponding
to a method call on the proxy produced by this builder will raise an
exception or be silently ignored. The default is to raise an exception.b - true to ignore context lookup failures.StateMachineProxyBuilder for method chaining.public StateMachineProxyBuilder setClassLoader(ClassLoader cl)
ClassLoader as returned by
Thread.getContextClassLoader().cl - the class loaderStateMachineProxyBuilder for method chaining.public <T> T create(Class<T> iface, StateMachine sm)
StateMachine.iface - the interface the proxy will implement.sm - the StateMachine which will receive the events
generated by the method calls on the proxy.public Object create(Class<?>[] ifaces, StateMachine sm)
StateMachine.ifaces - the interfaces the proxy will implement.sm - the StateMachine which will receive the events
generated by the method calls on the proxy.Copyright © 2004–2017 Apache MINA Project. All rights reserved.