Invocation API 1.1.0.Final

org.jboss.invocation
Class MethodInvokingInterceptor

java.lang.Object
  extended by org.jboss.invocation.MethodInvokingInterceptor
All Implemented Interfaces:
Interceptor

public final class MethodInvokingInterceptor
extends Object
implements Interceptor

An interceptor which always invokes one specific method on one specific object given the parameters from the invocation context.

Author:
David M. Lloyd

Constructor Summary
MethodInvokingInterceptor(Object target, Method method)
          Construct a new instance.
 
Method Summary
 Object processInvocation(InterceptorContext context)
          Process an invocation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MethodInvokingInterceptor

public MethodInvokingInterceptor(Object target,
                                 Method method)
Construct a new instance.

Parameters:
target - the object upon which invocation should take place
method - the method to invoke
Method Detail

processInvocation

public Object processInvocation(InterceptorContext context)
                         throws Exception
Process an invocation. The invocation can be handled directly, or passed on to the next processor in the chain.

Specified by:
processInvocation in interface Interceptor
Parameters:
context - the interceptor context
Returns:
the result of the invocation
Throws:
Exception - If the underlying invocation resulted in some exception

Invocation API 1.1.0.Final

Copyright © 2011 JBoss, a division of Red Hat, Inc.. All Rights Reserved.