public class ServerConfiguration extends Object implements ServerConfigurationService
| Modifier and Type | Field and Description |
|---|---|
static String |
AXIS2_CONFIG_REPO_LOCATION
Constant to be used for properties storing the axis2 repository location.
|
static String |
COMMAND_LISTENER_PORT
Constant to be used for properties storing the port of the command
listener.
|
static String |
HTTP_PORT
Constant to be used for properties storing the http port of the servlet
transport.
|
| Modifier and Type | Method and Description |
|---|---|
void |
forceInit(InputStream xmlInputStream)
Method to forcibly initialize the server configuration.
|
void |
forceInit(String configurationXMLLocation)
Method to forcibly initialize the server configuration.
|
void |
forceInit(String configurationXMLLocation,
boolean isLoadedConfigurationPreserved)
Method to forcibly initialize the server configuration.
|
Element |
getDocumentElement()
Method to retrieve the Configuration as an XML Document.
|
String |
getFirstProperty(String key)
There can be multiple objects with the same key.
|
static ServerConfiguration |
getInstance()
Method to retrieve an instance of the server configuration.
|
String[] |
getProperties(String key)
There can be multiple object corresponding to the same object.
|
protected String |
getProtectedValue(String key) |
void |
init(InputStream xmlInputStream)
This initializes the server configuration.
|
void |
init(String configurationXMLLocation)
This initializes the server configuration.
|
protected boolean |
isProtectedToken(String key) |
void |
overrideConfigurationProperty(String key,
String value)
overrides the configuration property instead of adding the value to the
list
|
void |
setConfigurationProperty(String key,
String value)
Method to a given key, value pair into the configuration.
|
public static final String AXIS2_CONFIG_REPO_LOCATION
public static final String HTTP_PORT
public static final String COMMAND_LISTENER_PORT
public static ServerConfiguration getInstance()
public void init(InputStream xmlInputStream) throws ServerConfigurationException
xmlInputStream - the server configuration file stream.ServerConfigurationException - if the operation failed.public void init(String configurationXMLLocation) throws ServerConfigurationException
configurationXMLLocation - the location of the server configuration file (carbon.xml).ServerConfigurationException - if the operation failed.public void forceInit(InputStream xmlInputStream) throws ServerConfigurationException
xmlInputStream - the server configuration file stream.ServerConfigurationException - if the operation failed.public void forceInit(String configurationXMLLocation) throws ServerConfigurationException
configurationXMLLocation - the location of the server configuration file (carbon.xml).ServerConfigurationException - if the operation failed.public void forceInit(String configurationXMLLocation, boolean isLoadedConfigurationPreserved) throws ServerConfigurationException
configurationXMLLocation - the location of the server configuration file (carbon.xml).isLoadedConfigurationPreserved - whether the currently loaded configuration is preserved.ServerConfigurationException - if the operation failed.public void setConfigurationProperty(String key, String value)
setConfigurationProperty in interface ServerConfigurationServicekey - the key to addvalue - the valuepublic void overrideConfigurationProperty(String key, String value)
overrideConfigurationProperty in interface ServerConfigurationServicekey - value - public String getFirstProperty(String key)
getFirstProperty in interface ServerConfigurationServicekey - the search keypublic String[] getProperties(String key)
getProperties in interface ServerConfigurationServicekey - the search keykeypublic Element getDocumentElement()
getDocumentElement in interface ServerConfigurationServiceprotected boolean isProtectedToken(String key)
Copyright © 2015 WSO2 Inc. All rights reserved.