|
|||||||||||
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
Server which creates connection handlers. All new James service must inherit from this abstract implementation.
Field Summary | |
protected InetAddress |
bindTo
Network interface to which the service will bind. |
protected Integer |
connectionLimit
The maximum number of connections allowed for this service. |
protected String |
connectionName
The name of the connection used by this service. |
protected static int |
DEFAULT_TIMEOUT
The default value for the connection timeout. |
static String |
HELLO_NAME
The name of the parameter defining the service hello name. |
protected String |
helloName
The hello name for the service. |
protected int |
port
The port on which this service will be made available. |
protected ServerSocket |
serverSocket
|
protected String |
serverSocketType
The server socket type used to generate connections for this server. |
protected String |
threadGroup
The name of the thread group to be used by this service for generating connections |
protected org.apache.avalon.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 String |
TIMEOUT_NAME
The name of the parameter defining the connection timeout. |
Fields inherited from class org.apache.avalon.cornerstone.services.connection.AbstractHandlerFactory |
m_componentManager, m_configuration, m_context |
Constructor Summary | |
AbstractJamesService()
|
Method Summary | |
void |
compose(ComponentManager comp)
|
void |
configure(Configuration conf)
|
void |
dispose()
|
protected int |
getDefaultPort()
Get the default port for this server type. |
String |
getServiceType()
This method returns the type of service provided by this server. |
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. |
protected boolean |
isEnabled()
Describes whether this service is enabled by configuration. |
protected abstract ConnectionHandler |
newHandler()
Overide this method to create actual instance of connection handler. |
Methods inherited from class org.apache.avalon.cornerstone.services.connection.AbstractHandlerFactory |
contextualize, createConnectionHandler |
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 String TIMEOUT_NAME
public static final String HELLO_NAME
protected String threadGroup
protected org.apache.avalon.excalibur.thread.ThreadPool threadPool
protected String serverSocketType
protected int port
protected InetAddress bindTo
protected ServerSocket serverSocket
protected String connectionName
protected Integer connectionLimit
protected int timeout
protected String helloName
Constructor Detail |
public AbstractJamesService()
Method Detail |
public void compose(ComponentManager comp) throws ComponentException
compose
in interface Composable
compose
in class AbstractHandlerFactory
ComponentException
Composable.compose(ComponentManager)
public void configure(Configuration conf) throws ConfigurationException
configure
in interface Configurable
configure
in class AbstractHandlerFactory
ConfigurationException
Configurable.configure(Configuration)
public void initialize() throws Exception
initialize
in interface Initializable
Exception
Initializable.initialize()
public void dispose()
dispose
in interface Disposable
Disposable.dispose()
protected WatchdogFactory getWatchdogFactory()
protected final boolean isEnabled()
protected abstract ConnectionHandler newHandler() throws Exception
newHandler
in class AbstractHandlerFactory
Exception
- if an error occursprotected int getDefaultPort()
protected boolean isDefaultTLSEnabled()
public String getServiceType()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |