InterceptorContext.getInvocationContext
Code IndexAdd Codota to your IDE (free)

Best code snippets using org.jboss.invocation.InterceptorContext.getInvocationContext(Showing top 15 results out of 315)

  • Common ways to obtain InterceptorContext
private void myMethod () {
InterceptorContext i =
  • new InterceptorContext()
  • Smart code suggestions by Codota
}
origin: wildfly/wildfly

  private Object doLifecycleInterception(final InterceptorContext context, InterceptorInstances interceptorInstances, final InterceptorBindings interceptorBindings) throws Exception {
    if (interceptorBindings == null) {
      return context.proceed();
    } else {
      List<Interceptor<?>> currentInterceptors = interceptorBindings.getLifecycleInterceptors(interceptionType);
      return delegateInterception(context.getInvocationContext(), interceptionType, currentInterceptors, interceptorInstances);
    }
  }
}
origin: wildfly/wildfly

@Override
public Object processInvocation(final InterceptorContext context) throws Exception {
  return aroundInvoke(context.getInvocationContext());
}
origin: wildfly/wildfly

  /**
   * {@inheritDoc}
   */
  public Object processInvocation(final InterceptorContext context) throws Exception {
    // get the container-interceptor instance
    final Object interceptorInstance = interceptorInstanceRef.getInstance();
    try {
      final Method method = this.method;
      return method.invoke(interceptorInstance, context.getInvocationContext());
    } catch (IllegalAccessException e) {
      final IllegalAccessError n = new IllegalAccessError(e.getMessage());
      n.setStackTrace(e.getStackTrace());
      throw n;
    } catch (InvocationTargetException e) {
      throw Interceptors.rethrow(e.getCause());
    }
  }
}
origin: wildfly/wildfly

@Override
public Object processInvocation(final InterceptorContext context) throws Exception {
  final ComponentInstance componentInstance = context.getPrivateData(ComponentInstance.class);
  final InterceptorInstances interceptorInstances = interceptorSupport.getInterceptorInstances(componentInstance);
  final InterceptorBindings interceptorBindings = this.interceptorBindings.getValue();
  switch (interceptionType) {
    case AROUND_INVOKE:
      return doMethodInterception(context.getInvocationContext(), InterceptionType.AROUND_INVOKE, interceptorInstances, interceptorBindings);
    case AROUND_TIMEOUT:
      return doMethodInterception(context.getInvocationContext(), InterceptionType.AROUND_TIMEOUT, interceptorInstances, interceptorBindings);
    case PRE_DESTROY:
      try {
        return doLifecycleInterception(context, interceptorInstances, interceptorBindings);
      } finally {
        interceptorInstances.getCreationalContext().release();
      }
    case POST_CONSTRUCT:
      return doLifecycleInterception(context, interceptorInstances, interceptorBindings);
    case AROUND_CONSTRUCT:
      return doLifecycleInterception(context, interceptorInstances, interceptorBindings);
    default:
      //should never happen
      return context.proceed();
  }
}
origin: wildfly/wildfly

  return method.invoke(instance, context.getInvocationContext());
} else if (this.changeMethod) {
  context.setMethod(method);
  return method.invoke(instance, context.getInvocationContext());
} else {
  return method.invoke(instance, context.getInvocationContext());
origin: wildfly/wildfly

@Override
public Object processInvocation(final InterceptorContext context) throws Exception {
  final InvocationContext invocationContext = context.getInvocationContext();
  SingletonComponent lockableComponent = this.getLockableComponent();
origin: org.jboss.as/jboss-as-weld

private Object doLifecycleInterception(final InterceptorContext context) throws Exception {
  try {
    final InterceptorBindings interceptorBindings = getInterceptorBindings(ejbName);
    if (interceptorBindings != null) {
      List<Interceptor<?>> currentInterceptors = interceptorBindings.getLifecycleInterceptors(interceptionType);
      delegateInterception(context.getInvocationContext(), interceptionType, currentInterceptors);
    }
  } finally {
    return context.proceed();
  }
}
origin: org.jboss.as/jboss-as-weld

@Override
public Object processInvocation(final InterceptorContext context) throws Exception {
  switch (interceptionType) {
    case AROUND_INVOKE:
      return doMethodInterception(context.getInvocationContext(), InterceptionType.AROUND_INVOKE);
    case AROUND_TIMEOUT:
      return doMethodInterception(context.getInvocationContext(), InterceptionType.AROUND_TIMEOUT);
    case PRE_DESTROY:
      try {
        return doLifecycleInterception(context);
      } finally {
        creationalContext.release();
      }
    case POST_CONSTRUCT:
      return doLifecycleInterception(context);
    default:
      //should never happen
      return context.proceed();
  }
}
origin: org.wildfly/wildfly-weld-common

  private Object doLifecycleInterception(final InterceptorContext context, InterceptorInstances interceptorInstances, final InterceptorBindings interceptorBindings) throws Exception {
    if (interceptorBindings == null) {
      return context.proceed();
    } else {
      List<Interceptor<?>> currentInterceptors = interceptorBindings.getLifecycleInterceptors(interceptionType);
      return delegateInterception(context.getInvocationContext(), interceptionType, currentInterceptors, interceptorInstances);
    }
  }
}
origin: org.wildfly/wildfly-weld-common

  private Object doLifecycleInterception(final InterceptorContext context, InterceptorInstances interceptorInstances, final InterceptorBindings interceptorBindings) throws Exception {
    if (interceptorBindings == null) {
      return context.proceed();
    } else {
      List<Interceptor<?>> currentInterceptors = interceptorBindings.getLifecycleInterceptors(interceptionType);
      return delegateInterception(context.getInvocationContext(), interceptionType, currentInterceptors, interceptorInstances);
    }
  }
}
origin: org.wildfly/wildfly-weld-common

@Override
public Object processInvocation(final InterceptorContext context) throws Exception {
  return aroundInvoke(context.getInvocationContext());
}
origin: org.jboss.as/jboss-as-ejb3

  /**
   * {@inheritDoc}
   */
  public Object processInvocation(final InterceptorContext context) throws Exception {
    // get the container-interceptor instance
    final Object interceptorInstance = interceptorInstanceRef.getInstance();
    try {
      final Method method = this.method;
      return method.invoke(interceptorInstance, context.getInvocationContext());
    } catch (IllegalAccessException e) {
      final IllegalAccessError n = new IllegalAccessError(e.getMessage());
      n.setStackTrace(e.getStackTrace());
      throw n;
    } catch (InvocationTargetException e) {
      throw Interceptors.rethrow(e.getCause());
    }
  }
}
origin: org.jboss.as/jboss-as-ejb3

  /**
   * {@inheritDoc}
   */
  public Object processInvocation(final InterceptorContext context) throws Exception {
    // get the container-interceptor instance
    final Object interceptorInstance = interceptorInstanceRef.getInstance();
    try {
      final Method method = this.method;
      return method.invoke(interceptorInstance, context.getInvocationContext());
    } catch (IllegalAccessException e) {
      final IllegalAccessError n = new IllegalAccessError(e.getMessage());
      n.setStackTrace(e.getStackTrace());
      throw n;
    } catch (InvocationTargetException e) {
      throw Interceptors.rethrow(e.getCause());
    }
  }
}
origin: org.wildfly/wildfly-ejb3

  /**
   * {@inheritDoc}
   */
  public Object processInvocation(final InterceptorContext context) throws Exception {
    // get the container-interceptor instance
    final Object interceptorInstance = interceptorInstanceRef.getInstance();
    try {
      final Method method = this.method;
      return method.invoke(interceptorInstance, context.getInvocationContext());
    } catch (IllegalAccessException e) {
      final IllegalAccessError n = new IllegalAccessError(e.getMessage());
      n.setStackTrace(e.getStackTrace());
      throw n;
    } catch (InvocationTargetException e) {
      throw Interceptors.rethrow(e.getCause());
    }
  }
}
origin: org.wildfly/wildfly-ejb3

  /**
   * {@inheritDoc}
   */
  public Object processInvocation(final InterceptorContext context) throws Exception {
    // get the container-interceptor instance
    final Object interceptorInstance = interceptorInstanceRef.getInstance();
    try {
      final Method method = this.method;
      return method.invoke(interceptorInstance, context.getInvocationContext());
    } catch (IllegalAccessException e) {
      final IllegalAccessError n = new IllegalAccessError(e.getMessage());
      n.setStackTrace(e.getStackTrace());
      throw n;
    } catch (InvocationTargetException e) {
      throw Interceptors.rethrow(e.getCause());
    }
  }
}
org.jboss.invocationInterceptorContextgetInvocationContext

Javadoc

Get the invocation context.

Popular methods of InterceptorContext

  • proceed
    Pass the invocation on to the next step in the chain.
  • getPrivateData
    Get a private data item. The key will be looked up by object identity, not by value.
  • setParameters
    Set the method parameters which are reported to the interceptor invocation context.
  • <init>
  • getMethod
    Get the invoked method which is reported to the interceptor invocation context.
  • getParameters
    Get the method parameters which are reported to the interceptor invocation context.
  • putPrivateData
    Insert a private data item. The key is used by object identity, not by value; in addition, if the ke
  • setContextData
    Set the context data which is reported to the interceptor invocation context.
  • setMethod
    Set the invoked method which is reported to the interceptor invocation context.
  • getTarget
    Get the invocation target which is reported to the interceptor invocation context.
  • getContextData
    Get the context data which is reported to the interceptor invocation context.
  • setTarget
    Set the invocation target which is reported to the interceptor invocation context.
  • getContextData,
  • setTarget,
  • clone,
  • setBlockingCaller,
  • setTimer,
  • setTransaction,
  • setTransactionSupplier,
  • getConstructor,
  • getInterceptors

Popular classes and methods

  • runOnUiThread (Activity)
  • scheduleAtFixedRate (Timer)
    Schedules the specified task for repeated fixed-rate execution, beginning after the specified delay.
  • getSystemService (Context)
  • Pointer (com.sun.jna)
    An abstraction for a native pointer data type. A Pointer instance represents, on the Java side, a na
  • Rectangle (java.awt)
  • BufferedWriter (java.io)
    Wraps an existing Writer and buffers the output. Expensive interaction with the underlying reader is
  • Permission (java.security)
    Abstract class for representing access to a system resource. All permissions have a name (whose inte
  • ResourceBundle (java.util)
    ResourceBundle is an abstract class which is the superclass of classes which provide Locale-specifi
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement.A servlet is a small Java program that runs within
  • ServletException (javax.servlet)
    Defines a general exception a servlet can throw when it encounters difficulty.

For IntelliJ IDEA,
Android Studio or Eclipse

  • Codota IntelliJ IDEA pluginCodota Android Studio pluginCode IndexSign in
  • EnterpriseFAQAboutContact Us
  • Terms of usePrivacy policyCodeboxFind Usages
Add Codota to your IDE (free)