KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > mule > umo > provider > UMOMessageReceiver


1 /*
2  * $Id: UMOMessageReceiver.java 3798 2006-11-04 04:07:14Z aperepel $
3  * --------------------------------------------------------------------------------------
4  * Copyright (c) MuleSource, Inc. All rights reserved. http://www.mulesource.com
5  *
6  * The software in this package is published under the terms of the MuleSource MPL
7  * license, a copy of which has been included with this distribution in the
8  * LICENSE.txt file.
9  */

10
11 package org.mule.umo.provider;
12
13 import org.mule.umo.UMOComponent;
14 import org.mule.umo.endpoint.UMOEndpoint;
15 import org.mule.umo.endpoint.UMOEndpointURI;
16 import org.mule.umo.lifecycle.Lifecycle;
17
18 /**
19  * <code>UMOMessageReceiver</code> is used to receive data from an external system.
20  * Typically an implementation of this interface will also implement the listener
21  * interface for the external system. For example to listen to a JMS destination the
22  * developer would also implement javax.jms.MessageListener. The endpoint (which
23  * creates the UMOMessageReceiver) will then register the receiver with the JMS
24  * server. Where a listener interface is not availiable the derived
25  * <code>UMOMessageReceiver</code> will implement the code necessary to receive
26  * data from the external system. For example, the file endpoint will poll a
27  * specified directory for it's data.
28  *
29  * @author <a HREF="mailto:ross.mason@symphonysoft.com">Ross Mason</a>
30  * @version $Revision: 3798 $
31  */

32 public interface UMOMessageReceiver extends Lifecycle, UMOConnectable
33 {
34     /**
35      * @return the receivers endpoint
36      */

37     UMOEndpoint getEndpoint();
38
39     /**
40      * @param message
41      * @param exception
42      */

43     // void handleException(Object message, Throwable exception);
44
/**
45      * @return the component associated with the receiver
46      */

47     UMOComponent getComponent();
48
49     /**
50      * @param endpoint the endpoint to listen on
51      * @see UMOEndpoint
52      */

53     void setEndpoint(UMOEndpoint endpoint);
54
55     /**
56      * @param component the component to associate with the receiver. When data is
57      * received the component <code>dispatchEvent</code> or
58      * <code>sendEvent</code> is used to dispatch the data to the
59      * relivant UMO.
60      */

61     void setComponent(UMOComponent component);
62
63     void setConnector(UMOConnector connector);
64
65     UMOConnector getConnector();
66
67     /**
68      * The endpointUri that this receiver listens on
69      *
70      * @return
71      */

72     UMOEndpointURI getEndpointURI();
73
74 }
75
Popular Tags