|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.avalon.framework.logger.AbstractLogEnabled
org.apache.avalon.cornerstone.services.connection.AbstractHandlerFactory
org.apache.james.socket.AbstractJamesService
public abstract class AbstractJamesService
Server which creates connection handlers. All new James service must inherit from this abstract implementation.
Field Summary | |
---|---|
protected int |
backlog
The connection backlog. |
protected static java.lang.String |
BACKLOG_NAME
The name of the parameter defining the connection backlog. |
protected java.net.InetAddress |
bindTo
Network interface to which the service will bind. |
protected java.lang.Integer |
connectionLimit
The maximum number of connections allowed for this service. |
protected java.lang.String |
connectionName
The name of the connection used by this service. |
protected static int |
DEFAULT_BACKLOG
The default value for the connection backlog. |
protected static int |
DEFAULT_TIMEOUT
The default value for the connection timeout. |
static java.lang.String |
HELLO_NAME
The name of the parameter defining the service hello name. |
protected java.lang.String |
helloName
The hello name for the service. |
protected int |
port
The port on which this service will be made available. |
protected java.net.ServerSocket |
serverSocket
The server socket associated with this service |
protected java.lang.String |
serverSocketType
The server socket type used to generate connections for this server. |
protected org.apache.avalon.excalibur.pool.Pool |
theHandlerPool
The pool used to provide Protocol Handler objects |
protected WatchdogFactory |
theWatchdogFactory
The factory used to generate Watchdog objects |
protected java.lang.String |
threadGroup
The name of the thread group to be used by this service for generating connections |
protected org.apache.excalibur.thread.ThreadPool |
threadPool
The thread pool used by this service that holds the threads that service the client connections. |
protected int |
timeout
The connection idle timeout. |
protected static java.lang.String |
TIMEOUT_NAME
The name of the parameter defining the connection timeout. |
Constructor Summary | |
---|---|
AbstractJamesService()
|
Method Summary | |
---|---|
void |
configure(org.apache.avalon.framework.configuration.Configuration conf)
|
org.apache.avalon.cornerstone.services.connection.ConnectionHandler |
createConnectionHandler()
|
void |
decommission(java.lang.Object object)
|
void |
dispose()
|
protected abstract java.lang.Object |
getConfigurationData()
|
java.lang.Class |
getCreatedClass()
|
protected int |
getDefaultPort()
Get the default port for this server type. |
protected java.lang.String |
getLocalHostName()
|
java.lang.String |
getNetworkInterface()
Returns the address if the network interface the socket is bound to |
int |
getPort()
Returns the port that the service is bound to |
java.lang.String |
getServiceType()
This method returns the type of service provided by this server. |
java.lang.String |
getSocketType()
Returns the server socket type, plain or SSL |
protected WatchdogFactory |
getWatchdogFactory()
This constructs the WatchdogFactory that will be used to guard against runaway or stuck behavior. |
void |
initialize()
|
protected boolean |
isDefaultTLSEnabled()
Get whether TLS is enabled for this server's socket by default. |
boolean |
isEnabled()
Describes whether this service is enabled by configuration. |
protected org.apache.avalon.cornerstone.services.connection.ConnectionHandler |
newHandler()
Overide this method to create actual instance of connection handler. |
java.lang.Object |
newInstance()
|
protected abstract ProtocolHandler |
newProtocolHandlerInstance()
|
void |
releaseConnectionHandler(org.apache.avalon.cornerstone.services.connection.ConnectionHandler connectionHandler)
|
void |
service(org.apache.avalon.framework.service.ServiceManager comp)
|
void |
setConnectionManager(JamesConnectionManager connectionManager)
|
protected void |
setStreamDumpDir(java.lang.String streamdumpDir)
|
Methods inherited from class org.apache.avalon.cornerstone.services.connection.AbstractHandlerFactory |
---|
contextualize |
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled |
---|
enableLogging, getLogger, setupLogger, setupLogger, setupLogger |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final int DEFAULT_TIMEOUT
protected static final java.lang.String TIMEOUT_NAME
protected static final int DEFAULT_BACKLOG
protected static final java.lang.String BACKLOG_NAME
public static final java.lang.String HELLO_NAME
protected java.lang.String threadGroup
protected org.apache.excalibur.thread.ThreadPool threadPool
protected java.lang.String serverSocketType
protected int port
protected java.net.InetAddress bindTo
protected java.net.ServerSocket serverSocket
protected java.lang.String connectionName
protected java.lang.Integer connectionLimit
protected int timeout
protected int backlog
protected java.lang.String helloName
protected org.apache.avalon.excalibur.pool.Pool theHandlerPool
protected WatchdogFactory theWatchdogFactory
Constructor Detail |
---|
public AbstractJamesService()
Method Detail |
---|
public void setConnectionManager(JamesConnectionManager connectionManager)
public void service(org.apache.avalon.framework.service.ServiceManager comp) throws org.apache.avalon.framework.service.ServiceException
service
in interface org.apache.avalon.framework.service.Serviceable
service
in class org.apache.avalon.cornerstone.services.connection.AbstractHandlerFactory
org.apache.avalon.framework.service.ServiceException
Serviceable.service(ServiceManager)
public void configure(org.apache.avalon.framework.configuration.Configuration conf) throws org.apache.avalon.framework.configuration.ConfigurationException
configure
in interface org.apache.avalon.framework.configuration.Configurable
configure
in class org.apache.avalon.cornerstone.services.connection.AbstractHandlerFactory
org.apache.avalon.framework.configuration.ConfigurationException
Configurable.configure(Configuration)
protected void setStreamDumpDir(java.lang.String streamdumpDir)
protected java.lang.String getLocalHostName()
public void initialize() throws java.lang.Exception
initialize
in interface org.apache.avalon.framework.activity.Initializable
java.lang.Exception
Initializable.initialize()
public void dispose()
dispose
in interface org.apache.avalon.framework.activity.Disposable
Disposable.dispose()
protected WatchdogFactory getWatchdogFactory()
public final boolean isEnabled()
protected org.apache.avalon.cornerstone.services.connection.ConnectionHandler newHandler() throws java.lang.Exception
newHandler
in class org.apache.avalon.cornerstone.services.connection.AbstractHandlerFactory
java.lang.Exception
- if an error occursprotected abstract java.lang.Object getConfigurationData()
public void releaseConnectionHandler(org.apache.avalon.cornerstone.services.connection.ConnectionHandler connectionHandler)
releaseConnectionHandler
in interface org.apache.avalon.cornerstone.services.connection.ConnectionHandlerFactory
releaseConnectionHandler
in class org.apache.avalon.cornerstone.services.connection.AbstractHandlerFactory
ConnectionHandlerFactory.releaseConnectionHandler(ConnectionHandler)
protected int getDefaultPort()
protected boolean isDefaultTLSEnabled()
public java.lang.String getServiceType()
public int getPort()
public java.lang.String getNetworkInterface()
public java.lang.String getSocketType()
public void decommission(java.lang.Object object) throws java.lang.Exception
decommission
in interface org.apache.avalon.excalibur.pool.ObjectFactory
java.lang.Exception
ObjectFactory.decommission(Object)
public org.apache.avalon.cornerstone.services.connection.ConnectionHandler createConnectionHandler() throws java.lang.Exception
createConnectionHandler
in interface org.apache.avalon.cornerstone.services.connection.ConnectionHandlerFactory
createConnectionHandler
in class org.apache.avalon.cornerstone.services.connection.AbstractHandlerFactory
java.lang.Exception
AbstractHandlerFactory.createConnectionHandler()
public java.lang.Object newInstance() throws java.lang.Exception
newInstance
in interface org.apache.avalon.excalibur.pool.ObjectFactory
java.lang.Exception
ObjectFactory.newInstance()
protected abstract ProtocolHandler newProtocolHandlerInstance()
public java.lang.Class getCreatedClass()
getCreatedClass
in interface org.apache.avalon.excalibur.pool.ObjectFactory
ObjectFactory.getCreatedClass()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |