1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
package org.mule.endpoint; |
12 | |
|
13 | |
import org.mule.api.MuleContext; |
14 | |
import org.mule.api.MuleMessage; |
15 | |
import org.mule.api.endpoint.EndpointURI; |
16 | |
import org.mule.api.endpoint.InboundEndpoint; |
17 | |
import org.mule.api.routing.filter.Filter; |
18 | |
import org.mule.api.security.EndpointSecurityFilter; |
19 | |
import org.mule.api.transaction.TransactionConfig; |
20 | |
import org.mule.api.transport.ConnectionStrategy; |
21 | |
import org.mule.api.transport.Connector; |
22 | |
import org.mule.config.MuleManifest; |
23 | |
|
24 | |
import java.util.List; |
25 | |
import java.util.Map; |
26 | |
|
27 | |
public class DefaultInboundEndpoint extends AbstractEndpoint implements InboundEndpoint |
28 | |
{ |
29 | |
|
30 | |
private static final long serialVersionUID = -4752772777414636142L; |
31 | |
|
32 | |
public DefaultInboundEndpoint(Connector connector, |
33 | |
EndpointURI endpointUri, |
34 | |
List transformers, |
35 | |
List responseTransformers, |
36 | |
String name, |
37 | |
Map properties, |
38 | |
TransactionConfig transactionConfig, |
39 | |
Filter filter, |
40 | |
boolean deleteUnacceptedMessage, |
41 | |
EndpointSecurityFilter securityFilter, |
42 | |
boolean synchronous, |
43 | |
boolean remoteSync, |
44 | |
int remoteSyncTimeout, |
45 | |
String initialState, |
46 | |
String endpointEncoding, |
47 | |
MuleContext muleContext, |
48 | |
ConnectionStrategy connectionStrategy) |
49 | |
{ |
50 | 68 | super(connector, endpointUri, transformers, responseTransformers, name, properties, transactionConfig, filter, |
51 | |
deleteUnacceptedMessage, securityFilter, synchronous, remoteSync, remoteSyncTimeout, initialState, |
52 | |
endpointEncoding, muleContext, connectionStrategy); |
53 | 68 | } |
54 | |
|
55 | |
public MuleMessage request(long timeout) throws Exception |
56 | |
{ |
57 | 0 | if (getConnector() != null) |
58 | |
{ |
59 | 0 | return getConnector().request(this, timeout); |
60 | |
} |
61 | |
else |
62 | |
{ |
63 | |
|
64 | |
|
65 | 0 | throw new IllegalStateException("The connector on the endpoint: " + toString() |
66 | |
+ " is null. Please contact " + MuleManifest.getDevListEmail()); |
67 | |
} |
68 | |
} |
69 | |
|
70 | |
} |