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

java.lang.Object
  extended by org.apache.axis2.jaxws.server.dispatcher.JavaDispatcher
All Implemented Interfaces:
EndpointDispatcher
Direct Known Subclasses:
JavaBeanDispatcher, ProviderDispatcher

public abstract class JavaDispatcher
extends Object
implements EndpointDispatcher

JavaDispatcher is an abstract class that can be extended to implement an EndpointDispatcher to a Java object.


Nested Class Summary
protected  class JavaDispatcher.AsyncInvocationWorker
           
 
Field Summary
protected  Class serviceImplClass
           
protected  Object serviceInstance
           
 
Constructor Summary
protected JavaDispatcher(Class impl, Object serviceInstance)
           
 
Method Summary
protected abstract  MessageContext createFaultResponse(MessageContext request, Throwable fault)
           
protected abstract  MessageContext createResponse(MessageContext request, Object[] input, Object output)
           
 Class getServiceImplementationClass()
           
abstract  MessageContext invoke(MessageContext request)
          Invoke the target endpoint synchronously
abstract  void invokeAsync(MessageContext request, EndpointCallback callback)
           
abstract  void invokeOneWay(MessageContext request)
           
protected  Object invokeTargetOperation(Method method, Object[] args)
           
protected  void responseReady(EndpointInvocationContext eic)
          This will call the InvocationListener instances that were called during the request processing for this message.
protected static void setCheckedExceptionProperty(MessageContext response, Method m, Throwable t)
          Determine if the thrown exception is a checked exception.
protected static void setExceptionProperties(MessageContext response, Method m, Throwable t)
          Information about the exception is stored on the outbound response context
protected static void setFaultResponseAction(Throwable exception, MessageContext request, MessageContext response)
           
protected static void setWebMethodExceptionProperty(MessageContext response, Throwable t)
          Store the actual exception on the response context
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serviceImplClass

protected Class serviceImplClass

serviceInstance

protected Object serviceInstance
Constructor Detail

JavaDispatcher

protected JavaDispatcher(Class impl,
                         Object serviceInstance)
Method Detail

invoke

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

Specified by:
invoke in interface EndpointDispatcher
Returns:
Throws:
Exception

invokeOneWay

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

invokeAsync

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

createResponse

protected abstract MessageContext createResponse(MessageContext request,
                                                 Object[] input,
                                                 Object output)

createFaultResponse

protected abstract MessageContext createFaultResponse(MessageContext request,
                                                      Throwable fault)

getServiceImplementationClass

public Class getServiceImplementationClass()

invokeTargetOperation

protected Object invokeTargetOperation(Method method,
                                       Object[] args)
                                throws Throwable
Throws:
Throwable

responseReady

protected void responseReady(EndpointInvocationContext eic)
This will call the InvocationListener instances that were called during the request processing for this message.


setFaultResponseAction

protected static void setFaultResponseAction(Throwable exception,
                                             MessageContext request,
                                             MessageContext response)

setCheckedExceptionProperty

protected static void setCheckedExceptionProperty(MessageContext response,
                                                  Method m,
                                                  Throwable t)
Determine if the thrown exception is a checked exception. If so, then set the name of the checked exception on the response context

Parameters:
response - MessageContext
m - Method
t - Throwable

setWebMethodExceptionProperty

protected static void setWebMethodExceptionProperty(MessageContext response,
                                                    Throwable t)
Store the actual exception on the response context

Parameters:
response - MessageContext
t - Throwable

setExceptionProperties

protected static void setExceptionProperties(MessageContext response,
                                             Method m,
                                             Throwable t)
Information about the exception is stored on the outbound response context

Parameters:
response - MessageContext
m - Method
t - Throwable


Copyright © 2004-2012 The Apache Software Foundation. All Rights Reserved.