|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.avalon.framework.logger.AbstractLogEnabled org.apache.avalon.cornerstone.services.connection.AbstractHandlerFactory org.apache.james.core.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
|
protected java.lang.String |
serverSocketType
The server socket type used to generate connections for this server. |
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)
|
void |
dispose()
|
protected int |
getDefaultPort()
Get the default port for this server type. |
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 abstract org.apache.avalon.cornerstone.services.connection.ConnectionHandler |
newHandler()
Overide this method to create actual instance of connection handler. |
void |
service(org.apache.avalon.framework.service.ServiceManager comp)
|
Methods inherited from class org.apache.avalon.cornerstone.services.connection.AbstractHandlerFactory |
---|
contextualize, createConnectionHandler, releaseConnectionHandler |
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 |
Methods inherited from interface org.apache.avalon.cornerstone.services.connection.ConnectionHandlerFactory |
---|
createConnectionHandler, releaseConnectionHandler |
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
Constructor Detail |
---|
public AbstractJamesService()
Method Detail |
---|
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)
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 abstract 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 int getDefaultPort()
protected boolean isDefaultTLSEnabled()
public java.lang.String getServiceType()
public int getPort()
public java.lang.String getNetworkInterface()
public java.lang.String getSocketType()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |