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

java.lang.Object
  extended by org.apache.avalon.framework.logger.AbstractLogEnabled
      extended by org.apache.avalon.cornerstone.services.connection.AbstractHandlerFactory
All Implemented Interfaces:
org.apache.avalon.cornerstone.services.connection.ConnectionHandlerFactory, org.apache.avalon.framework.configuration.Configurable, org.apache.avalon.framework.context.Contextualizable, org.apache.avalon.framework.logger.LogEnabled, org.apache.avalon.framework.service.Serviceable
Direct Known Subclasses:
DefaultHandlerFactory

public abstract class AbstractHandlerFactory
extends org.apache.avalon.framework.logger.AbstractLogEnabled
implements org.apache.avalon.framework.context.Contextualizable, org.apache.avalon.framework.service.Serviceable, org.apache.avalon.framework.configuration.Configurable, org.apache.avalon.cornerstone.services.connection.ConnectionHandlerFactory

Helper class to extend to create handler factorys.

Author:
Avalon Development Team

Constructor Summary
AbstractHandlerFactory()
           
 
Method Summary
 void configure(org.apache.avalon.framework.configuration.Configuration configuration)
           
 void contextualize(org.apache.avalon.framework.context.Context context)
           
 org.apache.avalon.cornerstone.services.connection.ConnectionHandler createConnectionHandler()
          Construct an appropriate ConnectionHandler.
protected abstract  org.apache.avalon.cornerstone.services.connection.ConnectionHandler newHandler()
          Overide this method to create actual instance of connection handler.
 void releaseConnectionHandler(org.apache.avalon.cornerstone.services.connection.ConnectionHandler connectionHandler)
           
 void service(org.apache.avalon.framework.service.ServiceManager serviceManager)
           
 
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
 

Constructor Detail

AbstractHandlerFactory

public AbstractHandlerFactory()
Method Detail

contextualize

public void contextualize(org.apache.avalon.framework.context.Context context)
Specified by:
contextualize in interface org.apache.avalon.framework.context.Contextualizable

service

public void service(org.apache.avalon.framework.service.ServiceManager serviceManager)
             throws org.apache.avalon.framework.service.ServiceException
Specified by:
service in interface org.apache.avalon.framework.service.Serviceable
Throws:
org.apache.avalon.framework.service.ServiceException

configure

public void configure(org.apache.avalon.framework.configuration.Configuration configuration)
               throws org.apache.avalon.framework.configuration.ConfigurationException
Specified by:
configure in interface org.apache.avalon.framework.configuration.Configurable
Throws:
org.apache.avalon.framework.configuration.ConfigurationException

createConnectionHandler

public org.apache.avalon.cornerstone.services.connection.ConnectionHandler createConnectionHandler()
                                                                                            throws java.lang.Exception
Construct an appropriate ConnectionHandler.

Specified by:
createConnectionHandler in interface org.apache.avalon.cornerstone.services.connection.ConnectionHandlerFactory
Returns:
the new ConnectionHandler
Throws:
java.lang.Exception - if an error occurs

releaseConnectionHandler

public void releaseConnectionHandler(org.apache.avalon.cornerstone.services.connection.ConnectionHandler connectionHandler)
Specified by:
releaseConnectionHandler in interface org.apache.avalon.cornerstone.services.connection.ConnectionHandlerFactory

newHandler

protected abstract org.apache.avalon.cornerstone.services.connection.ConnectionHandler newHandler()
                                                                                           throws java.lang.Exception
Overide this method to create actual instance of connection handler.

Returns:
the new ConnectionHandler
Throws:
java.lang.Exception - if an error occurs


Copyright © {inceptionYear}-2009 Apache Software Foundation. All Rights Reserved.