org.apache.james.protocols.smtp.core
Class UnknownCmdHandler

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

public class UnknownCmdHandler
extends AbstractHookableCmdHandler<UnknownCmdHook>

Default command handler for handling unknown commands


Field Summary
static java.lang.String UNKNOWN_COMMAND
          The name of the command handled by the command handler
 
Constructor Summary
UnknownCmdHandler()
           
 
Method Summary
protected  HookResult callHook(UnknownCmdHook 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<UnknownCmdHook> getHookInterface()
          Return the interface which hooks need to implement to hook in
 java.util.Collection<java.lang.String> getImplCommands()
           
 
Methods inherited from class org.apache.james.protocols.smtp.core.AbstractHookableCmdHandler
calcDefaultSMTPResponse, getHooks, getMarkerInterfaces, onCommand, wireExtensions
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

UNKNOWN_COMMAND

public static final java.lang.String UNKNOWN_COMMAND
The name of the command handled by the command handler

See Also:
Constant Field Values
Constructor Detail

UnknownCmdHandler

public UnknownCmdHandler()
Method Detail

getImplCommands

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

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<UnknownCmdHook>
Returns:

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<UnknownCmdHook>
Returns:

callHook

protected HookResult callHook(UnknownCmdHook 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<UnknownCmdHook>
Parameters:
rawHook - the hook
session - the session
parameters - the parameters
Returns:
the HookResult, will be calculated using HookResultToSMTPResponse.

getHookInterface

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

Specified by:
getHookInterface in class AbstractHookableCmdHandler<UnknownCmdHook>
Returns:
interface


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