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

java.lang.Object
  extended byorg.apache.avalon.framework.logger.AbstractLogEnabled
      extended byorg.apache.avalon.cornerstone.services.connection.AbstractHandlerFactory
          extended byorg.apache.avalon.cornerstone.services.connection.DefaultHandlerFactory
All Implemented Interfaces:
Configurable, ConnectionHandlerFactory, Contextualizable, LogEnabled, Serviceable

public class DefaultHandlerFactory
extends AbstractHandlerFactory

Default Hnalder factory that creates instances via reflection.

Author:
Avalon Development Team

Field Summary
protected  java.lang.Class m_handlerClass
           
 
Constructor Summary
DefaultHandlerFactory(java.lang.Class handlerClass)
           
 
Method Summary
protected  ConnectionHandler newHandler()
          Overide this method to create actual instance of connection handler.
 void releaseConnectionHandler(ConnectionHandler connectionHandler)
          Release a previously created ConnectionHandler.
 
Methods inherited from class org.apache.avalon.cornerstone.services.connection.AbstractHandlerFactory
configure, contextualize, createConnectionHandler, service
 
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

m_handlerClass

protected java.lang.Class m_handlerClass
Constructor Detail

DefaultHandlerFactory

public DefaultHandlerFactory(java.lang.Class handlerClass)
Method Detail

newHandler

protected ConnectionHandler newHandler()
                                throws java.lang.Exception
Overide this method to create actual instance of connection handler.

Specified by:
newHandler in class AbstractHandlerFactory
Returns:
the new ConnectionHandler
Throws:
java.lang.Exception - if an error occurs

releaseConnectionHandler

public void releaseConnectionHandler(ConnectionHandler connectionHandler)
Release a previously created ConnectionHandler. e.g. for spooling.

Specified by:
releaseConnectionHandler in interface ConnectionHandlerFactory
Overrides:
releaseConnectionHandler in class AbstractHandlerFactory


Copyright © 1997-2005 The Apache Software Foundation. All Rights Reserved.