01: /*
02: * $Id: OutboundRouterCollection.java 10865 2008-02-18 20:26:43Z acooke $
03: * --------------------------------------------------------------------------------------
04: * Copyright (c) MuleSource, Inc. All rights reserved. http://www.mulesource.com
05: *
06: * The software in this package is published under the terms of the CPAL v1.0
07: * license, a copy of which has been included with this distribution in the
08: * LICENSE.txt file.
09: */
10:
11: package org.mule.api.routing;
12:
13: import org.mule.api.MessagingException;
14: import org.mule.api.MuleMessage;
15: import org.mule.api.MuleSession;
16: import org.mule.api.endpoint.ImmutableEndpoint;
17:
18: /**
19: * <code>OutboundRouterCollection</code> is responsible for holding all outbound routers for a service service.
20: */
21:
22: public interface OutboundRouterCollection extends RouterCollection {
23: /**
24: * Prepares one or more events to be dispached by a Message Dispatcher.
25: *
26: * @param message The source Message
27: * @param session The current session
28: * @return a list containing 0 or events to be dispatched
29: * @throws RoutingException If any of the events cannot be created.
30: */
31: MuleMessage route(MuleMessage message, MuleSession session,
32: boolean synchronous) throws MessagingException;
33:
34: /**
35: * Determines if any endpoints have been set on this router.
36: *
37: * @return
38: */
39: boolean hasEndpoints();
40: }
|