org.mule.providers
Class AbstractMessageDispatcher

java.lang.Object
  extended byorg.mule.providers.AbstractMessageDispatcher
All Implemented Interfaces:
Disposable, java.beans.ExceptionListener, UMOMessageDispatcher
Direct Known Subclasses:
AxisMessageDispatcher, FileMessageDispatcher, GlueMessageDispatcher, HttpClientMessageDispatcher, JdbcMessageDispatcher, JmsMessageDispatcher, MailMessageDispatcher, Pop3MessageDispatcher, SmtpMessageDispatcher, StreamMessageDispatcher, TcpMessageDispatcher, UdpMessageDispatcher, VMMessageDispatcher, XmppMessageDispatcher

public abstract class AbstractMessageDispatcher
extends java.lang.Object
implements UMOMessageDispatcher, java.beans.ExceptionListener

AbstractMessageDispatcher TODO (document class)

Version:
$Revision: 1.10 $
Author:
Ross Mason

Field Summary
protected  AbstractConnector connector
           
protected  boolean disposed
           
protected  boolean disposeOnCompletion
           
protected  boolean doThreading
           
protected  Log logger
          logger used by this class
protected  UMOWorkManager workManager
          Thread pool of Connector sessions
 
Fields inherited from interface org.mule.umo.provider.UMOMessageDispatcher
RECEIVE_NO_WAIT, RECEIVE_WAIT_INDEFINITELY
 
Constructor Summary
AbstractMessageDispatcher(AbstractConnector connector)
           
 
Method Summary
 void dispatch(UMOEvent event)
          Dispatches an event from the endpoint to the external system
 void dispose()
          Template method to destroy any resources.
abstract  void doDispatch(UMOEvent event)
           
abstract  void doDispose()
           
abstract  UMOMessage doSend(UMOEvent event)
           
 void exceptionThrown(java.lang.Exception e)
           
 UMOConnector getConnector()
           
 boolean isDisposed()
           
 UMOMessage send(UMOEvent event)
          Sends an event from the endpoint to the external system
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.mule.umo.provider.UMOMessageDispatcher
getDelegateSession, receive
 

Field Detail

logger

protected transient Log logger
logger used by this class


workManager

protected UMOWorkManager workManager
Thread pool of Connector sessions


disposeOnCompletion

protected boolean disposeOnCompletion

connector

protected AbstractConnector connector

disposed

protected boolean disposed

doThreading

protected boolean doThreading
Constructor Detail

AbstractMessageDispatcher

public AbstractMessageDispatcher(AbstractConnector connector)
Method Detail

dispatch

public final void dispatch(UMOEvent event)
                    throws java.lang.Exception
Description copied from interface: UMOMessageDispatcher
Dispatches an event from the endpoint to the external system

Specified by:
dispatch in interface UMOMessageDispatcher
Parameters:
event - The event to dispatch
Throws:
java.lang.Exception - if the event fails to be dispatched

send

public final UMOMessage send(UMOEvent event)
                      throws java.lang.Exception
Description copied from interface: UMOMessageDispatcher
Sends an event from the endpoint to the external system

Specified by:
send in interface UMOMessageDispatcher
Parameters:
event - The event to send
Returns:
event the response form the external system wrapped in a UMOEvent
Throws:
java.lang.Exception - if the event fails to be dispatched

exceptionThrown

public void exceptionThrown(java.lang.Exception e)
Specified by:
exceptionThrown in interface java.beans.ExceptionListener

isDisposed

public boolean isDisposed()
Specified by:
isDisposed in interface UMOMessageDispatcher

dispose

public final void dispose()
Template method to destroy any resources. some connector will want to cache dispatchers and destroy them themselves

Specified by:
dispose in interface Disposable

getConnector

public UMOConnector getConnector()
Specified by:
getConnector in interface UMOMessageDispatcher

doDispose

public abstract void doDispose()

doDispatch

public abstract void doDispatch(UMOEvent event)
                         throws java.lang.Exception
Throws:
java.lang.Exception

doSend

public abstract UMOMessage doSend(UMOEvent event)
                           throws java.lang.Exception
Throws:
java.lang.Exception


Copyright © 2003-2005 SymphonySoft Limited. All Rights Reserved.