Package org.openas2.mail
Class EmailSender
- java.lang.Object
-
- org.openas2.BaseComponent
-
- org.openas2.mail.EmailSender
-
- All Implemented Interfaces:
Component
public class EmailSender extends BaseComponent
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringPARAM_BODYstatic java.lang.StringPARAM_BODYTEMPLATEstatic java.lang.StringPARAM_FROMstatic java.lang.StringPARAM_FROM_DISPLAYstatic java.lang.StringPARAM_SMTPPORTstatic java.lang.StringPARAM_SMTPPROTOCOLstatic java.lang.StringPARAM_SMTPSERVERstatic java.lang.StringPARAM_SUBJECTstatic java.lang.StringPARAM_TO
-
Constructor Summary
Constructors Constructor Description EmailSender()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ParameterParsercreateParser()protected CompositeParameterscreateParser(AS2Message msg, java.lang.Throwable t, boolean terminated)protected java.lang.StringgetTemplateText()voidinit(Session session, java.util.Map<java.lang.String,java.lang.String> parameters)Component lifecycle hook.protected java.lang.StringparseText(java.lang.Throwable t, boolean terminated, java.lang.String text)protected java.lang.StringparseText(AS2Message msg, java.lang.String text)protected voidsendMessage(java.lang.String subject, java.lang.String text)-
Methods inherited from class org.openas2.BaseComponent
destroy, getName, getParameter, getParameter, getParameterInt, getParameters, getSession, setParameter, setParameter
-
-
-
-
Field Detail
-
PARAM_FROM_DISPLAY
public static final java.lang.String PARAM_FROM_DISPLAY
- See Also:
- Constant Field Values
-
PARAM_FROM
public static final java.lang.String PARAM_FROM
- See Also:
- Constant Field Values
-
PARAM_TO
public static final java.lang.String PARAM_TO
- See Also:
- Constant Field Values
-
PARAM_SMTPSERVER
public static final java.lang.String PARAM_SMTPSERVER
- See Also:
- Constant Field Values
-
PARAM_SMTPPORT
public static final java.lang.String PARAM_SMTPPORT
- See Also:
- Constant Field Values
-
PARAM_SMTPPROTOCOL
public static final java.lang.String PARAM_SMTPPROTOCOL
- See Also:
- Constant Field Values
-
PARAM_SUBJECT
public static final java.lang.String PARAM_SUBJECT
- See Also:
- Constant Field Values
-
PARAM_BODY
public static final java.lang.String PARAM_BODY
- See Also:
- Constant Field Values
-
PARAM_BODYTEMPLATE
public static final java.lang.String PARAM_BODYTEMPLATE
- See Also:
- Constant Field Values
-
-
Method Detail
-
init
public void init(Session session, java.util.Map<java.lang.String,java.lang.String> parameters) throws OpenAS2Exception
Description copied from interface:ComponentComponent lifecycle hook. After creating a Component object, this method should be called to set any parameters used by the component. Component implementations typically have required parameter checking and code to start timers and threads within this method.- Specified by:
initin interfaceComponent- Overrides:
initin classBaseComponent- Parameters:
session- the component uses this object to access other componentsparameters- configuration values for the component- Throws:
OpenAS2Exception- If an error occurs while initializing the component- See Also:
Session
-
getTemplateText
protected java.lang.String getTemplateText() throws InvalidParameterException- Throws:
InvalidParameterException
-
createParser
protected ParameterParser createParser()
-
createParser
protected CompositeParameters createParser(AS2Message msg, java.lang.Throwable t, boolean terminated)
-
parseText
protected java.lang.String parseText(java.lang.Throwable t, boolean terminated, java.lang.String text) throws InvalidParameterException- Throws:
InvalidParameterException
-
parseText
protected java.lang.String parseText(AS2Message msg, java.lang.String text) throws InvalidParameterException
- Throws:
InvalidParameterException
-
sendMessage
protected void sendMessage(java.lang.String subject, java.lang.String text) throws OpenAS2Exception- Throws:
OpenAS2Exception
-
-