Interface EmbeddedDiffusion
- All Known Implementing Classes:
- DiffusionServer
public interface EmbeddedDiffusion
Represents an instance of the Diffusion Server.
 
 When a server is instantiated it will attempt to load any XML configuration
 files that it finds on the classpath (or in the specified directory). If no
 XML files are found, the server will be loaded with default (empty)
 configuration and will have to be configured before starting it.
 
 The server may be configured by getting the root configuration using the
 
getConfig() and then configuring any aspects that are required.
 
 Once the server has been started, most aspects of the configuration can no
 longer be changed.
 
 Currently only one instance of the Diffusion Server can ever be instantiated
 in a VM. Once one has been instantiated another can not be. Once a server has
 been stopped it may not be restarted nor another instantiated. These
 restrictions may be removed at a future release.- Since:
- 5.6
- 
Nested Class SummaryNested ClassesModifier and TypeInterfaceDescriptionstatic interfaceListener interface that is invoked when server state changes occur.static enumDiffusion lifecycle state.
- 
Method Summary
- 
Method Details- 
getConfigServerConfig getConfig()Returns the root server configuration. This may be called before starting the server to configure it or provide further configuration over and above that loaded from any XML properties files found (either on the classpath or the specified directory).- Returns:
- configuration root
 
- 
isStartedboolean isStarted()- Returns:
- whether or not the server has started
 
- 
isStoppedboolean isStopped()- Returns:
- whether or not the server has stopped
 
- 
startStarts the server. The server may only be started once.- Throws:
- APIException- if unable to start
 
- 
stopvoid stop()Stops the server.
- 
addLifecycleListenerRegister for lifecycle events.- Parameters:
- listener- that is called when a state transition occurs.
- Since:
- 5.6
 
- 
removeLifecycleListenerDe-Register for lifecycle events.- Parameters:
- listener- to be removed.
- Since:
- 5.6
 
 
-