Save This Page
Home » apache-tomcat-6.0.16-src » org.apache » naming » resources » [javadoc | source]
org.apache.naming.resources
public class: DirContextURLConnection [javadoc | source]
java.lang.Object
   java.net.URLConnection
      org.apache.naming.resources.DirContextURLConnection
Connection to a JNDI directory context.

Note: All the object attribute names are the WebDAV names, not the HTTP names, so this class overrides some methods from URLConnection to do the queries using the right names. Content handler is also not used; the content is directly returned.

Field Summary
protected  DirContext context    Directory context. 
protected  Resource resource    Associated resource. 
protected  DirContext collection    Associated DirContext. 
protected  Object object    Other unknown object. 
protected  Attributes attributes    Attributes. 
protected  long date    Date. 
protected  Permission permission    Permission 
Constructor:
 public DirContextURLConnection(DirContext context,
    URL url) 
Method from org.apache.naming.resources.DirContextURLConnection Summary:
connect,   getContent,   getContent,   getContentLength,   getContentType,   getDate,   getHeaderField,   getInputStream,   getLastModified,   getPermission,   list
Methods from java.net.URLConnection:
addRequestProperty,   connect,   getAllowUserInteraction,   getConnectTimeout,   getContent,   getContent,   getContentEncoding,   getContentLength,   getContentType,   getDate,   getDefaultAllowUserInteraction,   getDefaultRequestProperty,   getDefaultUseCaches,   getDoInput,   getDoOutput,   getExpiration,   getFileNameMap,   getHeaderField,   getHeaderField,   getHeaderFieldDate,   getHeaderFieldInt,   getHeaderFieldKey,   getHeaderFields,   getIfModifiedSince,   getInputStream,   getLastModified,   getOutputStream,   getPermission,   getReadTimeout,   getRequestProperties,   getRequestProperty,   getURL,   getUseCaches,   guessContentTypeFromName,   guessContentTypeFromStream,   setAllowUserInteraction,   setConnectTimeout,   setContentHandlerFactory,   setDefaultAllowUserInteraction,   setDefaultRequestProperty,   setDefaultUseCaches,   setDoInput,   setDoOutput,   setFileNameMap,   setIfModifiedSince,   setReadTimeout,   setRequestProperty,   setUseCaches,   toString
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.naming.resources.DirContextURLConnection Detail:
 public  void connect() throws IOException 
    Connect to the DirContext, and retrive the bound object, as well as its attributes. If no object is bound with the name specified in the URL, then an IOException is thrown.
 public Object getContent() throws IOException 
    Get object content.
 public Object getContent(Class[] classes) throws IOException 
    Get object content.
 public int getContentLength() 
    Return the content length value.
 public String getContentType() 
    Return the content type value.
 public long getDate() 
    Return the last modified date.
 public String getHeaderField(String name) 
    Returns the name of the specified header field.
 public InputStream getInputStream() throws IOException 
    Get input stream.
 public long getLastModified() 
    Return the last modified date.
 public Permission getPermission() 
    Get the Permission for this URL
 public Enumeration list() throws IOException 
    List children of this collection. The names given are relative to this URI's path. The full uri of the children is then : path + "/" + name.