org.apache.cxf.jca.servant
Class AbstractServant

java.lang.Object
  extended by org.apache.cxf.jca.servant.AbstractServant
All Implemented Interfaces:
java.lang.reflect.InvocationHandler
Direct Known Subclasses:
EJBServant

public abstract class AbstractServant
extends java.lang.Object
implements java.lang.reflect.InvocationHandler

The base class for all Servant implementations. A Servant defines the endpoint of an invocation and is usually used to wrap an instance of a Java class.


Constructor Summary
AbstractServant(java.lang.String wsdlLoc, org.apache.cxf.Bus bus)
          Constructs a new Servant with the specified WSDL and Bus.
 
Method Summary
 org.apache.cxf.Bus getBus()
          The Bus ultimately used to register the Servant.
abstract  java.lang.Object getTargetObject()
          The method to obtain a reference to the instance that will be used for an invocation.
 java.lang.String getWSDLLocation()
          Return the location of the WSDL file describing the service this servant implements.
abstract  java.lang.Object invoke(java.lang.Object target, java.lang.reflect.Method method, java.lang.Object[] args)
          Defines the actual invocation methodology.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractServant

public AbstractServant(java.lang.String wsdlLoc,
                       org.apache.cxf.Bus bus)
Constructs a new Servant with the specified WSDL and Bus.

Parameters:
wsdlLoc - A string containing the location of the wsdl file.
bus - The Bus used to register this servant.
Method Detail

getTargetObject

public abstract java.lang.Object getTargetObject()
                                          throws org.apache.cxf.BusException
The method to obtain a reference to the instance that will be used for an invocation.

Returns:
Object The target of the invocation.
Throws:
org.apache.cxf.BusException - If there is an error getting the target object.

invoke

public abstract java.lang.Object invoke(java.lang.Object target,
                                        java.lang.reflect.Method method,
                                        java.lang.Object[] args)
                                 throws java.lang.Throwable
Defines the actual invocation methodology.

Specified by:
invoke in interface java.lang.reflect.InvocationHandler
Parameters:
target - The Object that is the target object of the invocation.
method - A Method representing the method being invoked.
args - An Object[] representing the invocation parameters.
Returns:
Object The return value of the target invocation.
Throws:
org.apache.cxf.BusException - If there is an error invoking the specified method.
java.lang.Throwable

getWSDLLocation

public java.lang.String getWSDLLocation()
Return the location of the WSDL file describing the service this servant implements.

Returns:
String A string containing the location of the WSDL file used by this Servant.

getBus

public org.apache.cxf.Bus getBus()
The Bus ultimately used to register the Servant.

Returns:
Bus The Bus used to register this servant.


Copyright © 2006 Apache Software Foundation. All Rights Reserved.