|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.axis.handlers.BasicHandler org.jboss.net.axis.transport.mailto.client.BaseMailSender
<handler name="MailSender" type="java:org.jboss.net.axis.transport.mail.client.MailSender" > <parameter name="username" value="user"/> <parameter name="password" value="pass"/> <parameter name="timeout" value="120"/> <!-- any relavent javamail properties may be set here, these are just an example of some posibilities --> <parameter name="mail.store.protocol" value="pop3"/> <parameter name="mail.transport.protocol" value="smtp"/> <parameter name="mail.host" value="mail.someserver.com"/> <parameter name="mail.user" value="user"/> <parameter name="mail.from" value="user@someserver.com"/> <parameter name="mail.debug" value="false"/> </handler> <transport name="mail" pivot="MailSender"/>The parameters "username" and "password" are optional. If your mail server doesn't require authentication they can be omitted. The parameter "timeout" is to specify the number of minutes the transport will attempt to retrieve a response from the server. The default is 30 minutes. Any valid Javamail properties may be specified as parameters, and they will be read and used by the transport.
Field Summary | |
protected org.apache.log4j.Logger |
log
|
static String |
MAIL_PROPS
|
protected static Properties |
mailProps
If a JavaMail session is not stored in jndi, this field will hold the JavaMail properties used to create a session. |
protected static String |
mailSessionName
The name of a javamail session from jndi that we should use rather than creating a new one. |
static String |
SESSION_NAME
|
static String |
TRANS_PROPS
|
Fields inherited from class org.apache.axis.handlers.BasicHandler |
makeLockable, name, options |
Fields inherited from interface org.jboss.net.axis.transport.mailto.MailConstants |
HEADER_CONTENT_TRANSFER_ENCODING, HEADER_CONTENT_TYPE, HEADER_FROM, HEADER_IN_REPLY_TO, HEADER_MESSAGE_ID, HEADER_TO |
Constructor Summary | |
BaseMailSender()
|
Method Summary | |
protected void |
archiveMessage(String msgID,
org.apache.axis.MessageContext msgCtx)
Override this method if you need to store outgoing messages. Note: If web service security handlers are in the handler chain, the message will be signed/encrypted here. |
protected void |
checkResponse(org.apache.axis.MessageContext ctx)
Override this method if you want the client to block until it recieves a response. In reality, this is probably only usefull for testing since email is not really a synchronous operation. |
protected Properties |
getJavaMailProperties()
This handler expects the JavaMail properties to be specified in the wsdd (if no SessionName is set). |
protected javax.mail.Session |
getMailSession()
Fetch a mail session. |
void |
invoke(org.apache.axis.MessageContext ctx)
|
protected String |
sendMail(org.apache.axis.MessageContext ctx)
|
Methods inherited from class org.apache.axis.handlers.BasicHandler |
canHandleBlock, cleanup, generateWSDL, getDeploymentData, getName, getOption, getOptions, getUnderstoodHeaders, init, initHashtable, onFault, setName, setOption, setOptionDefault, setOptions, setOptionsLockable |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final String MAIL_PROPS
public static final String TRANS_PROPS
public static final String SESSION_NAME
protected org.apache.log4j.Logger log
protected static Properties mailProps
protected static String mailSessionName
Constructor Detail |
public BaseMailSender()
Method Detail |
public void invoke(org.apache.axis.MessageContext ctx) throws org.apache.axis.AxisFault
invoke
in interface org.apache.axis.Handler
org.apache.axis.AxisFault
protected String sendMail(org.apache.axis.MessageContext ctx) throws org.apache.axis.AxisFault
org.apache.axis.AxisFault
protected void archiveMessage(String msgID, org.apache.axis.MessageContext msgCtx)
msgID
- msgCtx
- protected void checkResponse(org.apache.axis.MessageContext ctx) throws org.apache.axis.AxisFault
ctx
-
org.apache.axis.AxisFault
protected Properties getJavaMailProperties() throws org.apache.axis.AxisFault
org.apache.axis.AxisFault
protected javax.mail.Session getMailSession() throws org.apache.axis.AxisFault
org.apache.axis.AxisFault
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |