org.mule.api.transport
Interface MessageReceiver

All Superinterfaces:
Connectable, Disposable, Initialisable, Lifecycle, Startable, Stoppable
All Known Implementing Classes:
AbstractMessageReceiver, AbstractPollingMessageReceiver, AxisMessageReceiver, CxfMessageReceiver, EjbMessageReceiver, FileMessageReceiver, FtpMessageReceiver, HttpMessageReceiver, HttpsMessageReceiver, JdbcMessageReceiver, JettyHttpMessageReceiver, JmsMessageReceiver, MulticastMessageReceiver, MultiConsumerJmsMessageReceiver, PollingHttpMessageReceiver, ProcessMessageReceiver, QuartzMessageReceiver, RetrieveMessageReceiver, RmiCallbackMessageReceiver, RmiMessageReceiver, ServletMessageReceiver, SingleJmsMessageReceiver, SslMessageReceiver, StdioMessageReceiver, TcpMessageReceiver, TransactedPollingMessageReceiver, TransactedSingleResourceJmsMessageReceiver, UdpMessageReceiver, VMMessageReceiver, WebsphereTransactedJmsMessageReceiver, XaTransactedJmsMessageReceiver, XmppMessageReceiver

public interface MessageReceiver
extends Lifecycle, Connectable

MessageReceiver is used to receive data from an external system. Typically an implementation of this interface will also implement the listener interface for the external system. For example to listen to a JMS destination the developer would also implement javax.jms.MessageListener. The endpoint (which creates the MessageReceiver) will then register the receiver with the JMS server. Where a listener interface is not availiable the derived MessageReceiver will implement the code necessary to receive data from the external system. For example, the file endpoint will poll a specified directory for its data.


Field Summary
 
Fields inherited from interface org.mule.api.lifecycle.Initialisable
PHASE_NAME
 
Fields inherited from interface org.mule.api.lifecycle.Startable
PHASE_NAME
 
Fields inherited from interface org.mule.api.lifecycle.Stoppable
PHASE_NAME
 
Fields inherited from interface org.mule.api.lifecycle.Disposable
PHASE_NAME
 
Method Summary
 Connector getConnector()
           
 InboundEndpoint getEndpoint()
           
 EndpointURI getEndpointURI()
          The endpointUri that this receiver listens on
 String getReceiverKey()
           
 Service getService()
           
 MuleMessage routeMessage(MuleMessage message)
           
 MuleMessage routeMessage(MuleMessage message, boolean synchronous)
           
 MuleMessage routeMessage(MuleMessage message, boolean synchronous, OutputStream outputStream)
           
 MuleMessage routeMessage(MuleMessage message, OutputStream outputStream)
           
 MuleMessage routeMessage(MuleMessage message, Transaction trans, boolean synchronous)
           
 MuleMessage routeMessage(MuleMessage message, Transaction trans, boolean synchronous, OutputStream outputStream)
           
 void setConnector(Connector connector)
           
 void setEndpoint(InboundEndpoint endpoint)
           
 void setReceiverKey(String key)
           
 void setService(Service service)
           
 
Methods inherited from interface org.mule.api.lifecycle.Initialisable
initialise
 
Methods inherited from interface org.mule.api.lifecycle.Startable
start
 
Methods inherited from interface org.mule.api.lifecycle.Stoppable
stop
 
Methods inherited from interface org.mule.api.lifecycle.Disposable
dispose
 
Methods inherited from interface org.mule.api.transport.Connectable
connect, disconnect, getConnectionDescription, isConnected
 

Method Detail

getEndpoint

InboundEndpoint getEndpoint()
Returns:
the receivers endpoint

getService

Service getService()
Returns:
the service associated with the receiver

setEndpoint

void setEndpoint(InboundEndpoint endpoint)
Parameters:
endpoint - the endpoint to listen on
See Also:
ImmutableEndpoint

setService

void setService(Service service)
Parameters:
service - the service to associate with the receiver. When data is received the service dispatchEvent or sendEvent is used to dispatch the data to the relivant UMO.

setConnector

void setConnector(Connector connector)

getConnector

Connector getConnector()

getEndpointURI

EndpointURI getEndpointURI()
The endpointUri that this receiver listens on

Returns:

getReceiverKey

String getReceiverKey()

setReceiverKey

void setReceiverKey(String key)

routeMessage

MuleMessage routeMessage(MuleMessage message)
                         throws MuleException
Throws:
MuleException

routeMessage

MuleMessage routeMessage(MuleMessage message,
                         boolean synchronous)
                         throws MuleException
Throws:
MuleException

routeMessage

MuleMessage routeMessage(MuleMessage message,
                         Transaction trans,
                         boolean synchronous)
                         throws MuleException
Throws:
MuleException

routeMessage

MuleMessage routeMessage(MuleMessage message,
                         OutputStream outputStream)
                         throws MuleException
Throws:
MuleException

routeMessage

MuleMessage routeMessage(MuleMessage message,
                         boolean synchronous,
                         OutputStream outputStream)
                         throws MuleException
Throws:
MuleException

routeMessage

MuleMessage routeMessage(MuleMessage message,
                         Transaction trans,
                         boolean synchronous,
                         OutputStream outputStream)
                         throws MuleException
Throws:
MuleException


Copyright © 2003-2008 MuleSource, Inc.. All Rights Reserved.