|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ConfigurationService
The interface of the Configuration service that handles the configuration of the local PEtALS container.
Field Summary | |
---|---|
static String |
COMPONENT_LOGGER_NAME
|
static String |
JAAS_PROPS_FILE
|
static String |
MASTER
|
static String |
PEER
|
static String |
PROPERTY_REGISTRY_MODE
|
static String |
SLAVE
|
static String |
STANDALONE
|
Method Summary | |
---|---|
void |
addContainerConfiguration(org.ow2.petals.clientserverapi.configuration.ContainerConfiguration addedContainer)
Registers a new container configuration within the local configuration. |
void |
addSubdomainConfiguration(SubDomainConfiguration addedSubdomain)
Registers a new subdomain within the local topology. |
Map<String,String> |
getAllServerProperties()
Get the local server properties (ie. content of the file ' server.properties ' or equivalent), including properties
not configured (ie. set to a null value). |
org.ow2.petals.clientserverapi.configuration.ContainerConfiguration |
getContainerConfiguration()
Get the local container configuration. |
org.ow2.petals.clientserverapi.configuration.ContainerConfiguration |
getContainerConfiguration(String containerName)
Get the container configuration. |
Set<org.ow2.petals.clientserverapi.configuration.ContainerConfiguration> |
getContainersConfiguration()
Get the containers configuration. |
DomainConfiguration |
getDomainConfiguration()
Get the domain configuration the local container belongs to. |
Properties |
getServerProperties()
Get the local server properties (ie. content of the file ' server.properties ' or equivalent), including only
properties configured (ie. set to a non null value). |
SubDomainConfiguration |
getSubDomainConfiguration()
Get the sub domain configuration the local container belongs to. |
Set<SubDomainConfiguration> |
getSubDomainsConfiguration()
Get the subdomains configuration. |
org.ow2.petals.topology.generated.Topology |
getTopology()
Get the current topology. |
void |
loadConfiguration(Properties serverLocalProperties,
org.ow2.petals.topology.generated.Topology topology)
Create the container configuration based on the topology and server configuration properties. |
void |
removeContainerConfiguration(org.ow2.petals.clientserverapi.configuration.ContainerConfiguration removedContainer)
Unregisters the subdomain within the local topology. |
void |
removeSubdomainConfiguration(String removedSubdomain)
Unregister a subdomain within the local topology. |
void |
setContainerState(org.ow2.petals.clientserverapi.configuration.ContainerConfiguration.ContainerState state)
Set the running state of the local container. |
void |
validateDynamicTopology()
Validate the dynamic topology |
void |
verifyContainerTopology(org.ow2.petals.clientserverapi.configuration.ContainerConfiguration newContainerConfiguration,
SubDomainConfiguration newSubDomainConfiguration,
DomainConfiguration newDomainConfiguration)
Verify the given containerConfiguration against the topology
configuration. |
Field Detail |
---|
static final String COMPONENT_LOGGER_NAME
static final String JAAS_PROPS_FILE
static final String PROPERTY_REGISTRY_MODE
static final String STANDALONE
static final String PEER
static final String MASTER
static final String SLAVE
Method Detail |
---|
org.ow2.petals.clientserverapi.configuration.ContainerConfiguration getContainerConfiguration()
Map<String,String> getAllServerProperties()
Get the local server properties (ie. content of the file '
server.properties
' or equivalent), including properties
not configured (ie. set to a null
value).
Note: local server properties are provided as a Map
instead of
Properties
to be able to put null
values.
Properties getServerProperties()
Get the local server properties (ie. content of the file '
server.properties
' or equivalent), including only
properties configured (ie. set to a non null
value).
Set<org.ow2.petals.clientserverapi.configuration.ContainerConfiguration> getContainersConfiguration()
Set<SubDomainConfiguration> getSubDomainsConfiguration()
SubDomainConfiguration getSubDomainConfiguration()
DomainConfiguration getDomainConfiguration()
org.ow2.petals.topology.generated.Topology getTopology() throws ConfigurationException
ConfigurationException
void setContainerState(org.ow2.petals.clientserverapi.configuration.ContainerConfiguration.ContainerState state)
state
- ContainerConfiguration.ContainerState
void verifyContainerTopology(org.ow2.petals.clientserverapi.configuration.ContainerConfiguration newContainerConfiguration, SubDomainConfiguration newSubDomainConfiguration, DomainConfiguration newDomainConfiguration) throws InconsistentConfigurationException
containerConfiguration
against the topology
configuration.
newContainerConfiguration
- The new container configurationnewSubDomainConfiguration
- The new sub-domain configurationnewDomainConfiguration
- The new domain configuration
InconsistentConfigurationException
- Inconsistency between the topology configuration and the new
container configurationorg.ow2.petals.clientserverapi.configuration.ContainerConfiguration getContainerConfiguration(String containerName)
containerName
- the name of the container to get configuration from. If null,
returns the local container configuration.
void addContainerConfiguration(org.ow2.petals.clientserverapi.configuration.ContainerConfiguration addedContainer) throws ConfigurationException
addedContainer
- the container to be registered
ConfigurationException
void removeContainerConfiguration(org.ow2.petals.clientserverapi.configuration.ContainerConfiguration removedContainer) throws ConfigurationException
removedContainer
-
ConfigurationException
void addSubdomainConfiguration(SubDomainConfiguration addedSubdomain) throws ConfigurationException
addedSubdomain
-
ConfigurationException
void removeSubdomainConfiguration(String removedSubdomain) throws ConfigurationException
removedSubdomain
-
ConfigurationException
void validateDynamicTopology() throws ConfigurationException
ConfigurationException
void loadConfiguration(Properties serverLocalProperties, org.ow2.petals.topology.generated.Topology topology) throws ConfigurationException
Create the container configuration based on the topology and server configuration properties. Basic consistency is controlled between the 2 configurations.
Required directories are created when loading the configuration:
Note 1: If present into the server configuration properties, the
parameter is ignored, the topology is
provided through the parameter 'topology
'.
Note 2: MUST be invoked just after having starting the Configuration service and before any other component starts.
serverLocalProperties
- The local properties of the current container (ie: the content
of 'server.properties' or equivalent). Can be
null
.topology
- The topology configuration. Can not be null
.
ConfigurationException
- Configuration consistency error
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |