站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss 4.0.1 sp1 .net API Documentation 英文版文档

AsyncMailSender (JBoss.Net API) - JBoss 4.0.1 sp1 .net API Documentation 英文版文档


org.jboss.net.axis.transport.mailto.client
Class AsyncMailSender

java.lang.Object
  extended byorg.apache.axis.handlers.BasicHandler
      extended byorg.jboss.net.axis.transport.mailto.client.BaseMailSender
          extended byorg.jboss.net.axis.transport.mailto.client.AsyncMailSender
All Implemented Interfaces:
org.apache.axis.Handler, MailConstants, Serializable

public class AsyncMailSender
extends BaseMailSender

Title:
Client Side Email Transport

Description:
This transport uses the asynchronous capabilities of axis to send a request. This transport works in cooperation with the AsyncMailClientService. The call is created in the normal way, but rather than issuing a call.invoke() the call is passed to the AsyncMailClinetService along with a callback, and its arguments. the service starts a new thread that invokes the call. The call progresses normally until it gets to the transport (here) where the request is sent, but then the thread is put to sleep. The AsyncMailClientService keeps a reference to the MessageContext of every message it has sent. Every so often, the service checks the inbox for messages that correlate to ones it has sent. When it finds one of these response messages, it adds it to the corresponding message context, and notifies the thread. If the thread wakes up on it's own, it assumes that no response has been received and faults.

Version:
$Revision: 1.1 $
Author:
Jason Essington
See Also:
Serialized Form

Field Summary
static long DEFAULT_TIMEOUT
           
static String TIMEOUT
           
 
Fields inherited from class org.jboss.net.axis.transport.mailto.client.BaseMailSender
log, MAIL_PROPS, mailProps, mailSessionName, SESSION_NAME, 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
AsyncMailSender()
           
 
Method Summary
protected  void checkResponse(org.apache.axis.MessageContext ctx)
          Instead of checking mail, we'll just go to sleep, and when we wake up, hopefully a response message will have appeared in our message context.
protected  long getTimeout()
           
 
Methods inherited from class org.jboss.net.axis.transport.mailto.client.BaseMailSender
archiveMessage, getJavaMailProperties, getMailSession, invoke, sendMail
 
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

TIMEOUT

public static final String TIMEOUT
See Also:
Constant Field Values

DEFAULT_TIMEOUT

public static final long DEFAULT_TIMEOUT
See Also:
Constant Field Values
Constructor Detail

AsyncMailSender

public AsyncMailSender()
Method Detail

getTimeout

protected long getTimeout()

checkResponse

protected void checkResponse(org.apache.axis.MessageContext ctx)
                      throws org.apache.axis.AxisFault
Instead of checking mail, we'll just go to sleep, and when we wake up, hopefully a response message will have appeared in our message context. Really the response handling is done in the AsyncMailClientService

Overrides:
checkResponse in class BaseMailSender
Parameters:
ctx -
Throws:
org.apache.axis.AxisFault


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.