KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > mule > umo > routing > UMOOutboundMessageRouter


1 /*
2  * $Id: UMOOutboundMessageRouter.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.routing;
12
13 import org.mule.umo.MessagingException;
14 import org.mule.umo.UMOMessage;
15 import org.mule.umo.UMOSession;
16 import org.mule.umo.endpoint.UMOEndpoint;
17
18 /**
19  * <code>UMOOutboundMessageRouter</code> TODO
20  *
21  * @author <a HREF="mailto:ross.mason@symphonysoft.com">Ross Mason</a>
22  * @version $Revision: 3798 $
23  */

24
25 public interface UMOOutboundMessageRouter extends UMORouterCollection
26 {
27     /**
28      * Prepares one or more events to be dispached by a Message Dispatcher
29      *
30      * @param message The source Message
31      * @param session The current session
32      * @return a list containing 0 or events to be dispatched
33      * @throws RoutingException If any of the events cannot be created.
34      */

35     UMOMessage route(UMOMessage message, UMOSession session, boolean synchronous) throws MessagingException;
36
37     /**
38      * A helper method for finding out which endpoints a message would be routed to
39      * without actually routing the the message
40      *
41      * @param message the message to retrieve endpoints for
42      * @return an array of UMOEndpoint objects or an empty array
43      * @throws RoutingException if there is a filter exception
44      */

45     UMOEndpoint[] getEndpointsForMessage(UMOMessage message) throws MessagingException;
46
47     /**
48      * Determines if any endpoints have been set on this router
49      *
50      * @return
51      */

52     public boolean hasEndpoints();
53 }
54
Popular Tags