org.apache.axis2.jaxws.addressing.migrator
Class EndpointContextMapMigrator

java.lang.Object
  extended by org.apache.axis2.jaxws.addressing.migrator.EndpointContextMapMigrator
All Implemented Interfaces:
ThreadContextMigrator

public class EndpointContextMapMigrator
extends java.lang.Object
implements ThreadContextMigrator

This class will enable the JAX-WS 2.1 API methods to create instances of EndpointReference that target a particular web service endpoint, identified by specifying the WSDL service name and port name of the endpoint, to work correctly. This is achieved by enabling the implementation of Axis2EndpointReferenceFactory to retrieve the context it needs from the invoking thread. The instances of EndpointReference that it produces can then converted to instances of EndpointReference, as needed.


Constructor Summary
EndpointContextMapMigrator()
           
 
Method Summary
 void cleanupContext(MessageContext messageContext)
          This method will be invoked when the processing of the message is guaranteed to be on the thread of execution that will be used in user space, after all processing has completed (i.e.
 void cleanupThread(MessageContext messageContext)
          This method will be invoked when the processing of the message is guaranteed to still be on the thread of execution that was used in user space, after all processing has completed (i.e.
 void migrateContextToThread(MessageContext messageContext)
          This method will be invoked when the processing of the message is guaranteed to be on the thread of execution that will be used in user space.
 void migrateThreadToContext(MessageContext messageContext)
          This method will be invoked when the processing of the message is guaranteed to still be on the thread of execution that was used in user space.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EndpointContextMapMigrator

public EndpointContextMapMigrator()
Method Detail

migrateContextToThread

public void migrateContextToThread(MessageContext messageContext)
                            throws AxisFault
Description copied from interface: ThreadContextMigrator
This method will be invoked when the processing of the message is guaranteed to be on the thread of execution that will be used in user space. It will be invoked for incoming messages. Implementations of this interface can use the information found in the MessageContext to determine whether a request or response is being processed. (e.g. MessageContext.getAxisOperation().getMessageExchangePattern())

Specified by:
migrateContextToThread in interface ThreadContextMigrator
Throws:
AxisFault

cleanupThread

public void cleanupThread(MessageContext messageContext)
Description copied from interface: ThreadContextMigrator
This method will be invoked when the processing of the message is guaranteed to still be on the thread of execution that was used in user space, after all processing has completed (i.e. when the particular processing of a message is unwinding.) It provides a mechanism which can be used to clean up the TLS.

Specified by:
cleanupThread in interface ThreadContextMigrator

migrateThreadToContext

public void migrateThreadToContext(MessageContext messageContext)
                            throws AxisFault
Description copied from interface: ThreadContextMigrator
This method will be invoked when the processing of the message is guaranteed to still be on the thread of execution that was used in user space. It will be invoked for both outgoing messages. Implementations of this interface can use the information found in the MessageContext to determine whether a request or response is being processed. (e.g. MessageContext.getAxisOperation().getMessageExchangePattern())

Specified by:
migrateThreadToContext in interface ThreadContextMigrator
Throws:
AxisFault

cleanupContext

public void cleanupContext(MessageContext messageContext)
Description copied from interface: ThreadContextMigrator
This method will be invoked when the processing of the message is guaranteed to be on the thread of execution that will be used in user space, after all processing has completed (i.e. when the particular processing of a message is unwinding.) It provides a mechanism which can be used to clean up the MessageContext or restore TLS.

Specified by:
cleanupContext in interface ThreadContextMigrator


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