|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Implementation of the HTTP server. Must be implemented by classes which want to register as a server.
Such a server must be prepared to specially serve pages from
within the IDE, i.e. the Repository and the system class
loader. (It may also serve external pages, if desired.) It should
have a system option specifying at least the port number (by
default, an unused port above 1000), the host access
restrictions (by default, only localhost
),
and an toggle to disable it. It should provide URLs using the
protocol http
so as not to need to register a new protocol
handler.
Method Summary | |
boolean |
allowAccess(InetAddress addr)
Requests the server to allow access to it from a given IP address. |
URL |
getRepositoryRoot()
Get the URL for the Repository. |
URL |
getRepositoryURL(FileObject fo)
Get the URL for a file object. |
URL |
getResourceRoot()
Get URL root for a resource from system classpath. |
URL |
getResourceURL(String resourcePath)
Get the URL for a resource from system classpath. |
Method Detail |
public URL getRepositoryURL(FileObject fo) throws MalformedURLException, UnknownHostException
fo
- the file objectMalformedURLException
- for the usual reasonsUnknownHostException
- for the usual reasonsHttpServer.getRepositoryURL(org.openide.filesystems.FileObject)
public URL getRepositoryRoot() throws MalformedURLException, UnknownHostException
MalformedURLException
- for the usual reasonsUnknownHostException
- for the usual reasonsHttpServer.getRepositoryRoot()
public URL getResourceURL(String resourcePath) throws MalformedURLException, UnknownHostException
resourcePath
- the resource pathMalformedURLException
- for the usual reasonsUnknownHostException
- for the usual reasonsHttpServer.getResourceURL(java.lang.String)
public URL getResourceRoot() throws MalformedURLException, UnknownHostException
resourcePath
- the resource pathMalformedURLException
- for the usual reasonsUnknownHostException
- for the usual reasonsHttpServer.getResourceURL(java.lang.String)
public boolean allowAccess(InetAddress addr) throws UnknownHostException
addr
- address for which access is requestedtrue
if access has been granted
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |