01: /*
02: * $Id: EndpointBuilder.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.endpoint;
12:
13: import org.mule.api.MuleContext;
14: import org.mule.api.context.MuleContextAware;
15: import org.mule.api.lifecycle.InitialisationException;
16: import org.mule.api.routing.filter.Filter;
17: import org.mule.api.security.EndpointSecurityFilter;
18: import org.mule.api.transaction.TransactionConfig;
19: import org.mule.api.transformer.Transformer;
20: import org.mule.api.transport.ConnectionStrategy;
21: import org.mule.api.transport.Connector;
22: import org.mule.endpoint.URIBuilder;
23:
24: import java.util.List;
25: import java.util.Map;
26:
27: /**
28: * Constructs endpoints. Transport specific endpoints can easily resolve the Endpoint implementation to be
29: * uses, for generic endpoints we can either resolve the transport from uri string or use a default
30: * implementation.
31: */
32: public interface EndpointBuilder extends MuleContextAware, Cloneable {
33:
34: /**
35: * Constructs inbound endpoints
36: *
37: * @return
38: * @throws EndpointException
39: * @throws InitialisationException
40: */
41: InboundEndpoint buildInboundEndpoint() throws EndpointException,
42: InitialisationException;
43:
44: /**
45: * Constructs outbound endpoints
46: *
47: * @return
48: * @throws EndpointException
49: * @throws InitialisationException
50: */
51: OutboundEndpoint buildOutboundEndpoint() throws EndpointException,
52: InitialisationException;
53:
54: void setConnector(Connector connector);
55:
56: void addTransformer(Transformer transformer);
57:
58: void setTransformers(List transformers);
59:
60: void setResponseTransformers(List responseTransformer);
61:
62: void setName(String name);
63:
64: void setProperty(Object key, Object value);
65:
66: void setProperties(Map properties);
67:
68: void setTransactionConfig(TransactionConfig transactionConfig);
69:
70: void setFilter(Filter filter);
71:
72: void setDeleteUnacceptedMessages(boolean deleteUnacceptedMessages);
73:
74: void setSecurityFilter(EndpointSecurityFilter securityFilter);
75:
76: void setSynchronous(boolean synchronous);
77:
78: void setRemoteSync(boolean remoteSync);
79:
80: void setRemoteSyncTimeout(int remoteSyncTimeout);
81:
82: void setInitialState(String initialState);
83:
84: void setEncoding(String encoding);
85:
86: void setRegistryId(String registryId);
87:
88: void setMuleContext(MuleContext muleContext);
89:
90: void setConnectionStrategy(ConnectionStrategy connectionStrategy);
91:
92: void setURIBuilder(URIBuilder URIBuilder);
93:
94: Object clone() throws CloneNotSupportedException;
95:
96: }
|