public abstract class HttpsServer extends HttpServer
HttpServer
の拡張です。
HttpsServer には、SSL 接続の SSL 構成を設定するために使用する HttpsConfigurator
オブジェクトが関連付けられている必要があります。
ほかのすべての構成は HttpServer の場合と同じです。
修飾子 | コンストラクタと説明 |
---|---|
protected |
HttpsServer() |
修飾子と型 | メソッドと説明 |
---|---|
static HttpsServer |
create()
最初にローカルアドレス/ポートにバインドされていない HttpsServer インスタンスを作成します。
|
static HttpsServer |
create(InetSocketAddress addr, int backlog)
指定された
InetSocketAddress (IP アドレスとポート番号) にバインドする HttpsServer インスタンスを作成します。
最大バックログも指定できます。 |
abstract HttpsConfigurator |
getHttpsConfigurator()
このサーバーの
HttpsConfigurator オブジェクトが設定されている場合は、それを取得します。 |
abstract void |
setHttpsConfigurator(HttpsConfigurator config)
このサーバーの
HttpsConfigurator オブジェクトを設定します。 |
bind, createContext, createContext, getAddress, getExecutor, removeContext, removeContext, setExecutor, start, stop
public static HttpsServer create() throws IOException
HttpServerProvider
から取得します。このサーバーは、HttpServer.bind(InetSocketAddress,int)
を使用してバインドしてからでないと使用できません。また、このサーバーでは、setHttpsConfigurator(HttpsConfigurator)
で HttpsConfigurator が設定されている必要があります。IOException
public static HttpsServer create(InetSocketAddress addr, int backlog) throws IOException
InetSocketAddress
(IP アドレスとポート番号) にバインドする HttpsServer
インスタンスを作成します。
最大バックログも指定できます。これは、待機中のソケットでキューに入れることができる着信接続の最大数です。キューに入れられた TCP 接続がこの上限を超える場合は、TCP 実装で拒否されることがあります。HttpsServer は、現在インストールされている HttpServerProvider
から取得します。このサーバーでは、setHttpsConfigurator(HttpsConfigurator)
で HttpsConfigurator が設定されている必要があります。addr
- 待機するアドレス。null
の場合は、bind() を呼び出してアドレスを設定する必要があるbacklog
- ソケットのバックログ。この値がゼロ以下の場合は、システムデフォルト値が使用される。BindException
- サーバーが要求されたアドレスをバインドできない場合、またはサーバーがすでにバインドされている場合。IOException
public abstract void setHttpsConfigurator(HttpsConfigurator config)
HttpsConfigurator
オブジェクトを設定します。config
- 設定する HttpsConfiguratorNullPointerException
- config が null の場合。public abstract HttpsConfigurator getHttpsConfigurator()
HttpsConfigurator
オブジェクトが設定されている場合は、それを取得します。null
。
Copyright © 2005, 2013, Oracle and/or its affiliates. All rights reserved.