|
||||||||||
PREV CLASS (src) NEXT CLASS (src) | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectBasicHandler
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 Logger |
log
|
static java.lang.String |
MAIL_PROPS
|
protected static java.util.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 java.lang.String |
mailSessionName
The name of a javamail session from jndi that we should use rather than creating a new one. |
static java.lang.String |
SESSION_NAME
|
static java.lang.String |
TRANS_PROPS
|
Fields inherited from interface org.jboss.net.axis.transport.mailto.MailConstants (src) |
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(java.lang.String msgID,
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(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 java.util.Properties |
getJavaMailProperties()
This handler expects the JavaMail properties to be specified in the wsdd (if no SessionName is set). |
protected Session |
getMailSession()
Fetch a mail session. |
void |
invoke(MessageContext ctx)
|
protected java.lang.String |
sendMail(MessageContext ctx)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String MAIL_PROPS
public static final java.lang.String TRANS_PROPS
public static final java.lang.String SESSION_NAME
protected Logger log
protected static java.util.Properties mailProps
protected static java.lang.String mailSessionName
Constructor Detail |
public BaseMailSender()
Method Detail |
public void invoke(MessageContext ctx) throws AxisFault
AxisFault
protected java.lang.String sendMail(MessageContext ctx) throws AxisFault
AxisFault
protected void archiveMessage(java.lang.String msgID, MessageContext msgCtx)
msgID
- msgCtx
- protected void checkResponse(MessageContext ctx) throws AxisFault
ctx
-
AxisFault
protected java.util.Properties getJavaMailProperties() throws AxisFault
AxisFault
protected Session getMailSession() throws AxisFault
AxisFault
|
||||||||||
PREV CLASS (src) NEXT CLASS (src) | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |