Package org.apache.synapse
Interface SynapseController
-
- All Known Implementing Classes:
Axis2SynapseController
public interface SynapseControllerThe controller for synapse Create, Start, Stop and Destroy synapse artifacts in a particular environment
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description SynapseConfigurationcreateSynapseConfiguration()Creates the Synapse configuration by reading and processing the synapse configuration file.SynapseEnvironmentcreateSynapseEnvironment()Creates the SynapseEnvironment instance.voiddestroy()Destroys the Synapse Controller.voiddestroySynapseConfiguration()Destroys the SynapseConfiguration instancevoiddestroySynapseConfiguration(boolean preserveState)Destroys the SynapseConfiguration instance, but preservers the artifacts state based on @param preserveStatevoiddestroySynapseEnvironment()Destroys the SynapseEnvironment instance.voidendMaintenance()Recovers the Synapse Server from maintenance mode resuming transport listeners, senders and tasks.ObjectgetContext()Returns underlying environment contextvoidinit(ServerConfigurationInformation configurationInformation, ServerContextInformation contextInformation)Initialization of the synapse controllerbooleanisInitialized()Explicitly checks the initialization.voidstart()Starts the synapse controller and in turn the synapse server.voidstartMaintenance()Puts the Synapse Server into a maintenance mode pausing transport listeners, senders and tasks.voidstop()Stops the synapse controller and in turn the synapse server.booleanwaitUntilSafeToStop(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 servercontextInformation- 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(boolean preserveState)
Destroys the SynapseConfiguration instance, but preservers the artifacts state based on @param preserveState
-
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 ofwaitIntervalMillismilliseconds is used between each subsequent check. If the state "safeToStop" is reached before the specifiedendTime, the return value is true.- Parameters:
waitIntervalMillis- the pause time (delay) in milliseconds between subsequent checksendTime- 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)
-
-