Class SwitchingInvocationHandler<T>
java.lang.Object
com.atlassian.jira.config.component.SwitchingInvocationHandler<T>
- Type Parameters:
T- the type of component being switched between
- All Implemented Interfaces:
InvocationHandler
An
InvocationHandler that switches between two delegates (an "enabled" one and
a "disabled" one), based on the return value of InvocationSwitcher.isEnabled().-
Constructor Summary
ConstructorsConstructorDescriptionSwitchingInvocationHandler(T enabled, T disabled, InvocationSwitcher invocationSwitcher) Constructor. -
Method Summary
-
Constructor Details
-
SwitchingInvocationHandler
Constructor.- Parameters:
enabled- the delegate to use when the invocation switcher returns "enabled"disabled- the delegate to use when the invocation switcher returns "disabled"invocationSwitcher- the invocation switcher to use
-
-
Method Details
-
invoke
- Specified by:
invokein interfaceInvocationHandler- Throws:
Throwable
-