|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.net.URLConnection | +--org.gloin.resource.protocol.jrap.JrapURLConnection
Implementation of URLConnection which looks up and uses a Jini
service in order to fullfil requests to load bytes for a given
"jrap" url. The discovered service, which fulfills requests to load
bytes from JRAP urls, will implement the interface,
net.gloin.resource.ResourceAccess
.
The reconnect
method of this class performs the steps
needed to lookup the ResourceAccess
service.
The getInputStream method actually delegates to
ResourceAccess.getResourceAsStream(String
resourceName)
. The byte[] result of calling this remote
method is in turn used by callers (e.g. URLClassLoader) in order to
load resource and/or classes for Jini applications.
Fields inherited from class java.net.URLConnection |
allowUserInteraction, connected, doInput, doOutput, ifModifiedSince, url, useCaches |
Constructor Summary | |
JrapURLConnection(java.net.URL u)
Construct a JrapURLConnection to load resources from the given url. |
Method Summary | |
void |
connect()
Discover a resource service and open a connection to it. |
boolean |
equals(java.lang.Object other)
|
java.lang.String |
getHeaderField(int n)
|
java.lang.String |
getHeaderField(java.lang.String name)
|
java.lang.String |
getHeaderFieldKey(int n)
|
java.io.InputStream |
getInputStream()
Delegates to discovered up ResourceAccess objects
in order to fulfill a request to load the bytes referenced by a
jrap url. |
java.io.OutputStream |
getOutputStream()
Get the output stream. |
java.security.Permission |
getPermission()
Permission to connect to a JRAP url implies the ability to connect to arbitrary hosts and ports (at least it does for now). |
int |
hashCode()
|
void |
setRequestHeader(java.lang.String name,
java.lang.String value)
|
Methods inherited from class java.net.URLConnection |
getAllowUserInteraction, getContent, getContent, getContentEncoding, getContentLength, getContentType, getDate, getDefaultAllowUserInteraction, getDefaultRequestProperty, getDefaultUseCaches, getDoInput, getDoOutput, getExpiration, getFileNameMap, getHeaderFieldDate, getHeaderFieldInt, getIfModifiedSince, getLastModified, 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, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public JrapURLConnection(java.net.URL u) throws java.net.MalformedURLException
url
- the url from which this connection will load
resources.Method Detail |
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
public void connect() throws java.io.IOException
connect
in class java.net.URLConnection
public void setRequestHeader(java.lang.String name, java.lang.String value)
public java.lang.String getHeaderFieldKey(int n)
getHeaderFieldKey
in class java.net.URLConnection
public java.lang.String getHeaderField(int n)
getHeaderField
in class java.net.URLConnection
public java.lang.String getHeaderField(java.lang.String name)
getHeaderField
in class java.net.URLConnection
public java.io.OutputStream getOutputStream() throws java.io.IOException
getOutputStream
in class java.net.URLConnection
public java.security.Permission getPermission() throws java.io.IOException
getPermission
in class java.net.URLConnection
public java.io.InputStream getInputStream() throws java.io.IOException
ResourceAccess
objects
in order to fulfill a request to load the bytes referenced by a
jrap url.
If this connection has not already looked up a
ResourceAccess
object, this method reconnects in
order to obtain an appropriate service object.getInputStream
in class java.net.URLConnection
ResourceAccess.getResourceAsStream
on download
ResourceAccess
objects.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |