Class EndpointContextMapMigrator
- java.lang.Object
-
- org.apache.axis2.jaxws.addressing.migrator.EndpointContextMapMigrator
-
- All Implemented Interfaces:
ThreadContextMigrator
public class EndpointContextMapMigrator extends Object implements ThreadContextMigrator
This class will enable the JAX-WS 2.1 API methods to create instances ofEndpointReference
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 ofAxis2EndpointReferenceFactory
to retrieve the context it needs from the invoking thread. The instances ofEndpointReference
that it produces can then converted to instances ofEndpointReference
, as needed.
-
-
Constructor Summary
Constructors Constructor Description EndpointContextMapMigrator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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. when the particular processing of a message is unwinding.)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. when the particular processing of a message is unwinding.)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.
-
-
-
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 interfaceThreadContextMigrator
- 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 interfaceThreadContextMigrator
-
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 interfaceThreadContextMigrator
- 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 interfaceThreadContextMigrator
-
-