1 11 package org.eclipse.tomcat.internal; 12 import java.net.*; 13 14 import org.apache.naming.resources.*; 15 import org.osgi.service.url.*; 16 17 public class JndiURLHandler extends DirContextURLStreamHandler 18 implements 19 URLStreamHandlerService { 20 public URLConnection openConnection(URL u) throws java.io.IOException { 21 return super.openConnection(u); 22 } 23 24 28 protected URLStreamHandlerSetter realHandler; 29 30 41 public void parseURL(URLStreamHandlerSetter realHandler, URL u, 42 String spec, int start, int limit) { 43 this.realHandler = realHandler; 44 parseURL(u, spec, start, limit); 45 } 46 47 52 public String toExternalForm(URL u) { 53 return super.toExternalForm(u); 54 } 55 56 61 public boolean equals(URL u1, URL u2) { 62 return super.equals(u1, u2); 63 } 64 65 70 public int getDefaultPort() { 71 return super.getDefaultPort(); 72 } 73 74 79 public InetAddress getHostAddress(URL u) { 80 return super.getHostAddress(u); 81 } 82 83 88 public int hashCode(URL u) { 89 return super.hashCode(u); 90 } 91 92 97 public boolean hostsEqual(URL u1, URL u2) { 98 return super.hostsEqual(u1, u2); 99 } 100 101 106 public boolean sameFile(URL u1, URL u2) { 107 return super.sameFile(u1, u2); 108 } 109 110 118 protected void setURL(URL u, String proto, String host, int port, 119 String file, String ref) { 120 realHandler.setURL(u, proto, host, port, file, ref); 121 } 122 123 129 protected void setURL(URL u, String proto, String host, int port, 130 String auth, String user, String path, String query, String ref) { 131 realHandler.setURL(u, proto, host, port, auth, user, path, query, ref); 132 } 133 } 134 | Popular Tags |