org.apache.james.protocols.smtp
Class SMTPProtocolHandlerChain

java.lang.Object
  extended by org.apache.james.protocols.api.handler.AbstractProtocolHandlerChain
      extended by org.apache.james.protocols.smtp.SMTPProtocolHandlerChain
All Implemented Interfaces:
ProtocolHandlerChain

public class SMTPProtocolHandlerChain
extends AbstractProtocolHandlerChain

This ProtocolHandlerChain implementation add all needed handlers to the chain to act as full blown SMTPServer. By default messages will just get rejected after the DATA command. If you want to accept the messagejust add a MessageHook implementation to the chain and handle the queuing


Constructor Summary
SMTPProtocolHandlerChain()
           
 
Method Summary
 void addHook(Hook hook)
          Add the hook to the chain
 void addHook(int index, Hook hook)
          Add the hook to the chain on the given index
protected  List<Object> getHandlers()
           
 int getIndexOfHook(Hook hook)
          Return the index of the given hook
protected  List<Object> initDefaultHandlers()
           
 Hook removeHook(int index)
          Remove the Hook found on the given index from the chain
 
Methods inherited from class org.apache.james.protocols.api.handler.AbstractProtocolHandlerChain
getHandlers, wireExtensibleHandlers
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SMTPProtocolHandlerChain

public SMTPProtocolHandlerChain()
                         throws WiringException
Throws:
WiringException
Method Detail

initDefaultHandlers

protected List<Object> initDefaultHandlers()

addHook

public final void addHook(Hook hook)
                   throws WiringException
Add the hook to the chain

Parameters:
hook -
Throws:
WiringException

addHook

public final void addHook(int index,
                          Hook hook)
                   throws WiringException
Add the hook to the chain on the given index

Parameters:
index -
hook -
Throws:
WiringException

removeHook

public final Hook removeHook(int index)
                      throws WiringException
Remove the Hook found on the given index from the chain

Parameters:
index -
Returns:
hook
Throws:
WiringException

getIndexOfHook

public int getIndexOfHook(Hook hook)
Return the index of the given hook

Parameters:
hook -
Returns:
index

getHandlers

protected List<Object> getHandlers()
Specified by:
getHandlers in class AbstractProtocolHandlerChain
See Also:
AbstractProtocolHandlerChain.getHandlers()


Copyright © 2010-2011 The Apache Software Foundation. All Rights Reserved.