org.apache.directory.server.protocol.shared
Class ServiceConfiguration

java.lang.Object
  extended by org.apache.directory.server.protocol.shared.ServiceConfiguration

public abstract class ServiceConfiguration
extends java.lang.Object

Base class shared by all protocol providers for configuration.

Version:
$Rev: 552761 $, $Date: 2007-07-03 05:30:01 -0400 (Tue, 03 Jul 2007) $
Author:
Apache Directory Project

Field Summary
protected static java.lang.String APACHE_SERVICE_CONFIGURATION
           
static int DEFAULT_BUFFER_SIZE
          The default MINA buffer size.
static java.lang.String IP_PORT_KEY
          The prop key const for the port.
static int MINUTE
          The number of milliseconds in a minute.
protected static java.lang.String SERVICE_FACTORYPID
           
protected static java.lang.String SERVICE_PID
           
 
Constructor Summary
ServiceConfiguration()
           
 
Method Summary
 int getBufferSize()
          Returns the buffer size.
 java.lang.String getCatalogBaseDn()
          Returns the catalog base DN.
 java.lang.String getInitialContextFactory()
          Returns the InitialContextFactory.
 java.lang.String getIpAddress()
          Returns the IP address.
 int getIpPort()
          Returns the IP port.
 java.lang.String getSearchBaseDn()
          Returns the search base DN.
 java.lang.String getSecurityAuthentication()
          Returns The authentication mechanism.
 java.lang.String getSecurityCredentials()
           
 java.lang.String getSecurityPrincipal()
           
 java.lang.String getServiceName()
          Returns the service name.
 java.lang.String getServicePid()
          Returns the service PID.
 boolean isDifferent(java.util.Dictionary<java.lang.String,java.lang.Object> config)
          Compares whether a Dictionary of configuration is different from the current instance of configuration.
 boolean isEnabled()
          Returns whether this service is enabled or not.
 void setBufferSize(int bufferSize)
          Sets the buffer size.
 void setCatalogBaseDn(java.lang.String catalogBaseDn)
           
 void setEnabled(boolean isEnabled)
          Sets whether this service is enabled or not.
 void setInitialContextFactory(java.lang.String initialContextFactory)
           
 void setIpAddress(java.lang.String ipAddress)
           
 void setIpPort(int ipPort)
           
 void setSearchBaseDn(java.lang.String searchBaseDn)
           
 void setSecurityAuthentication(java.lang.String securityAuthentication)
           
 void setSecurityCredentials(java.lang.String securityCredentials)
           
 void setSecurityPrincipal(java.lang.String securityPrincipal)
           
 void setServiceName(java.lang.String serviceName)
          Sets the service name.
 void setServicePid(java.lang.String servicePid)
          Sets the service PID.
protected  void validatePortNumber(int port)
          Throws a ServiceConfigurationException if the specified port number is out of range.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

IP_PORT_KEY

public static final java.lang.String IP_PORT_KEY
The prop key const for the port.

See Also:
Constant Field Values

MINUTE

public static final int MINUTE
The number of milliseconds in a minute.

See Also:
Constant Field Values

DEFAULT_BUFFER_SIZE

public static final int DEFAULT_BUFFER_SIZE
The default MINA buffer size.

See Also:
Constant Field Values

APACHE_SERVICE_CONFIGURATION

protected static final java.lang.String APACHE_SERVICE_CONFIGURATION
See Also:
Constant Field Values

SERVICE_PID

protected static final java.lang.String SERVICE_PID
See Also:
Constant Field Values

SERVICE_FACTORYPID

protected static final java.lang.String SERVICE_FACTORYPID
See Also:
Constant Field Values
Constructor Detail

ServiceConfiguration

public ServiceConfiguration()
Method Detail

getBufferSize

public int getBufferSize()
Returns the buffer size.

Returns:
The bufferSize.

setBufferSize

public void setBufferSize(int bufferSize)
Sets the buffer size.

Parameters:
bufferSize - The bufferSize to set.

isEnabled

public boolean isEnabled()
Returns whether this service is enabled or not.

Returns:
True if this service is enabled.

setEnabled

public void setEnabled(boolean isEnabled)
Sets whether this service is enabled or not.

Parameters:
isEnabled - True if this service is to be enabled.

getServicePid

public java.lang.String getServicePid()
Returns the service PID.

Returns:
The servicePid.

setServicePid

public void setServicePid(java.lang.String servicePid)
Sets the service PID.

Parameters:
servicePid - The servicePid to set.

isDifferent

public boolean isDifferent(java.util.Dictionary<java.lang.String,java.lang.Object> config)
Compares whether a Dictionary of configuration is different from the current instance of configuration.

Parameters:
config -
Returns:
Whether the configuration is different.

getServiceName

public java.lang.String getServiceName()
Returns the service name.

Returns:
The serviceName.

setServiceName

public void setServiceName(java.lang.String serviceName)
Sets the service name.

Parameters:
serviceName - The service name to set.

getIpAddress

public java.lang.String getIpAddress()
Returns the IP address.

Returns:
The IP address.

getIpPort

public int getIpPort()
Returns the IP port.

Returns:
The IP port.

getCatalogBaseDn

public java.lang.String getCatalogBaseDn()
Returns the catalog base DN.

Returns:
The catalog base DN.

getSearchBaseDn

public java.lang.String getSearchBaseDn()
Returns the search base DN.

Returns:
The search base DN.

getInitialContextFactory

public java.lang.String getInitialContextFactory()
Returns the InitialContextFactory.

Returns:
The InitialContextFactory.

getSecurityAuthentication

public java.lang.String getSecurityAuthentication()
Returns The authentication mechanism.

Returns:
The securityAuthentication.

getSecurityCredentials

public java.lang.String getSecurityCredentials()
Returns:
The securityCredentials.

getSecurityPrincipal

public java.lang.String getSecurityPrincipal()
Returns:
The securityPrincipal.

setCatalogBaseDn

public void setCatalogBaseDn(java.lang.String catalogBaseDn)
Parameters:
catalogBaseDn - The catalogBaseDn to set.

setInitialContextFactory

public void setInitialContextFactory(java.lang.String initialContextFactory)
Parameters:
initialContextFactory - The initialContextFactory to set.

setIpAddress

public void setIpAddress(java.lang.String ipAddress)
Parameters:
ipAddress - The ipAddress to set.

setIpPort

public void setIpPort(int ipPort)
Parameters:
ipPort - The ipPort to set.

setSearchBaseDn

public void setSearchBaseDn(java.lang.String searchBaseDn)
Parameters:
searchBaseDn - The searchBaseDn to set.

setSecurityAuthentication

public void setSecurityAuthentication(java.lang.String securityAuthentication)
Parameters:
securityAuthentication - The securityAuthentication to set.

setSecurityCredentials

public void setSecurityCredentials(java.lang.String securityCredentials)
Parameters:
securityCredentials - The securityCredentials to set.

setSecurityPrincipal

public void setSecurityPrincipal(java.lang.String securityPrincipal)
Parameters:
securityPrincipal - The securityPrincipal to set.

validatePortNumber

protected void validatePortNumber(int port)
Throws a ServiceConfigurationException if the specified port number is out of range.



Copyright © 2003-2007 The Apache Software Foundation. All Rights Reserved.