|
Java HTTP Server | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.sun.net.httpserver.HttpServer com.sun.net.httpserver.HttpsServer
public abstract class HttpsServer
This class is an extension of HttpServer
which provides
support for HTTPS.
A HttpsServer must have an associated HttpsConfigurator
object
which is used to establish the SSL configuration for the SSL connections.
All other configuration is the same as for HttpServer.
Constructor Summary | |
---|---|
protected |
HttpsServer()
|
Method Summary | |
---|---|
static HttpsServer |
create()
creates a HttpsServer instance which is initially not bound to any local address/port. |
static HttpsServer |
create(InetSocketAddress addr,
int backlog)
Create a HttpsServer instance which will bind to the
specified InetSocketAddress (IP address and port number)
A maximum backlog can also be specified. |
abstract HttpsConfigurator |
getHttpsConfigurator()
Gets this server's HttpsConfigurator object, if it has been set. |
abstract void |
setHttpsConfigurator(HttpsConfigurator config)
Sets this server's HttpsConfigurator object. |
Methods inherited from class com.sun.net.httpserver.HttpServer |
---|
bind, createContext, createContext, getAddress, getExecutor, removeContext, removeContext, setExecutor, start, stop |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected HttpsServer()
Method Detail |
---|
public static HttpsServer create() throws IOException
HttpServerProvider
The server must be bound using HttpServer.bind(InetSocketAddress,int)
before it can be used.
The server must also have a HttpsConfigurator established with setHttpsConfigurator(HttpsConfigurator)
IOException
public static HttpsServer create(InetSocketAddress addr, int backlog) throws IOException
HttpsServer
instance which will bind to the
specified InetSocketAddress
(IP address and port number)
A maximum backlog can also be specified. This is the maximum number of
queued incoming connections to allow on the listening socket.
Queued TCP connections exceeding this limit may be rejected by the TCP implementation.
The HttpsServer is acquired from the currently installed HttpServerProvider
The server must have a HttpsConfigurator established with setHttpsConfigurator(HttpsConfigurator)
addr
- the address to listen on, if null
then bind() must be called
to set the addressbacklog
- the socket backlog. If this value is less than or equal to zero,
then a system default value is used.
BindException
- if the server cannot bind to the requested address,
or if the server is already bound.
IOException
public abstract void setHttpsConfigurator(HttpsConfigurator config)
HttpsConfigurator
object.
config
- the HttpsConfigurator to set
NullPointerException
- if config is null.public abstract HttpsConfigurator getHttpsConfigurator()
HttpsConfigurator
object, if it has been set.
null
if not set.
|
Java HTTP Server | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |