|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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 javax.naming.directory.Attributes |
attributes
Attributes. |
protected javax.naming.directory.DirContext |
collection
Associated DirContext. |
protected javax.naming.directory.DirContext |
context
Directory context. |
protected long |
date
Date. |
protected java.lang.Object |
object
Other unknown object. |
protected java.security.Permission |
permission
Permission |
protected Resource |
resource
Associated resource. |
Fields inherited from class java.net.URLConnection |
allowUserInteraction, connected, doInput, doOutput, ifModifiedSince, url, useCaches |
Constructor Summary | |
DirContextURLConnection(javax.naming.directory.DirContext context,
java.net.URL url)
|
Method Summary | |
void |
connect()
Connect to the DirContext, and retrive the bound object, as well as its attributes. |
java.lang.Object |
getContent()
Get object content. |
java.lang.Object |
getContent(java.lang.Class[] classes)
Get object content. |
int |
getContentLength()
Return the content length value. |
java.lang.String |
getContentType()
Return the content type value. |
long |
getDate()
Return the last modified date. |
java.lang.String |
getHeaderField(java.lang.String name)
Returns the name of the specified header field. |
java.io.InputStream |
getInputStream()
Get input stream. |
long |
getLastModified()
Return the last modified date. |
java.security.Permission |
getPermission()
Get the Permission for this URL |
java.util.Enumeration |
list()
List children of this collection. |
Methods inherited from class java.net.URLConnection |
addRequestProperty, getAllowUserInteraction, getContentEncoding, getDefaultAllowUserInteraction, getDefaultRequestProperty, getDefaultUseCaches, getDoInput, getDoOutput, getExpiration, getFileNameMap, getHeaderField, getHeaderFieldDate, getHeaderFieldInt, getHeaderFieldKey, getHeaderFields, getIfModifiedSince, getOutputStream, getRequestProperties, getRequestProperty, getURL, getUseCaches, guessContentTypeFromName, guessContentTypeFromStream, setAllowUserInteraction, setContentHandlerFactory, setDefaultAllowUserInteraction, setDefaultRequestProperty, setDefaultUseCaches, setDoInput, setDoOutput, setFileNameMap, setIfModifiedSince, setRequestProperty, setUseCaches, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected javax.naming.directory.DirContext context
protected Resource resource
protected javax.naming.directory.DirContext collection
protected java.lang.Object object
protected javax.naming.directory.Attributes attributes
protected long date
protected java.security.Permission permission
Constructor Detail |
public DirContextURLConnection(javax.naming.directory.DirContext context, java.net.URL url)
Method Detail |
public void connect() throws java.io.IOException
connect
in class java.net.URLConnection
java.io.IOException
- Object not foundpublic int getContentLength()
getContentLength
in class java.net.URLConnection
public java.lang.String getContentType()
getContentType
in class java.net.URLConnection
public long getDate()
getDate
in class java.net.URLConnection
public long getLastModified()
getLastModified
in class java.net.URLConnection
public java.lang.String getHeaderField(java.lang.String name)
getHeaderField
in class java.net.URLConnection
public java.lang.Object getContent() throws java.io.IOException
getContent
in class java.net.URLConnection
java.io.IOException
public java.lang.Object getContent(java.lang.Class[] classes) throws java.io.IOException
getContent
in class java.net.URLConnection
java.io.IOException
public java.io.InputStream getInputStream() throws java.io.IOException
getInputStream
in class java.net.URLConnection
java.io.IOException
public java.security.Permission getPermission()
getPermission
in class java.net.URLConnection
public java.util.Enumeration list() throws java.io.IOException
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |