Class ThreadContextMigratorUtil


  • public class ThreadContextMigratorUtil
    extends Object
    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 Detail

      • ThreadContextMigratorUtil

        public ThreadContextMigratorUtil()
    • Method Detail

      • 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 -