org.codehaus.xfire.service.invoker
Class AbstractInvoker

java.lang.Object
  extended by org.codehaus.xfire.service.invoker.AbstractInvoker
All Implemented Interfaces:
Invoker
Direct Known Subclasses:
BeanInvoker, FactoryInvoker, ObjectInvoker

public abstract class AbstractInvoker
extends java.lang.Object
implements Invoker

Abstract implementation of Invoker.

Author:
Ben Yu Feb 10, 2006 10:57:23 PM

Constructor Summary
AbstractInvoker()
           
 
Method Summary
static MessageContext getContext()
           
static java.lang.reflect.Method getMostSpecificMethod(java.lang.reflect.Method method, java.lang.Class targetClass)
          Given a method, which may come from an interface, and a targetClass used in the current AOP invocation, find the most specific method if there is one.
abstract  java.lang.Object getServiceObject(MessageContext context)
          Creates and returns a service object depending on the scope.
 java.lang.Object invoke(java.lang.reflect.Method method, java.lang.Object[] params, MessageContext context)
           
static boolean isJdkDynamicProxy(java.lang.Object object)
          Return whether the given object is a J2SE dynamic proxy.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractInvoker

public AbstractInvoker()
Method Detail

invoke

public java.lang.Object invoke(java.lang.reflect.Method method,
                               java.lang.Object[] params,
                               MessageContext context)
                        throws XFireFault
Specified by:
invoke in interface Invoker
Throws:
XFireFault

getServiceObject

public abstract java.lang.Object getServiceObject(MessageContext context)
                                           throws XFireFault
Creates and returns a service object depending on the scope.

Throws:
XFireFault

isJdkDynamicProxy

public static boolean isJdkDynamicProxy(java.lang.Object object)
Return whether the given object is a J2SE dynamic proxy.

Parameters:
object - the object to check
See Also:
Proxy.isProxyClass(java.lang.Class)

getMostSpecificMethod

public static java.lang.reflect.Method getMostSpecificMethod(java.lang.reflect.Method method,
                                                             java.lang.Class targetClass)
Given a method, which may come from an interface, and a targetClass used in the current AOP invocation, find the most specific method if there is one. E.g. the method may be IFoo.bar() and the target class may be DefaultFoo. In this case, the method may be DefaultFoo.bar(). This enables attributes on that method to be found.

Parameters:
method - method to be invoked, which may come from an interface
targetClass - target class for the curren invocation. May be null or may not even implement the method.
Returns:
the more specific method, or the original method if the targetClass doesn't specialize it or implement it or is null

getContext

public static MessageContext getContext()
Returns:


Copyright © 2004-2009. All Rights Reserved.