public class AuthCmdHandler extends Object implements CommandHandler<SMTPSession>, EhloExtension, ExtensibleHandler, MailParametersHook
Modifier and Type | Field and Description |
---|---|
protected static String |
AUTH_TYPE_LOGIN
The text string for the SMTP AUTH type LOGIN.
|
protected static String |
AUTH_TYPE_PLAIN
The text string for the SMTP AUTH type PLAIN.
|
Constructor and Description |
---|
AuthCmdHandler() |
Modifier and Type | Method and Description |
---|---|
protected Response |
calcDefaultSMTPResponse(HookResult result)
Calculate the SMTPResponse for the given result
|
protected Response |
doAuthTest(SMTPSession session,
String user,
String pass,
String authType) |
HookResult |
doMailParameter(SMTPSession session,
String paramName,
String paramValue)
Return the HookResult after run the hook
|
protected List<AuthHook> |
getHooks()
Return a list which holds all hooks for the cmdHandler
|
Collection<String> |
getImplCommands()
Return a Collection of implemented commands
|
List<String> |
getImplementedEsmtpFeatures(SMTPSession session) |
String[] |
getMailParamNames() |
List<Class<?>> |
getMarkerInterfaces()
Return a List of interfaces of plugins that will
extend this.
|
Response |
onCommand(SMTPSession session,
Request request)
handles AUTH command
|
void |
wireExtensions(Class<?> interfaceName,
List<?> extension)
Method called during initialization after all the handlers have been declared
in the ProtocolHandlerChain.
|
protected static final String AUTH_TYPE_PLAIN
protected static final String AUTH_TYPE_LOGIN
public Response onCommand(SMTPSession session, Request request)
onCommand
in interface CommandHandler<SMTPSession>
protected Response doAuthTest(SMTPSession session, String user, String pass, String authType)
session
- user
- pass
- authType
- protected Response calcDefaultSMTPResponse(HookResult result)
result
- the HookResult which should converted to SMTPResponsepublic Collection<String> getImplCommands()
CommandHandler
getImplCommands
in interface CommandHandler<SMTPSession>
CommandHandler.getImplCommands()
public List<String> getImplementedEsmtpFeatures(SMTPSession session)
getImplementedEsmtpFeatures
in interface EhloExtension
EhloExtension.getImplementedEsmtpFeatures(org.apache.james.protocols.smtp.SMTPSession)
public List<Class<?>> getMarkerInterfaces()
ExtensibleHandler
getMarkerInterfaces
in interface ExtensibleHandler
ExtensibleHandler.getMarkerInterfaces()
public void wireExtensions(Class<?> interfaceName, List<?> extension) throws WiringException
ExtensibleHandler
wireExtensions
in interface ExtensibleHandler
extension
- a list of objects implementing the marker interfaceWiringException
ExtensibleHandler.wireExtensions(java.lang.Class, java.util.List)
protected List<AuthHook> getHooks()
public HookResult doMailParameter(SMTPSession session, String paramName, String paramValue)
MailParametersHook
doMailParameter
in interface MailParametersHook
session
- the SMTPSessionparamName
- parameter nameparamValue
- parameter valueMailParametersHook.doMailParameter(org.apache.james.protocols.smtp.SMTPSession, java.lang.String, java.lang.String)
public String[] getMailParamNames()
getMailParamNames
in interface MailParametersHook
MailParametersHook.getMailParamNames()
Copyright © 2010-2012 The Apache Software Foundation. All Rights Reserved.