org.apache.james.protocols.smtp.core.esmtp
Class EhloCmdHandler

java.lang.Object
  extended by org.apache.james.protocols.smtp.core.AbstractHookableCmdHandler<HeloHook>
      extended by org.apache.james.protocols.smtp.core.esmtp.EhloCmdHandler
All Implemented Interfaces:
CommandHandler<SMTPSession>, ExtensibleHandler

public class EhloCmdHandler
extends AbstractHookableCmdHandler<HeloHook>

Handles EHLO command


Constructor Summary
EhloCmdHandler()
           
 
Method Summary
protected  HookResult callHook(HeloHook rawHook, SMTPSession session, java.lang.String parameters)
          Must be implemented by hookable cmd handlers to make the effective call to an hook.
protected  SMTPResponse doCoreCmd(SMTPSession session, java.lang.String command, java.lang.String parameters)
          Execute the core commandHandling.
protected  SMTPResponse doFilterChecks(SMTPSession session, java.lang.String command, java.lang.String parameters)
          Execute Syntax checks and return a SMTPResponse if a syntax error was detected, otherwise null.
protected  java.lang.Class<HeloHook> getHookInterface()
          Return the interface which hooks need to implement to hook in
 java.util.Collection<java.lang.String> getImplCommands()
           
 java.util.List<java.lang.Class<?>> getMarkerInterfaces()
           
 void wireExtensions(java.lang.Class interfaceName, java.util.List extension)
           
 
Methods inherited from class org.apache.james.protocols.smtp.core.AbstractHookableCmdHandler
calcDefaultSMTPResponse, getHooks, onCommand
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EhloCmdHandler

public EhloCmdHandler()
Method Detail

getImplCommands

public java.util.Collection<java.lang.String> getImplCommands()
See Also:
org.apache.james.smtpserver.protocol.CommandHandler#getImplCommands()

getMarkerInterfaces

public java.util.List<java.lang.Class<?>> getMarkerInterfaces()
Specified by:
getMarkerInterfaces in interface ExtensibleHandler
Overrides:
getMarkerInterfaces in class AbstractHookableCmdHandler<HeloHook>
See Also:
ExtensibleHandler.getMarkerInterfaces()

wireExtensions

public void wireExtensions(java.lang.Class interfaceName,
                           java.util.List extension)
Specified by:
wireExtensions in interface ExtensibleHandler
Overrides:
wireExtensions in class AbstractHookableCmdHandler<HeloHook>
See Also:
ExtensibleHandler.wireExtensions(java.lang.Class, java.util.List)

doCoreCmd

protected SMTPResponse doCoreCmd(SMTPSession session,
                                 java.lang.String command,
                                 java.lang.String parameters)
Description copied from class: AbstractHookableCmdHandler
Execute the core commandHandling.

Specified by:
doCoreCmd in class AbstractHookableCmdHandler<HeloHook>
Returns:
See Also:
AbstractHookableCmdHandler.doCoreCmd(org.apache.james.protocols.smtp.SMTPSession, java.lang.String, java.lang.String)

doFilterChecks

protected SMTPResponse doFilterChecks(SMTPSession session,
                                      java.lang.String command,
                                      java.lang.String parameters)
Description copied from class: AbstractHookableCmdHandler
Execute Syntax checks and return a SMTPResponse if a syntax error was detected, otherwise null.

Specified by:
doFilterChecks in class AbstractHookableCmdHandler<HeloHook>
Returns:
See Also:
AbstractHookableCmdHandler.doFilterChecks(org.apache.james.protocols.smtp.SMTPSession, java.lang.String, java.lang.String)

getHookInterface

protected java.lang.Class<HeloHook> getHookInterface()
Description copied from class: AbstractHookableCmdHandler
Return the interface which hooks need to implement to hook in

Specified by:
getHookInterface in class AbstractHookableCmdHandler<HeloHook>
Returns:
interface
See Also:
AbstractHookableCmdHandler.getHookInterface()

callHook

protected HookResult callHook(HeloHook rawHook,
                              SMTPSession session,
                              java.lang.String parameters)
Description copied from class: AbstractHookableCmdHandler
Must be implemented by hookable cmd handlers to make the effective call to an hook.

Specified by:
callHook in class AbstractHookableCmdHandler<HeloHook>
Parameters:
rawHook - the hook
session - the session
parameters - the parameters
Returns:
the HookResult, will be calculated using HookResultToSMTPResponse.
See Also:
AbstractHookableCmdHandler.callHook(java.lang.Object, org.apache.james.protocols.smtp.SMTPSession, java.lang.String)


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