01: /*
02: * $Id: ResponseRouterCollection.java 10961 2008-02-22 19:01:02Z dfeist $
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.MuleEvent;
14: import org.mule.api.MuleException;
15: import org.mule.api.MuleMessage;
16: import org.mule.api.endpoint.InboundEndpoint;
17:
18: import java.util.List;
19:
20: /**
21: * <code>ResponseRouterCollection</code> is a router that can be used to control
22: * how the response in a request/response message flow is created. Its main use case
23: * is to aggregate a set of asynchonous events into a single response.
24: */
25:
26: public interface ResponseRouterCollection extends RouterCollection {
27: void route(MuleEvent event) throws RoutingException;
28:
29: MuleMessage getResponse(MuleMessage message) throws MuleException;
30:
31: ResponseRouter removeRouter(ResponseRouter router);
32:
33: void addEndpoint(InboundEndpoint endpoint);
34:
35: boolean removeEndpoint(InboundEndpoint endpoint);
36:
37: List getEndpoints();
38:
39: /**
40: * @param name the Endpoint identifier
41: * @return the Endpoint or null if the endpointUri is not registered
42: * @see ResponseRouterCollection
43: */
44: InboundEndpoint getEndpoint(String name);
45:
46: void setEndpoints(List endpoints);
47:
48: int getTimeout();
49:
50: void setTimeout(int timeout);
51:
52: boolean hasEndpoints();
53: }
|