org.apache.synapse
Class Axis2SynapseController

java.lang.Object
  extended by org.apache.synapse.Axis2SynapseController
All Implemented Interfaces:
SynapseController

public class Axis2SynapseController
extends Object
implements SynapseController

Axis2 Based Synapse Controller.

See Also:
SynapseController

Field Summary
protected  ServerConfigurationInformation serverConfigurationInformation
          ServerConfiguration Information
protected  ServerContextInformation serverContextInformation
          Runtime information about the server
protected  SynapseConfiguration synapseConfiguration
          Reference to the Synapse configuration
protected  SynapseEnvironment synapseEnvironment
          Reference to the Synapse configuration
 
Constructor Summary
Axis2SynapseController()
           
 
Method Summary
 SynapseConfiguration createSynapseConfiguration()
          Creates the Synapse configuration by reading and processing the synapse configuration file.
 SynapseEnvironment createSynapseEnvironment()
          Setup synapse in axis2 environment and return the created instance.
 void destroy()
          Destroys the Synapse Controller.
 void destroySynapseConfiguration()
          Destroys the SynapseConfiguration instance
 void destroySynapseEnvironment()
          Destroys the Synapse Environment by undeploying all Axis2 services.
 void endMaintenance()
          Recovers the Synapse Server from maintenance mode resuming transport listeners, senders and tasks.
 Object getContext()
          Returns underlying environment context
 void init(ServerConfigurationInformation serverConfigurationInformation, ServerContextInformation serverContextInformation)
          Initialization of the synapse controller
 boolean isInitialized()
          Explicitly checks the initialization.
 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
 void startMaintenance()
          Puts the Synapse Server into a maintenance mode pausing transport listeners, senders and tasks.
 void stop()
          Cleanup the axis2 environment and stop the synapse environment.
 boolean waitUntilSafeToStop(long waitIntervalMillis, long endTime)
          Waits until it is safe to stop or the the specified end time has been reached.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

synapseConfiguration

protected SynapseConfiguration synapseConfiguration
Reference to the Synapse configuration


synapseEnvironment

protected SynapseEnvironment synapseEnvironment
Reference to the Synapse configuration


serverConfigurationInformation

protected ServerConfigurationInformation serverConfigurationInformation
ServerConfiguration Information


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

createSynapseEnvironment

public SynapseEnvironment createSynapseEnvironment()
Setup synapse in axis2 environment and return the created instance.

Specified by:
createSynapseEnvironment in interface SynapseController
Returns:
SynapseEnvironment instance

destroySynapseEnvironment

public void destroySynapseEnvironment()
Destroys the Synapse Environment by undeploying all Axis2 services.

Specified by:
destroySynapseEnvironment in interface SynapseController

createSynapseConfiguration

public SynapseConfiguration createSynapseConfiguration()
Creates the Synapse configuration by reading and processing the synapse configuration file.

Specified by:
createSynapseConfiguration in interface SynapseController
Returns:
the synapse configuration

destroySynapseConfiguration

public void destroySynapseConfiguration()
Destroys the SynapseConfiguration instance

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)

getContext

public Object getContext()
Description copied from interface: SynapseController
Returns underlying environment context

Specified by:
getContext in interface SynapseController
Returns:
Underlying environment context


Copyright © 2005-2012 Apache Software Foundation. All Rights Reserved.