Class Axis2SynapseController

    • Field Detail

      • synapseConfiguration

        protected SynapseConfiguration synapseConfiguration
        Reference to the Synapse configuration
      • synapseEnvironment

        protected SynapseEnvironment synapseEnvironment
        Reference to the Synapse configuration
      • serverContextInformation

        protected ServerContextInformation serverContextInformation
        Runtime information about the server
    • Constructor Detail

      • Axis2SynapseController

        public Axis2SynapseController()
    • Method Detail

      • init

        public void init​(ServerConfigurationInformation serverConfigurationInformation,
                         ServerContextInformation serverContextInformation)
        Initialization of the synapse controller
        Specified by:
        init in interface SynapseController
        Parameters:
        serverConfigurationInformation - ServerConfigurationInformation Instance
        serverContextInformation - Server Context if the Axis2 Based Server Environment has been already set up.
      • destroy

        public void destroy()
        Destroys the Synapse Controller.
        Specified by:
        destroy in interface SynapseController
      • isInitialized

        public boolean isInitialized()
        Explicitly checks the initialization.
        Specified by:
        isInitialized in interface SynapseController
        Returns:
        true if the initialization has been a success.
      • start

        public void start()
        Adds the synapse handlers to the inflow Dispatch phase and starts the listener manager if the axis2 instance is created by the Synapse
        Specified by:
        start in interface SynapseController
      • startMaintenance

        public void startMaintenance()
        Puts the Synapse Server into a maintenance mode pausing transport listeners, senders and tasks.
        Specified by:
        startMaintenance in interface SynapseController
      • endMaintenance

        public void endMaintenance()
        Recovers the Synapse Server from maintenance mode resuming transport listeners, senders and tasks.
        Specified by:
        endMaintenance in interface SynapseController
      • stop

        public void stop()
        Cleanup the axis2 environment and stop the synapse environment.
        Specified by:
        stop in interface SynapseController
      • destroySynapseEnvironment

        public void destroySynapseEnvironment()
        Destroys the Synapse Environment by undeploying all Axis2 services.
        Specified by:
        destroySynapseEnvironment in interface SynapseController
      • destroySynapseConfiguration

        public void destroySynapseConfiguration​(boolean preserveState)
        Destroys the SynapseConfiguration instance, but preservers the artifacts state based on @param preserveState
        Specified by:
        destroySynapseConfiguration in interface SynapseController
      • waitUntilSafeToStop

        public boolean waitUntilSafeToStop​(long waitIntervalMillis,
                                           long endTime)
        Waits until it is safe to stop or the the specified end time has been reached. A delay of waitIntervalMillis milliseconds is used between each subsequent check. If the state "safeToStop" is reached before the specified endTime, the return value is true.
        Specified by:
        waitUntilSafeToStop in interface SynapseController
        Parameters:
        waitIntervalMillis - the pause time (delay) in milliseconds between subsequent checks
        endTime - the time until which the checks need to finish successfully
        Returns:
        true, if a safe state is reached before the specified endTime, otherwise false (forceful stop required)