public class MailCmdHandler extends AbstractHookableCmdHandler<MailHook>
Constructor and Description |
---|
MailCmdHandler() |
Modifier and Type | Method and Description |
---|---|
protected HookResult |
callHook(MailHook rawHook,
SMTPSession session,
String parameters)
Must be implemented by hookable cmd handlers to make the effective call to an hook.
|
protected Response |
doCoreCmd(SMTPSession session,
String command,
String parameters)
Execute the core commandHandling.
|
protected Response |
doFilterChecks(SMTPSession session,
String command,
String parameters)
Execute Syntax checks and return a SMTPResponse if a syntax error was
detected, otherwise null.
|
protected String |
getDefaultDomain()
Return the default domain to append if the sender contains none
|
protected Class<MailHook> |
getHookInterface()
Return the interface which hooks need to implement to hook in
|
Collection<String> |
getImplCommands()
Return a Collection of implemented commands
|
List<Class<?>> |
getMarkerInterfaces()
Return a List of interfaces of plugins that will
extend this.
|
Response |
onCommand(SMTPSession session,
Request request)
Handle command processing
|
void |
wireExtensions(Class interfaceName,
List extension)
Method called during initialization after all the handlers have been declared
in the ProtocolHandlerChain.
|
calcDefaultSMTPResponse, getHooks
public Response onCommand(SMTPSession session, Request request)
AbstractHookableCmdHandler
onCommand
in interface CommandHandler<SMTPSession>
onCommand
in class AbstractHookableCmdHandler<MailHook>
#onCommand(SMTPSession, Request)
public Collection<String> getImplCommands()
CommandHandler
CommandHandler.getImplCommands()
protected Response doCoreCmd(SMTPSession session, String command, String parameters)
AbstractHookableCmdHandler
doCoreCmd
in class AbstractHookableCmdHandler<MailHook>
AbstractHookableCmdHandler.doCoreCmd(org.apache.james.protocols.smtp.SMTPSession,
java.lang.String, java.lang.String)
protected Response doFilterChecks(SMTPSession session, String command, String parameters)
AbstractHookableCmdHandler
doFilterChecks
in class AbstractHookableCmdHandler<MailHook>
null
AbstractHookableCmdHandler.doFilterChecks(org.apache.james.protocols.smtp.SMTPSession,
java.lang.String, java.lang.String)
protected Class<MailHook> getHookInterface()
AbstractHookableCmdHandler
getHookInterface
in class AbstractHookableCmdHandler<MailHook>
AbstractHookableCmdHandler.getHookInterface()
protected HookResult callHook(MailHook rawHook, SMTPSession session, String parameters)
callHook
in class AbstractHookableCmdHandler<MailHook>
rawHook
- the hooksession
- the sessionparameters
- the parameterspublic List<Class<?>> getMarkerInterfaces()
ExtensibleHandler
getMarkerInterfaces
in interface ExtensibleHandler
getMarkerInterfaces
in class AbstractHookableCmdHandler<MailHook>
AbstractHookableCmdHandler.getMarkerInterfaces()
public void wireExtensions(Class interfaceName, List extension)
ExtensibleHandler
wireExtensions
in interface ExtensibleHandler
wireExtensions
in class AbstractHookableCmdHandler<MailHook>
extension
- a list of objects implementing the marker interfaceAbstractHookableCmdHandler.wireExtensions(java.lang.Class, java.util.List)
protected String getDefaultDomain()
Copyright © 2010-2012 The Apache Software Foundation. All Rights Reserved.