01: /*
02: * $Id: DefaultInboundEndpoint.java 11311 2008-03-10 20:15:57Z 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.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
28: InboundEndpoint {
29:
30: private static final long serialVersionUID = -4752772777414636142L;
31:
32: public DefaultInboundEndpoint(Connector connector,
33: EndpointURI endpointUri, List transformers,
34: List responseTransformers, String name, Map properties,
35: TransactionConfig transactionConfig, Filter filter,
36: boolean deleteUnacceptedMessage,
37: EndpointSecurityFilter securityFilter, boolean synchronous,
38: boolean remoteSync, int remoteSyncTimeout,
39: String initialState, String endpointEncoding,
40: MuleContext muleContext,
41: ConnectionStrategy connectionStrategy) {
42: super (connector, endpointUri, transformers,
43: responseTransformers, name, properties,
44: transactionConfig, filter, deleteUnacceptedMessage,
45: securityFilter, synchronous, remoteSync,
46: remoteSyncTimeout, initialState, endpointEncoding,
47: muleContext, connectionStrategy);
48: }
49:
50: public MuleMessage request(long timeout) throws Exception {
51: if (getConnector() != null) {
52: return getConnector().request(this , timeout);
53: } else {
54: // TODO Either remove because this should never happen or i18n the
55: // message
56: throw new IllegalStateException(
57: "The connector on the endpoint: " + toString()
58: + " is null. Please contact "
59: + MuleManifest.getDevListEmail());
60: }
61: }
62:
63: }
|