org.apache.axis2.jaxws.server.dispatcher
Class ProviderDispatcher

java.lang.Object
  extended by org.apache.axis2.jaxws.server.dispatcher.JavaDispatcher
      extended by org.apache.axis2.jaxws.server.dispatcher.ProviderDispatcher
All Implemented Interfaces:
EndpointDispatcher

public class ProviderDispatcher
extends JavaDispatcher

The ProviderDispatcher is used to invoke instances of a target endpoint that implement the Provider interface.

The Provider is a generic class, with certain restrictions on the parameterized type T. This implementation supports the following types:

java.lang.String javax.activation.DataSource javax.xml.soap.SOAPMessage javax.xml.transform.Source


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.axis2.jaxws.server.dispatcher.JavaDispatcher
JavaDispatcher.AsyncInvocationWorker
 
Field Summary
 
Fields inherited from class org.apache.axis2.jaxws.server.dispatcher.JavaDispatcher
serviceImplClass, serviceInstance
 
Constructor Summary
ProviderDispatcher(java.lang.Class _class, java.lang.Object serviceInstance)
          Constructor
 
Method Summary
 MessageContext createFaultResponse(MessageContext request, java.lang.Throwable fault)
           
 java.lang.Object createRequestParameters(MessageContext request)
           
 MessageContext createResponse(MessageContext request, java.lang.Object[] input, java.lang.Object output)
           
protected  java.lang.reflect.Method getJavaMethod()
           
 Message getMessage()
          Get the parameter for a given endpoint invocation
 Provider getProvider()
          Get the endpoint provider instance
 MessageContext invoke(MessageContext request)
          Invoke the target endpoint synchronously
 void invokeAsync(MessageContext request, EndpointCallback callback)
           
 void invokeOneWay(MessageContext request)
           
 void setMessage(Message msg)
          Set the parameter for a given endpoint invocation
 void setProvider(Provider _provider)
          Set the endpoint provider instance
 
Methods inherited from class org.apache.axis2.jaxws.server.dispatcher.JavaDispatcher
getServiceImplementationClass, invokeTargetOperation, responseReady, setFaultResponseAction
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProviderDispatcher

public ProviderDispatcher(java.lang.Class _class,
                          java.lang.Object serviceInstance)
Constructor

Parameters:
_class -
serviceInstance -
Method Detail

invoke

public MessageContext invoke(MessageContext request)
                      throws java.lang.Exception
Description copied from interface: EndpointDispatcher
Invoke the target endpoint synchronously

Specified by:
invoke in interface EndpointDispatcher
Specified by:
invoke in class JavaDispatcher
Returns:
Throws:
java.lang.Exception

invokeOneWay

public void invokeOneWay(MessageContext request)
Specified by:
invokeOneWay in interface EndpointDispatcher
Specified by:
invokeOneWay in class JavaDispatcher

invokeAsync

public void invokeAsync(MessageContext request,
                        EndpointCallback callback)
Specified by:
invokeAsync in interface EndpointDispatcher
Specified by:
invokeAsync in class JavaDispatcher

createRequestParameters

public java.lang.Object createRequestParameters(MessageContext request)

createResponse

public MessageContext createResponse(MessageContext request,
                                     java.lang.Object[] input,
                                     java.lang.Object output)
Specified by:
createResponse in class JavaDispatcher

createFaultResponse

public MessageContext createFaultResponse(MessageContext request,
                                          java.lang.Throwable fault)
Specified by:
createFaultResponse in class JavaDispatcher

getProvider

public Provider getProvider()
                     throws java.lang.Exception
Get the endpoint provider instance

Returns:
Provider
Throws:
java.lang.Exception

setProvider

public void setProvider(Provider _provider)
Set the endpoint provider instance

Parameters:
_provider -

getMessage

public Message getMessage()
                   throws java.lang.Exception
Get the parameter for a given endpoint invocation

Returns:
Throws:
java.lang.Exception

setMessage

public void setMessage(Message msg)
Set the parameter for a given endpoint invocation

Parameters:
msg -

getJavaMethod

protected java.lang.reflect.Method getJavaMethod()


Copyright © 2007 Apache Web Services Project. All Rights Reserved.