Package 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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description 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 instancevoid
destroySynapseConfiguration(boolean preserveState)
Destroys the SynapseConfiguration instance, but preservers the artifacts state based on @param preserveStatevoid
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 contextvoid
init(ServerConfigurationInformation configurationInformation, ServerContextInformation contextInformation)
Initialization of the synapse controllerboolean
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 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 ofwaitIntervalMillis
milliseconds 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)
-
-