站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > NetBeans API Javadoc 4.1.0

HttpServer.Impl (NetBeans APIs) - NetBeans API Javadoc 4.1.0


org.openide.util
Interface HttpServer.Impl

Enclosing interface:
HttpServer

Deprecated. Useful only for HttpServer which is itself deprecated.

public static interface HttpServer.Impl

Implementation of the HTTP server. Must be implemented by classes which want to register as a server. Implementations are obtained using Lookup.

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)
          Deprecated. Requests the server to allow access to it from a given IP address.
 URL getRepositoryRoot()
          Deprecated. Get the URL for the Repository.
 URL getRepositoryURL(FileObject fo)
          Deprecated. Get the URL for a file object.
 URL getResourceRoot()
          Deprecated. Get URL root for a resource from system classpath.
 URL getResourceURL(String resourcePath)
          Deprecated. Get the URL for a resource from system classpath.
 

Method Detail

getRepositoryURL

public URL getRepositoryURL(FileObject fo)
                     throws MalformedURLException,
                            UnknownHostException
Deprecated. 
Get the URL for a file object.

Parameters:
fo - the file object
Returns:
the URL
Throws:
MalformedURLException - for the usual reasons
UnknownHostException - for the usual reasons
See Also:
HttpServer.getRepositoryURL(org.openide.filesystems.FileObject)

getRepositoryRoot

public URL getRepositoryRoot()
                      throws MalformedURLException,
                             UnknownHostException
Deprecated. 
Get the URL for the Repository. For this URL, the implementation should display a page containing a list of links to subdirectories (packages).

Returns:
the URL
Throws:
MalformedURLException - for the usual reasons
UnknownHostException - for the usual reasons
See Also:
HttpServer.getRepositoryRoot()

getResourceURL

public URL getResourceURL(String resourcePath)
                   throws MalformedURLException,
                          UnknownHostException
Deprecated. 
Get the URL for a resource from system classpath. The URL must comply to java naming conventions, i.e. the URL must end with a fully qualified resource name.

Parameters:
resourcePath - the resource path
Returns:
the URL
Throws:
MalformedURLException - for the usual reasons
UnknownHostException - for the usual reasons
See Also:
HttpServer.getResourceURL(java.lang.String)

getResourceRoot

public URL getResourceRoot()
                    throws MalformedURLException,
                           UnknownHostException
Deprecated. 
Get URL root for a resource from system classpath.

Returns:
the URL
Throws:
MalformedURLException - for the usual reasons
UnknownHostException - for the usual reasons
See Also:
HttpServer.getResourceURL(java.lang.String)

allowAccess

public boolean allowAccess(InetAddress addr)
                    throws UnknownHostException
Deprecated. 
Requests the server to allow access to it from a given IP address. This can be useful if a module wishes another machine to be able to access the server, such as a machine running a deployment server. The server may or may not grant access to the IP address, for example if the user does not wish to grant access to the IP address.

Parameters:
addr - address for which access is requested
Returns:
true if access has been granted
Throws:
UnknownHostException


Built on May 4 2005.  |  Portions Copyright 1997-2005 Sun Microsystems, Inc. All rights reserved.