Search in sources :

Example 1 with SimpleInterceptorFactoryContext

use of org.jboss.invocation.SimpleInterceptorFactoryContext in project wildfly by wildfly.

the class BasicComponent method start.

/**
     * {@inheritDoc}
     */
public synchronized void start() {
    final InterceptorFactoryContext context = new SimpleInterceptorFactoryContext();
    context.getContextData().put(Component.class, this);
    createInterceptors(context);
    this.stopping.set(false);
    gate = true;
    notifyAll();
}
Also used : SimpleInterceptorFactoryContext(org.jboss.invocation.SimpleInterceptorFactoryContext) SimpleInterceptorFactoryContext(org.jboss.invocation.SimpleInterceptorFactoryContext) InterceptorFactoryContext(org.jboss.invocation.InterceptorFactoryContext)

Example 2 with SimpleInterceptorFactoryContext

use of org.jboss.invocation.SimpleInterceptorFactoryContext in project wildfly by wildfly.

the class TimedObjectInvokerImpl method start.

@Override
public synchronized void start(final StartContext context) throws StartException {
    SimpleInterceptorFactoryContext factoryContext = new SimpleInterceptorFactoryContext();
    factoryContext.getContextData().put(Component.class, ejbComponent.getValue());
    Map<Method, Interceptor> interceptors = new HashMap<Method, Interceptor>();
    for (Map.Entry<Method, InterceptorFactory> entry : ejbComponent.getValue().getTimeoutInterceptors().entrySet()) {
        interceptors.put(entry.getKey(), entry.getValue().create(factoryContext));
    }
    this.timeoutInterceptors = interceptors;
    started = true;
}
Also used : SimpleInterceptorFactoryContext(org.jboss.invocation.SimpleInterceptorFactoryContext) InterceptorFactory(org.jboss.invocation.InterceptorFactory) HashMap(java.util.HashMap) Method(java.lang.reflect.Method) Interceptor(org.jboss.invocation.Interceptor) HashMap(java.util.HashMap) Map(java.util.Map)

Example 3 with SimpleInterceptorFactoryContext

use of org.jboss.invocation.SimpleInterceptorFactoryContext in project wildfly by wildfly.

the class ViewService method start.

public void start(final StartContext context) throws StartException {
    // Construct the view
    View view = new View(privateData);
    view.initializeInterceptors();
    this.view = view;
    final SimpleInterceptorFactoryContext factoryContext = new SimpleInterceptorFactoryContext();
    final Component component = view.getComponent();
    factoryContext.getContextData().put(Component.class, component);
    factoryContext.getContextData().put(ComponentView.class, view);
    clientPostConstructInterceptor = clientPostConstruct.create(factoryContext);
    clientPreDestroyInterceptor = clientPreDestroy.create(factoryContext);
    final Map<Method, InterceptorFactory> clientInterceptorFactories = ViewService.this.clientInterceptorFactories;
    clientInterceptors = new IdentityHashMap<Method, Interceptor>(clientInterceptorFactories.size());
    for (Method method : clientInterceptorFactories.keySet()) {
        clientInterceptors.put(method, clientInterceptorFactories.get(method).create(factoryContext));
    }
}
Also used : SimpleInterceptorFactoryContext(org.jboss.invocation.SimpleInterceptorFactoryContext) InterceptorFactory(org.jboss.invocation.InterceptorFactory) Method(java.lang.reflect.Method) Interceptor(org.jboss.invocation.Interceptor)

Example 4 with SimpleInterceptorFactoryContext

use of org.jboss.invocation.SimpleInterceptorFactoryContext in project wildfly by wildfly.

the class BasicComponent method init.

public synchronized void init() {
    final InterceptorFactoryContext context = new SimpleInterceptorFactoryContext();
    context.getContextData().put(Component.class, this);
    createInterceptors(context);
}
Also used : SimpleInterceptorFactoryContext(org.jboss.invocation.SimpleInterceptorFactoryContext) SimpleInterceptorFactoryContext(org.jboss.invocation.SimpleInterceptorFactoryContext) InterceptorFactoryContext(org.jboss.invocation.InterceptorFactoryContext)

Aggregations

SimpleInterceptorFactoryContext (org.jboss.invocation.SimpleInterceptorFactoryContext)4 Method (java.lang.reflect.Method)2 Interceptor (org.jboss.invocation.Interceptor)2 InterceptorFactory (org.jboss.invocation.InterceptorFactory)2 InterceptorFactoryContext (org.jboss.invocation.InterceptorFactoryContext)2 HashMap (java.util.HashMap)1 Map (java.util.Map)1