Package org.apache.axis2.util
Class ThreadContextMigratorUtil
java.lang.Object
org.apache.axis2.util.ThreadContextMigratorUtil
This is a utility class to make it easier/cleaner for user programming
model-level implementations (e.g. the Axis2 JAX-WS code) to invoke the
ThreadContextMigrators.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddThreadContextMigrator(ConfigurationContext configurationContext, String threadContextMigratorListID, ThreadContextMigrator migrator) Register a new ThreadContextMigrator.static voidaddThreadContextMigrator(AxisConfiguration axisConfiguration, String threadContextMigratorListID, ThreadContextMigrator migrator) Register a new ThreadContextMigrator.static voidperformContextCleanup(String threadContextMigratorListID, MessageContext msgContext) Activate any registered ThreadContextMigrators to remove information from the context if necessary.static voidperformMigrationToContext(String threadContextMigratorListID, MessageContext msgContext) Activate any registered ThreadContextMigrators to move info from the thread of execution into the context.static voidperformMigrationToThread(String threadContextMigratorListID, MessageContext msgContext) Activate any registered ThreadContextMigrators to move context info to the thread of execution.static voidperformThreadCleanup(String threadContextMigratorListID, MessageContext msgContext) Activate any registered ThreadContextMigrators to remove information from the thread of execution if necessary.
-
Constructor Details
-
ThreadContextMigratorUtil
public ThreadContextMigratorUtil()
-
-
Method Details
-
addThreadContextMigrator
public static void addThreadContextMigrator(ConfigurationContext configurationContext, String threadContextMigratorListID, ThreadContextMigrator migrator) throws AxisFault Register a new ThreadContextMigrator.- Parameters:
configurationContext-threadContextMigratorListID- The name of the parameter in the AxisConfiguration that contains the list of migrators.migrator-- Throws:
AxisFault
-
addThreadContextMigrator
public static void addThreadContextMigrator(AxisConfiguration axisConfiguration, String threadContextMigratorListID, ThreadContextMigrator migrator) throws AxisFault Register a new ThreadContextMigrator.- Parameters:
axisConfiguration-threadContextMigratorListID- The name of the parameter in the AxisConfiguration that contains the list of migrators.migrator-- Throws:
AxisFault
-
performMigrationToThread
public static void performMigrationToThread(String threadContextMigratorListID, MessageContext msgContext) throws AxisFault Activate any registered ThreadContextMigrators to move context info to the thread of execution.- Parameters:
threadContextMigratorListID- The name of the parameter in the AxisConfiguration that contains the list of migrators.msgContext-- Throws:
AxisFault
-
performThreadCleanup
public static void performThreadCleanup(String threadContextMigratorListID, MessageContext msgContext) Activate any registered ThreadContextMigrators to remove information from the thread of execution if necessary.- Parameters:
threadContextMigratorListID- The name of the parameter in the AxisConfiguration that contains the list of migrators.msgContext-
-
performMigrationToContext
public static void performMigrationToContext(String threadContextMigratorListID, MessageContext msgContext) throws AxisFault Activate any registered ThreadContextMigrators to move info from the thread of execution into the context.- Parameters:
threadContextMigratorListID- The name of the parameter in the AxisConfiguration that contains the list of migrators.msgContext-- Throws:
AxisFault
-
performContextCleanup
public static void performContextCleanup(String threadContextMigratorListID, MessageContext msgContext) Activate any registered ThreadContextMigrators to remove information from the context if necessary.- Parameters:
threadContextMigratorListID- The name of the parameter in the AxisConfiguration that contains the list of migrators.msgContext-
-