org.apache.synapse
Interface SynapseController

All Known Implementing Classes:
Axis2SynapseController

public interface SynapseController

The controller for synapse Create, Start, Stop and Destroy synapse artifacts in a particular environment


Method Summary
 SynapseConfiguration createSynapseConfiguration()
          Creates the Synapse configuration by reading and processing the synapse configuration file.
 SynapseEnvironment createSynapseEnvironment()
          Creates the SynapseEnvironment instance.
 void destroy()
          Destroys the Synapse Controller.
 void destroySynapseConfiguration()
          Destroys the SynapseConfiguration instance
 void destroySynapseEnvironment()
          Destroys the SynapseEnvironment instance.
 void endMaintenance()
          Recovers the Synapse Server from maintenance mode resuming transport listeners, senders and tasks.
 Object getContext()
          Returns underlying environment context
 void init(ServerConfigurationInformation configurationInformation, ServerContextInformation contextInformation)
          Initialization of the synapse controller
 boolean isInitialized()
          Explicitly checks the initialization.
 void start()
          Starts the synapse controller and in turn the synapse server.
 void startMaintenance()
          Puts the Synapse Server into a maintenance mode pausing transport listeners, senders and tasks.
 void stop()
          Stops the synapse controller and in turn the synapse server.
 boolean waitUntilSafeToStop(long waitIntervalMillis, long endTime)
          Waits until it is safe to stop or the specified end time has been reached.
 

Method Detail

init

void init(ServerConfigurationInformation configurationInformation,
          ServerContextInformation contextInformation)
Initialization of the synapse controller

Parameters:
configurationInformation - server information instance Information about the server
contextInformation - if there is a context already has been built.

destroy

void destroy()
Destroys the Synapse Controller.


isInitialized

boolean isInitialized()
Explicitly checks the initialization.

Returns:
true if the initialization has been a success.

start

void start()
Starts the synapse controller and in turn the synapse server.


stop

void stop()
Stops the synapse controller and in turn the synapse server.


createSynapseEnvironment

SynapseEnvironment createSynapseEnvironment()
Creates the SynapseEnvironment instance.

Returns:
SynapseEnvironment instance if success

destroySynapseEnvironment

void destroySynapseEnvironment()
Destroys the SynapseEnvironment instance.


createSynapseConfiguration

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

Returns:
the synapse configuration

destroySynapseConfiguration

void destroySynapseConfiguration()
Destroys the SynapseConfiguration instance


getContext

Object getContext()
Returns underlying environment context

Returns:
Underlying environment context

startMaintenance

void startMaintenance()
Puts the Synapse Server into a maintenance mode pausing transport listeners, senders and tasks.


endMaintenance

void endMaintenance()
Recovers the Synapse Server from maintenance mode resuming transport listeners, senders and tasks.


waitUntilSafeToStop

boolean waitUntilSafeToStop(long waitIntervalMillis,
                            long endTime)
Waits until it is safe to stop or 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.

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)


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