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.endpoint.EndpointException; |
15 | |
import org.mule.api.endpoint.EndpointURI; |
16 | |
import org.mule.api.endpoint.ImmutableEndpoint; |
17 | |
import org.mule.api.processor.MessageProcessor; |
18 | |
|
19 | |
import java.util.Collections; |
20 | |
|
21 | |
public class EndpointURIEndpointBuilder extends AbstractEndpointBuilder |
22 | |
{ |
23 | |
|
24 | |
public EndpointURIEndpointBuilder() |
25 | |
{ |
26 | 0 | super(); |
27 | 0 | } |
28 | |
|
29 | |
|
30 | |
|
31 | |
|
32 | |
|
33 | |
|
34 | |
public EndpointURIEndpointBuilder(EndpointURIEndpointBuilder global) throws EndpointException |
35 | |
{ |
36 | 0 | super(); |
37 | |
|
38 | |
|
39 | |
|
40 | |
|
41 | 0 | uriBuilder = global.uriBuilder; |
42 | 0 | connector = global.connector; |
43 | 0 | name = global.name; |
44 | |
|
45 | 0 | properties = global.properties; |
46 | 0 | transactionConfig = global.transactionConfig; |
47 | 0 | deleteUnacceptedMessages = global.deleteUnacceptedMessages; |
48 | 0 | synchronous = global.synchronous; |
49 | 0 | messageExchangePattern = global.messageExchangePattern; |
50 | 0 | responseTimeout = global.responseTimeout; |
51 | 0 | encoding = global.encoding; |
52 | 0 | retryPolicyTemplate = global.retryPolicyTemplate; |
53 | 0 | messageProcessors = global.messageProcessors; |
54 | 0 | responseMessageProcessors = global.responseMessageProcessors; |
55 | 0 | mimeType = global.mimeType; |
56 | 0 | disableTransportTransformer = global.disableTransportTransformer; |
57 | 0 | transformers = global.transformers; |
58 | 0 | responseTransformers = global.responseTransformers; |
59 | |
|
60 | 0 | } |
61 | |
|
62 | |
public EndpointURIEndpointBuilder(URIBuilder builder) |
63 | |
{ |
64 | 0 | super(); |
65 | 0 | this.uriBuilder = builder; |
66 | 0 | this.muleContext = builder.getMuleContext(); |
67 | 0 | } |
68 | |
|
69 | |
public EndpointURIEndpointBuilder(String address, MuleContext muleContext) |
70 | |
{ |
71 | 0 | this(new URIBuilder(address, muleContext)); |
72 | 0 | } |
73 | |
|
74 | |
protected EndpointURIEndpointBuilder(EndpointURI endpointURI) |
75 | |
{ |
76 | 0 | this(new URIBuilder(endpointURI)); |
77 | 0 | } |
78 | |
|
79 | |
public EndpointURIEndpointBuilder(ImmutableEndpoint source) |
80 | |
{ |
81 | 0 | this(source.getEndpointURI()); |
82 | 0 | setName(source.getName()); |
83 | 0 | setEncoding(source.getEncoding()); |
84 | 0 | setConnector(source.getConnector()); |
85 | 0 | setProperties(source.getProperties()); |
86 | 0 | setTransactionConfig(source.getTransactionConfig()); |
87 | 0 | setDeleteUnacceptedMessages(source.isDeleteUnacceptedMessages()); |
88 | 0 | setInitialState(source.getInitialState()); |
89 | 0 | setResponseTimeout(source.getResponseTimeout()); |
90 | 0 | setRetryPolicyTemplate(source.getRetryPolicyTemplate()); |
91 | 0 | setExchangePattern(source.getExchangePattern()); |
92 | 0 | setMuleContext(source.getMuleContext()); |
93 | 0 | setMessageProcessors(source.getMessageProcessors().isEmpty() ? Collections.<MessageProcessor>emptyList() : source.getMessageProcessors()); |
94 | 0 | setResponseMessageProcessors(source.getResponseMessageProcessors().isEmpty() ? Collections.<MessageProcessor>emptyList() : source.getResponseMessageProcessors()); |
95 | 0 | setDisableTransportTransformer(source.isDisableTransportTransformer()); |
96 | 0 | setMimeType(source.getMimeType()); |
97 | 0 | } |
98 | |
} |