Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
ResponseRouterCollection |
|
| 1.0;1 |
1 | /* | |
2 | * $Id: ResponseRouterCollection.java 10961 2008-02-22 19:01:02Z dfeist $ | |
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 CPAL v1.0 | |
7 | * license, a copy of which has been included with this distribution in the | |
8 | * LICENSE.txt file. | |
9 | */ | |
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 | { | |
28 | void route(MuleEvent event) throws RoutingException; | |
29 | ||
30 | MuleMessage getResponse(MuleMessage message) throws MuleException; | |
31 | ||
32 | ResponseRouter removeRouter(ResponseRouter router); | |
33 | ||
34 | void addEndpoint(InboundEndpoint endpoint); | |
35 | ||
36 | boolean removeEndpoint(InboundEndpoint endpoint); | |
37 | ||
38 | List getEndpoints(); | |
39 | ||
40 | /** | |
41 | * @param name the Endpoint identifier | |
42 | * @return the Endpoint or null if the endpointUri is not registered | |
43 | * @see ResponseRouterCollection | |
44 | */ | |
45 | InboundEndpoint getEndpoint(String name); | |
46 | ||
47 | void setEndpoints(List endpoints); | |
48 | ||
49 | int getTimeout(); | |
50 | ||
51 | void setTimeout(int timeout); | |
52 | ||
53 | boolean hasEndpoints(); | |
54 | } |