1 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 25 26 public class UrlEndpointBuilder extends AbstractEndpointBuilder 27 { 28 29 protected void setEndpoint(URI uri, Properties props) throws MalformedEndpointException 30 { 31 address = ""; 32 if (uri.getHost() != null) 33 { 34 this.address = uri.getScheme() + "://" + uri.getHost(); 36 if (uri.getPort() != -1) 37 { 38 address += ":" + uri.getPort(); 39 } 40 } 41 if (uri.getPath() != null) 42 { 43 address += uri.getPath(); 44 } 45 46 if (uri.getQuery() != null) 47 { 48 address += "?" + uri.getQuery(); 49 } 50 } 51 } 52 | Popular Tags |