1
2
3
4
5
6
7
8
9
10
11 package org.mule.impl.endpoint;
12
13 import org.mule.umo.endpoint.MalformedEndpointException;
14
15 import java.net.URI;
16 import java.util.Properties;
17
18
19
20
21
22
23 public class UrlEndpointBuilder extends AbstractEndpointBuilder
24 {
25
26 protected void setEndpoint(URI uri, Properties props) throws MalformedEndpointException
27 {
28 address = "";
29 if (uri.getHost() != null)
30 {
31
32 this.address = uri.getScheme() + "://" + uri.getHost();
33 if (uri.getPort() != -1)
34 {
35 address += ":" + uri.getPort();
36 }
37 }
38 if (uri.getPath() != null)
39 {
40 address += uri.getPath();
41 }
42
43 if (uri.getQuery() != null)
44 {
45 address += "?" + uri.getQuery();
46 }
47 }
48 }