クラス
java.net.ProxySelectorの使用
パッケージ | 説明 |
---|---|
java.net |
ネットワーク・アプリケーションを実装するためのクラスを提供します。
|
java.net.http |
HTTPクライアントおよびWebSocket API
|
-
java.netでのProxySelectorの使用
ProxySelectorを返すjava.netのメソッド 修飾子と型 メソッド 説明 static ProxySelector
ProxySelector. getDefault()
システム全体のプロキシ・セレクタを取得します。static ProxySelector
ProxySelector. of(InetSocketAddress proxyAddress)
指定されたプロキシ・アドレスをすべてのHTTPおよびHTTPSリクエストに使用するProxySelectorを返します。型ProxySelectorのパラメータを持つjava.netのメソッド 修飾子と型 メソッド 説明 static void
ProxySelector. setDefault(ProxySelector ps)
システム全体のプロキシ・セレクタを設定(または設定解除)します。 -
java.net.httpでのProxySelectorの使用
ProxySelectorとして宣言されたjava.net.httpのフィールド 修飾子と型 フィールド 説明 static ProxySelector
HttpClient.Builder. NO_PROXY
直接接続を意味するProxy.NO_PROXY
を常に返すプロキシ・セレクタ。型ProxySelectorの引数を持つ型を返すjava.net.httpのメソッド 修飾子と型 メソッド 説明 abstract Optional<ProxySelector>
HttpClient. proxy()
このクライアントに提供されたProxySelector
を含むOptional
を返します。型ProxySelectorのパラメータを持つjava.net.httpのメソッド 修飾子と型 メソッド 説明 HttpClient.Builder
HttpClient.Builder. proxy(ProxySelector proxySelector)
ProxySelector
を設定します。