org.apache.webbeans.intercept
Class DefaultInterceptorHandler<T>

java.lang.Object
  extended by org.apache.webbeans.intercept.DefaultInterceptorHandler<T>
All Implemented Interfaces:
Externalizable, Serializable, InterceptorHandler

public class DefaultInterceptorHandler<T>
extends Object
implements InterceptorHandler, Externalizable

See Also:
Serialized Form

Constructor Summary
DefaultInterceptorHandler()
           
DefaultInterceptorHandler(T target, T delegate, Map<Method,List<Interceptor<?>>> interceptors, Map<Interceptor<?>,?> instances, String beanPassivationId)
          InterceptorHandler wich gets used in our InjectionTargets which support interceptors and decorators
 
Method Summary
 T getDelegate()
           
 Map<Interceptor<?>,?> getInstances()
           
 Map<Method,List<Interceptor<?>>> getInterceptors()
           
 T getTarget()
           
 Object invoke(Method method, Object[] parameters)
          This method will get called whenever the proxy of the intercepted instance will get invoked.
 void readExternal(ObjectInput in)
           
 void writeExternal(ObjectOutput out)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultInterceptorHandler

public DefaultInterceptorHandler(T target,
                                 T delegate,
                                 Map<Method,List<Interceptor<?>>> interceptors,
                                 Map<Interceptor<?>,?> instances,
                                 String beanPassivationId)
InterceptorHandler wich gets used in our InjectionTargets which support interceptors and decorators

Parameters:
target - the decorated and intercepted instance. Needed for delivering Events to private methods, etc.
delegate - the outermost Decorator or the intercepted instance
interceptors - Map with all active interceptors for each method.
instances - the Interceptor instances
beanPassivationId - passivationId if a Bean is PassivationCapable

DefaultInterceptorHandler

public DefaultInterceptorHandler()
Method Detail

getTarget

public T getTarget()

getDelegate

public T getDelegate()

getInstances

public Map<Interceptor<?>,?> getInstances()

getInterceptors

public Map<Method,List<Interceptor<?>>> getInterceptors()

invoke

public Object invoke(Method method,
                     Object[] parameters)
Description copied from interface: InterceptorHandler
This method will get called whenever the proxy of the intercepted instance will get invoked.

Specified by:
invoke in interface InterceptorHandler
Parameters:
method - Method which should get invoked
parameters - original invocation parameters
Returns:
the return value of the intercepted methos

writeExternal

public void writeExternal(ObjectOutput out)
                   throws IOException
Specified by:
writeExternal in interface Externalizable
Throws:
IOException

readExternal

public void readExternal(ObjectInput in)
                  throws IOException,
                         ClassNotFoundException
Specified by:
readExternal in interface Externalizable
Throws:
IOException
ClassNotFoundException


Copyright © 2008–2014 The Apache Software Foundation. All rights reserved.