public static final class ServerEndpointConfig.Builder extends ObjectSE
ServerEndpointConfig.Builder
オブジェクトを作成するために使用されるクラスです。ここではいくつかの例を示します。
パスのみのエンドポイントのプレーン構成を構築します。
ServerEndpointConfig config = ServerEndpointConfig.Builder.create(ProgrammaticEndpoint.class, "/foo").build();
サブプロトコルとカスタムコンフィギュレーターなしで構成を構築します。
ServerEndpointConfig config = ServerEndpointConfig.Builder.create(ProgrammaticEndpoint.class, "/bar")
.subprotocols(subprotocols)
.configurator(new MyServerConfigurator())
.build();
修飾子と型 | メソッドと説明 |
---|---|
ServerEndpointConfig | build() このビルダーオブジェクトに設定されている現在の属性を使用して、構成オブジェクトを構築します。 |
ServerEndpointConfig.Builder | configurator(ServerEndpointConfig.Configurator serverEndpointConfigurator) このビルダーによってビルドされた構成オブジェクトで使用するカスタムコンフィギュレーターを設定します。 |
static ServerEndpointConfig.Builder | create(ClassSE<?> endpointClass, StringSE path) エンドポイントクラスの必須情報(プログラムまたはアノテーション付き)、使用する相対 URI または URI テンプレートを使用し、サブプロトコル、拡張機能、エンコーダー、デコーダー、カスタムコンフィギュレーターを使用せずにビルダーを作成します。 |
ServerEndpointConfig.Builder | decoders(ListSE<ClassSE<? extends Decoder>> decoders) 構成で使用するデコーダー実装クラスを設定します。 |
ServerEndpointConfig.Builder | encoders(ListSE<ClassSE<? extends Encoder>> encoders) このビルダーのエンコーダ実装クラスのリストを設定します。 |
ServerEndpointConfig.Builder | extensions(ListSE<Extension> extensions) 構成で使用する拡張機能を設定します。 |
ServerEndpointConfig.Builder | subprotocols(ListSE<StringSE> subprotocols) 構成で使用するサブプロトコルを設定します。 |
cloneSE, equalsSE, finalizeSE, getClassSE, hashCodeSE, notifySE, notifyAllSE, toStringSE, waitSE, waitSE, waitSE
public static ServerEndpointConfig.Builder create(ClassSE<?> endpointClass, StringSE path)
endpointClass
- 構成するエンドポイントのクラス path
- エンドポイントがデプロイされる URI または URI テンプレート。末尾の "/" は無視され、パスは / で始まる必要があります。public ServerEndpointConfig build()
public ServerEndpointConfig.Builder encoders(ListSE<ClassSE<? extends Encoder>> encoders)
encoders
- エンコーダ public ServerEndpointConfig.Builder decoders(ListSE<ClassSE<? extends Decoder>> decoders)
decoders
- デコーダ public ServerEndpointConfig.Builder subprotocols(ListSE<StringSE> subprotocols)
subprotocols
- サブプロトコル。public ServerEndpointConfig.Builder extensions(ListSE<Extension> extensions)
extensions
- 使用する拡張機能。public ServerEndpointConfig.Builder configurator(ServerEndpointConfig.Configurator serverEndpointConfigurator)
serverEndpointConfigurator
- コンフィギュレーター Copyright © 2018,2020 Eclipse Foundation.
Use is subject to license terms.