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

public class SwitchingInvocationHandler<T> extends Object implements InvocationHandler
An InvocationHandler that switches between two delegates (an "enabled" one and a "disabled" one), based on the return value of InvocationSwitcher.isEnabled().
  • Constructor Details

    • SwitchingInvocationHandler

      public SwitchingInvocationHandler(T enabled, T disabled, InvocationSwitcher invocationSwitcher)
      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