org.apache.qpid.server.configuration
Class ServerConfiguration

java.lang.Object
  extended by org.apache.qpid.server.configuration.plugins.ConfigurationPlugin
      extended by org.apache.qpid.server.configuration.ServerConfiguration
All Implemented Interfaces:
sun.misc.SignalHandler

public class ServerConfiguration
extends ConfigurationPlugin
implements sun.misc.SignalHandler


Nested Class Summary
static class ServerConfiguration.MyConfiguration
           
 
Field Summary
protected static org.apache.log4j.Logger _logger
           
static String ADVANCED_LOCALE
           
static String CACHE_DIR
           
static String CONNECTOR_PROTECTIO_ENABLED
           
static String CONNECTOR_PROTECTIO_READ_BUFFER_LIMIT_SIZE
           
static String CONNECTOR_PROTECTIO_WRITE_BUFFER_LIMIT_SIZE
           
static boolean DEFAULT_BROKER_CONNECTOR_PROTECTIO_ENABLED
           
static int DEFAULT_BUFFER_READ_LIMIT_SIZE
           
static int DEFAULT_BUFFER_WRITE_LIMIT_SIZE
           
static int DEFAULT_FRAME_SIZE
           
static long DEFAULT_HOUSEKEEPING_PERIOD
           
static int DEFAULT_JMXPORT
           
static int DEFAULT_PORT
           
static int DEFAULT_SSL_PORT
           
static String DEFAULT_STATUS_UPDATES
           
static String LIB_DIR
           
static String MGMT_CUSTOM_REGISTRY_SOCKET
           
static String PLUGIN_DIR
           
static String QPID_HOME
           
static String QPID_WORK
           
static String SECURITY_CONFIG_RELOADED
           
static String STATUS_UPDATES
           
 
Fields inherited from class org.apache.qpid.server.configuration.plugins.ConfigurationPlugin
_configuration
 
Fields inherited from interface sun.misc.SignalHandler
SIG_DFL, SIG_IGN
 
Constructor Summary
ServerConfiguration(Configuration conf)
          Wraps the given Commons Configuration as a ServerConfiguration.
ServerConfiguration(File configurationURL)
          Loads the given file and sets up the HUP signal handler.
 
Method Summary
static Configuration flatConfig(File file)
           
 String getBind()
           
 int getBufferReadLimit()
           
 int getBufferWriteLimit()
           
 String getCacheDirectory()
           
 long getCapacity()
           
 String getCertType()
           
 String getConfigurationURL()
           
 String getDefaultVirtualHost()
           
 int getDeliveryPoolSize()
           
 String[] getElementsProcessed()
          The Elements that this Plugin can process.
 boolean getEnableDirectBuffers()
           
 boolean getEnableExecutorPool()
           
 boolean getEnablePooledAllocator()
           
 boolean getEnableSSL()
           
 long getFlowResumeCapacity()
           
 int getFrameSize()
           
 int getHeartBeatDelay()
           
 double getHeartBeatTimeout()
           
 long getHousekeepingCheckPeriod()
           
 int getJMXManagementPort()
           
 String getJMXPrincipalDatabase()
           
 String getKeystorePassword()
           
 String getKeystorePath()
           
 Locale getLocale()
          The currently defined Locale for this broker
 List<String> getManagementAccessList()
           
 boolean getManagementEnabled()
           
 String getManagementKeyStorePassword()
           
 String getManagementKeyStorePath()
           
 List<String> getManagementPrincipalDBs()
           
 boolean getManagementSSLEnabled()
           
 long getMaximumMessageAge()
           
 long getMaximumMessageCount()
           
 long getMaximumMessageSize()
           
 long getMaximumQueueDepth()
           
 long getMinimumAlertRepeatGap()
           
 boolean getMsgAuth()
           
 org.apache.qpid.transport.NetworkDriverConfiguration getNetworkConfiguration()
           
 boolean getPlatformMbeanserver()
           
 String getPluginDirectory()
           
 List getPortExclude010()
           
 List getPortExclude08()
           
 List getPortExclude09()
           
 List getPortExclude091()
           
 List getPorts()
           
 List<String> getPrincipalDatabaseAttributeNames(int index)
           
 List<String> getPrincipalDatabaseAttributeValues(int index)
           
 List<String> getPrincipalDatabaseClass()
           
 List<String> getPrincipalDatabaseNames()
           
 int getProcessors()
           
 boolean getProtectIOEnabled()
           
 String getQpidHome()
           
 boolean getQpidNIO()
           
 String getQpidWork()
           
 boolean getQueueAutoRegister()
           
 int getReceiveBufferSize()
           
 boolean getSSLOnly()
           
 int getSSLPort()
           
 boolean getStatusUpdatesEnabled()
          Check the configuration file to see if status updates are enabled.
 boolean getSynchedClocks()
           
 boolean getTcpNoDelay()
           
 boolean getUseBiasedWrites()
           
 boolean getUseCustomRMISocketFactory()
           
 VirtualHostConfiguration getVirtualHostConfig(String name)
           
 String[] getVirtualHosts()
           
 int getWriteBufferSize()
           
 void handle(sun.misc.Signal arg0)
           
 void initialise()
          Processes this configuration and setups any VirtualHosts defined in the configuration.
 void reparseConfigFileSecuritySections()
           
 void setDefaultVirtualHost(String vhost)
           
 void setHousekeepingExpiredMessageCheckPeriod(long value)
           
 void setJMXManagementPort(int mport)
           
 void setManagementEnabled(boolean enabled)
           
 void setUseCustomRMISocketFactory(boolean bool)
           
 void setVirtualHostConfig(VirtualHostConfiguration config)
           
 void validateConfiguration()
          Performs configuration validation.
 
Methods inherited from class org.apache.qpid.server.configuration.plugins.ConfigurationPlugin
addConfiguration, contains, containsBoolean, containsInt, containsLong, containsPositiveLong, formatToString, getBooleanValue, getBooleanValue, getConfig, getConfiguration, getDoubleValue, getDoubleValue, getIntValue, getIntValue, getListValue, getListValue, getLongValue, getLongValue, getStringValue, getStringValue, hasConfiguration, mergeConfiguration, setConfiguration, showKeys, toString, validatePositiveLong
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_logger

protected static final org.apache.log4j.Logger _logger

DEFAULT_BUFFER_READ_LIMIT_SIZE

public static final int DEFAULT_BUFFER_READ_LIMIT_SIZE
See Also:
Constant Field Values

DEFAULT_BUFFER_WRITE_LIMIT_SIZE

public static final int DEFAULT_BUFFER_WRITE_LIMIT_SIZE
See Also:
Constant Field Values

DEFAULT_BROKER_CONNECTOR_PROTECTIO_ENABLED

public static final boolean DEFAULT_BROKER_CONNECTOR_PROTECTIO_ENABLED
See Also:
Constant Field Values

DEFAULT_STATUS_UPDATES

public static final String DEFAULT_STATUS_UPDATES
See Also:
Constant Field Values

SECURITY_CONFIG_RELOADED

public static final String SECURITY_CONFIG_RELOADED
See Also:
Constant Field Values

DEFAULT_FRAME_SIZE

public static final int DEFAULT_FRAME_SIZE
See Also:
Constant Field Values

DEFAULT_PORT

public static final int DEFAULT_PORT
See Also:
Constant Field Values

DEFAULT_SSL_PORT

public static final int DEFAULT_SSL_PORT
See Also:
Constant Field Values

DEFAULT_HOUSEKEEPING_PERIOD

public static final long DEFAULT_HOUSEKEEPING_PERIOD
See Also:
Constant Field Values

DEFAULT_JMXPORT

public static final int DEFAULT_JMXPORT
See Also:
Constant Field Values

QPID_HOME

public static final String QPID_HOME
See Also:
Constant Field Values

QPID_WORK

public static final String QPID_WORK
See Also:
Constant Field Values

LIB_DIR

public static final String LIB_DIR
See Also:
Constant Field Values

PLUGIN_DIR

public static final String PLUGIN_DIR
See Also:
Constant Field Values

CACHE_DIR

public static final String CACHE_DIR
See Also:
Constant Field Values

CONNECTOR_PROTECTIO_ENABLED

public static final String CONNECTOR_PROTECTIO_ENABLED
See Also:
Constant Field Values

CONNECTOR_PROTECTIO_READ_BUFFER_LIMIT_SIZE

public static final String CONNECTOR_PROTECTIO_READ_BUFFER_LIMIT_SIZE
See Also:
Constant Field Values

CONNECTOR_PROTECTIO_WRITE_BUFFER_LIMIT_SIZE

public static final String CONNECTOR_PROTECTIO_WRITE_BUFFER_LIMIT_SIZE
See Also:
Constant Field Values

MGMT_CUSTOM_REGISTRY_SOCKET

public static final String MGMT_CUSTOM_REGISTRY_SOCKET
See Also:
Constant Field Values

STATUS_UPDATES

public static final String STATUS_UPDATES
See Also:
Constant Field Values

ADVANCED_LOCALE

public static final String ADVANCED_LOCALE
See Also:
Constant Field Values
Constructor Detail

ServerConfiguration

public ServerConfiguration(File configurationURL)
                    throws ConfigurationException
Loads the given file and sets up the HUP signal handler. This will load the file and present the root level properties but will not perform any virtualhost configuration.

To perform this initialise() must be called.

This has been made a two step process to allow the Plugin Manager and Configuration Manager to be initialised in the Application Registry.

If using this ServerConfiguration via an ApplicationRegistry there is no need to explictly call initialise() as this is done via the ApplicationRegistry#initialise() method.

Parameters:
configurationURL -
Throws:
ConfigurationException

ServerConfiguration

public ServerConfiguration(Configuration conf)
Wraps the given Commons Configuration as a ServerConfiguration. Mainly used during testing and in locations where configuration is not desired but the interface requires configuration.

If the given configuration has VirtualHost configuration then initialise() must be called to perform the required setup.

This has been made a two step process to allow the Plugin Manager and Configuration Manager to be initialised in the Application Registry.

If using this ServerConfiguration via an ApplicationRegistry there is no need to explictly call initialise() as this is done via the ApplicationRegistry#initialise() method.

Parameters:
conf -
Method Detail

initialise

public void initialise()
                throws ConfigurationException
Processes this configuration and setups any VirtualHosts defined in the configuration. This has been separated from the constructor to allow the PluginManager time to be created and provide plugins to the ConfigurationManager for processing here.

Called by ApplicationRegistry#initialise().

NOTE: A DEFAULT ApplicationRegistry must exist when using this method or a new ApplicationRegistry will be created.

Throws:
ConfigurationException

getElementsProcessed

public String[] getElementsProcessed()
Description copied from class: ConfigurationPlugin
The Elements that this Plugin can process. For a Queues plugin that would be a list containing:

Specified by:
getElementsProcessed in class ConfigurationPlugin

validateConfiguration

public void validateConfiguration()
                           throws ConfigurationException
Description copied from class: ConfigurationPlugin
Performs configuration validation.

Overrides:
validateConfiguration in class ConfigurationPlugin
Throws:
ConfigurationException

getStatusUpdatesEnabled

public boolean getStatusUpdatesEnabled()
Check the configuration file to see if status updates are enabled.

Returns:
true if status updates are enabled

getLocale

public Locale getLocale()
The currently defined Locale for this broker

Returns:
the configuration defined locale

flatConfig

public static final Configuration flatConfig(File file)
                                      throws ConfigurationException
Throws:
ConfigurationException

getConfigurationURL

public String getConfigurationURL()

handle

public void handle(sun.misc.Signal arg0)
Specified by:
handle in interface sun.misc.SignalHandler

reparseConfigFileSecuritySections

public void reparseConfigFileSecuritySections()
                                       throws ConfigurationException
Throws:
ConfigurationException

getQpidWork

public String getQpidWork()

getQpidHome

public String getQpidHome()

setJMXManagementPort

public void setJMXManagementPort(int mport)

getJMXManagementPort

public int getJMXManagementPort()

getUseCustomRMISocketFactory

public boolean getUseCustomRMISocketFactory()

setUseCustomRMISocketFactory

public void setUseCustomRMISocketFactory(boolean bool)

getPlatformMbeanserver

public boolean getPlatformMbeanserver()

getVirtualHosts

public String[] getVirtualHosts()

getPluginDirectory

public String getPluginDirectory()

getCacheDirectory

public String getCacheDirectory()

getVirtualHostConfig

public VirtualHostConfiguration getVirtualHostConfig(String name)

setVirtualHostConfig

public void setVirtualHostConfig(VirtualHostConfiguration config)

getPrincipalDatabaseNames

public List<String> getPrincipalDatabaseNames()

getPrincipalDatabaseClass

public List<String> getPrincipalDatabaseClass()

getPrincipalDatabaseAttributeNames

public List<String> getPrincipalDatabaseAttributeNames(int index)

getPrincipalDatabaseAttributeValues

public List<String> getPrincipalDatabaseAttributeValues(int index)

getManagementPrincipalDBs

public List<String> getManagementPrincipalDBs()

getManagementAccessList

public List<String> getManagementAccessList()

getFrameSize

public int getFrameSize()

getProtectIOEnabled

public boolean getProtectIOEnabled()

getBufferReadLimit

public int getBufferReadLimit()

getBufferWriteLimit

public int getBufferWriteLimit()

getSynchedClocks

public boolean getSynchedClocks()

getMsgAuth

public boolean getMsgAuth()

getJMXPrincipalDatabase

public String getJMXPrincipalDatabase()

getManagementKeyStorePath

public String getManagementKeyStorePath()

getManagementSSLEnabled

public boolean getManagementSSLEnabled()

getManagementKeyStorePassword

public String getManagementKeyStorePassword()

getQueueAutoRegister

public boolean getQueueAutoRegister()

getManagementEnabled

public boolean getManagementEnabled()

setManagementEnabled

public void setManagementEnabled(boolean enabled)

getHeartBeatDelay

public int getHeartBeatDelay()

getHeartBeatTimeout

public double getHeartBeatTimeout()

getDeliveryPoolSize

public int getDeliveryPoolSize()

getMaximumMessageAge

public long getMaximumMessageAge()

getMaximumMessageCount

public long getMaximumMessageCount()

getMaximumQueueDepth

public long getMaximumQueueDepth()

getMaximumMessageSize

public long getMaximumMessageSize()

getMinimumAlertRepeatGap

public long getMinimumAlertRepeatGap()

getCapacity

public long getCapacity()

getFlowResumeCapacity

public long getFlowResumeCapacity()

getProcessors

public int getProcessors()

getPorts

public List getPorts()

getPortExclude010

public List getPortExclude010()

getPortExclude091

public List getPortExclude091()

getPortExclude09

public List getPortExclude09()

getPortExclude08

public List getPortExclude08()

getBind

public String getBind()

getReceiveBufferSize

public int getReceiveBufferSize()

getWriteBufferSize

public int getWriteBufferSize()

getTcpNoDelay

public boolean getTcpNoDelay()

getEnableExecutorPool

public boolean getEnableExecutorPool()

getEnablePooledAllocator

public boolean getEnablePooledAllocator()

getEnableDirectBuffers

public boolean getEnableDirectBuffers()

getEnableSSL

public boolean getEnableSSL()

getSSLOnly

public boolean getSSLOnly()

getSSLPort

public int getSSLPort()

getKeystorePath

public String getKeystorePath()

getKeystorePassword

public String getKeystorePassword()

getCertType

public String getCertType()

getQpidNIO

public boolean getQpidNIO()

getUseBiasedWrites

public boolean getUseBiasedWrites()

getDefaultVirtualHost

public String getDefaultVirtualHost()

setDefaultVirtualHost

public void setDefaultVirtualHost(String vhost)

setHousekeepingExpiredMessageCheckPeriod

public void setHousekeepingExpiredMessageCheckPeriod(long value)

getHousekeepingCheckPeriod

public long getHousekeepingCheckPeriod()

getNetworkConfiguration

public org.apache.qpid.transport.NetworkDriverConfiguration getNetworkConfiguration()


Licensed to the Apache Software Foundation