org.apache.avalon.cornerstone.services.connection
Class AbstractService

java.lang.Object
  extended byorg.apache.avalon.framework.logger.AbstractLogEnabled
      extended byorg.apache.avalon.cornerstone.services.connection.AbstractService
All Implemented Interfaces:
Configurable, Contextualizable, Disposable, Initializable, LogEnabled, Serviceable

public abstract class AbstractService
extends AbstractLogEnabled
implements Contextualizable, Serviceable, Configurable, Initializable, Disposable

Helper class to create protocol services.

Author:
Avalon Development Team

Field Summary
protected  InetAddress m_bindTo
           
protected  ConnectionManager m_connectionManager
           
protected  String m_connectionName
           
protected  ConnectionHandlerFactory m_factory
           
protected  int m_port
           
protected  ServerSocket m_serverSocket
           
protected  String m_serverSocketType
           
protected  SocketManager m_socketManager
           
protected  ThreadManager m_threadManager
           
protected  org.apache.excalibur.thread.ThreadPool m_threadPool
           
 
Constructor Summary
AbstractService()
           
 
Method Summary
 void configure(Configuration configuration)
           
 void contextualize(Context context)
           
protected abstract  ConnectionHandlerFactory createFactory()
           
 void dispose()
           
 void enableLogging(Logger logger)
           
protected  String getThreadPoolName()
           
 void initialize()
           
 void service(ServiceManager serviceManager)
           
 
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
getLogger, setupLogger, setupLogger, setupLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_connectionManager

protected ConnectionManager m_connectionManager

m_socketManager

protected SocketManager m_socketManager

m_factory

protected ConnectionHandlerFactory m_factory

m_threadManager

protected ThreadManager m_threadManager

m_threadPool

protected org.apache.excalibur.thread.ThreadPool m_threadPool

m_serverSocketType

protected String m_serverSocketType

m_port

protected int m_port

m_bindTo

protected InetAddress m_bindTo

m_serverSocket

protected ServerSocket m_serverSocket

m_connectionName

protected String m_connectionName
Constructor Detail

AbstractService

public AbstractService()
Method Detail

getThreadPoolName

protected String getThreadPoolName()

createFactory

protected abstract ConnectionHandlerFactory createFactory()

enableLogging

public void enableLogging(Logger logger)
Specified by:
enableLogging in interface LogEnabled

contextualize

public void contextualize(Context context)
                   throws ContextException
Specified by:
contextualize in interface Contextualizable
Throws:
ContextException

service

public void service(ServiceManager serviceManager)
             throws ServiceException
Specified by:
service in interface Serviceable
Throws:
ServiceException

configure

public void configure(Configuration configuration)
               throws ConfigurationException
Specified by:
configure in interface Configurable
Throws:
ConfigurationException

initialize

public void initialize()
                throws Exception
Specified by:
initialize in interface Initializable
Throws:
Exception

dispose

public void dispose()
Specified by:
dispose in interface Disposable


Copyright © Apache Software Foundation. All Rights Reserved.