|
Apache Tomcat 7.0.28 | ||||||||
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
public class 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 Attributes |
attributes
Attributes. |
protected DirContext |
collection
Associated DirContext. |
protected DirContext |
context
Directory context. |
protected long |
date
Date. |
protected Object |
object
Other unknown object. |
protected 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(DirContext context,
URL url)
|
Method Summary | |
---|---|
void |
connect()
Connect to the DirContext, and retrieve the bound object, as well as its attributes. |
Object |
getContent()
Get object content. |
Object |
getContent(Class[] classes)
Get object content. |
int |
getContentLength()
Return the content length value. |
String |
getContentType()
Return the content type value. |
long |
getDate()
Return the last modified date. |
String |
getHeaderField(String name)
Returns the name of the specified header field. |
Map<String,List<String>> |
getHeaderFields()
Returns an unmodifiable Map of the header fields. |
protected String |
getHeaderValueAsString(Object headerValue)
|
InputStream |
getInputStream()
Get input stream. |
long |
getLastModified()
Return the last modified date. |
Permission |
getPermission()
Get the Permission for this URL |
Enumeration<String> |
list()
List children of this collection. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected DirContext context
protected Resource resource
protected DirContext collection
protected Object object
protected Attributes attributes
protected long date
protected Permission permission
Constructor Detail |
---|
public DirContextURLConnection(DirContext context, URL url)
Method Detail |
---|
public void connect() throws IOException
connect
in class URLConnection
IOException
- Object not foundpublic int getContentLength()
getContentLength
in class URLConnection
public String getContentType()
getContentType
in class URLConnection
public long getDate()
getDate
in class URLConnection
public long getLastModified()
getLastModified
in class URLConnection
protected String getHeaderValueAsString(Object headerValue)
public Map<String,List<String>> getHeaderFields()
getHeaderFields
in class URLConnection
public String getHeaderField(String name)
getHeaderField
in class URLConnection
public Object getContent() throws IOException
getContent
in class URLConnection
IOException
public Object getContent(Class[] classes) throws IOException
getContent
in class URLConnection
IOException
public InputStream getInputStream() throws IOException
getInputStream
in class URLConnection
IOException
public Permission getPermission()
getPermission
in class URLConnection
public Enumeration<String> list() throws IOException
IOException
|
Apache Tomcat 7.0.28 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |