|
Graphene Implementation 1.0.0.CR3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jboss.arquillian.ajocado.command.CommandInterceptorProxyImpl
public final class CommandInterceptorProxyImpl
The proxy for command processor which instead of direct executing of given command triggers logic of all associated interceptors.
Constructor Summary | |
---|---|
CommandInterceptorProxyImpl(com.thoughtworks.selenium.CommandProcessor commandProcessor)
Constructs new proxy with associated command processor |
Method Summary | |
---|---|
com.thoughtworks.selenium.CommandProcessor |
getCommandProcessorProxy()
Returns the command processor proxied with functionality of all associated interceptors. |
CommandInterceptorProxyImpl |
immutableCopy()
Creates immutable copy of this command processor with all interceptors registered. |
Object |
invoke(Object proxy,
Method method,
Object[] args)
Proxies all the request on associated command processor. |
void |
registerInterceptor(CommandInterceptor interceptor)
Registers the interceptor, only one interceptor can be registered for given class of interceptor. |
CommandInterceptor |
unregisterInterceptor(CommandInterceptor interceptor)
Removes and returns the interceptor instance, or null, if such instance isn't registered. |
Set<CommandInterceptor> |
unregisterInterceptorType(Class<? extends CommandInterceptor> type)
Removes and returns all associated interceptors which of given type. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CommandInterceptorProxyImpl(com.thoughtworks.selenium.CommandProcessor commandProcessor)
commandProcessor
- to associate with this proxyMethod Detail |
---|
public com.thoughtworks.selenium.CommandProcessor getCommandProcessorProxy()
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable
Proxies all the request on associated command processor.
In case of CommandProcessor.doCommand(String, String[])
method, it also executes all associated
interceptors before performing the actual invocation of method.
invoke
in interface InvocationHandler
Throwable
public void registerInterceptor(CommandInterceptor interceptor)
registerInterceptor
in interface CommandInterceptorProxy
interceptor
- the interceptor implementationpublic CommandInterceptor unregisterInterceptor(CommandInterceptor interceptor)
unregisterInterceptor
in interface CommandInterceptorProxy
interceptor
- the instance of interceptor to remove
public Set<CommandInterceptor> unregisterInterceptorType(Class<? extends CommandInterceptor> type)
unregisterInterceptorType
in interface CommandInterceptorProxy
type
- of interceptors which we want to unregister from this command processor
public CommandInterceptorProxyImpl immutableCopy()
|
Graphene Implementation 1.0.0.CR3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |