|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.openide.util.HttpServer
Maps internal NetBeans resources such as repository objects to URLs. The mapping is delegated to an HTTP server module, which registers to do the mapping. It is also responsible for actually serving the individual data objects from the Repository and resources from the system classpath.
Inner Class Summary | |
static interface |
HttpServer.Impl
Implementation of the HTTP server. |
Method Summary | |
static boolean |
allowAccess(InetAddress addr)
Requests the server to allow access to it from a given IP address. |
static void |
deregisterServer(HttpServer.Impl server)
Deregister the system HTTP server. |
static URL |
getRepositoryRoot()
Map the repository root to a URL. |
static URL |
getRepositoryURL(FileObject fo)
Map a file object to a URL. |
static URL |
getResourceRoot()
Get URL root for a resource from system classpath. |
static URL |
getResourceURL(String resourcePath)
Map a resource path to a URL. |
static void |
registerServer(HttpServer.Impl server)
Register the system HTTP server. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static void registerServer(HttpServer.Impl server) throws SecurityException
ModuleInstall.installed()
or ModuleInstall.restored()
.server
- the server to registerSecurityException
- if there was already one registeredpublic static void deregisterServer(HttpServer.Impl server) throws SecurityException
ModuleInstall.uninstalled()
.server
- the server to deregisterSecurityException
- if the specified server was not the installed onepublic static URL getRepositoryURL(FileObject fo) throws MalformedURLException, UnknownHostException
fo
- the file object to representMalformedURLException
- for the usual reasonsUnknownHostException
- for the usual reasons, or if there is no registered serverpublic static URL getRepositoryRoot() throws MalformedURLException, UnknownHostException
MalformedURLException
- for the usual reasonsUnknownHostException
- for the usual reasons, or if there is no registered serverpublic static URL getResourceURL(String resourcePath) throws MalformedURLException, UnknownHostException
resourcePath
- path of the resource in classloader format (e.g. /some/path/resources/icon32.gif
)MalformedURLException
- for the usual reasonsUnknownHostException
- for the usual reasons, or if there is no registered serverClassLoader.getResource(java.lang.String)
,
TopManager.systemClassLoader()
public static URL getResourceRoot() throws MalformedURLException, UnknownHostException
resourcePath
- the resource pathMalformedURLException
- for the usual reasonsUnknownHostException
- for the usual reasonsgetResourceURL(java.lang.String)
public static 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 |