Package org.glassfish.tyrus.spi
Interface ClientContainer
-
- All Known Implementing Classes:
JdkClientContainer
public interface ClientContainerEntry point for client implementation.- Author:
- Pavel Bucek
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringINCOMING_BUFFER_SIZEDeprecated.please useorg.glassfish.tyrus.client.ClientProperties#INCOMING_BUFFER_SIZE.static java.lang.StringWLS_INCOMING_BUFFER_SIZEWLS version ofINCOMING_BUFFER_SIZE.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidopenClientSocket(ClientEndpointConfig cec, java.util.Map<java.lang.String,java.lang.Object> properties, ClientEngine clientEngine)Open client socket - connect to endpoint specified withurlparameter.
-
-
-
Field Detail
-
INCOMING_BUFFER_SIZE
static final java.lang.String INCOMING_BUFFER_SIZE
Deprecated.please useorg.glassfish.tyrus.client.ClientProperties#INCOMING_BUFFER_SIZE.Property name for maximal incoming buffer size.Can be set in properties map (see
openClientSocket(jakarta.websocket.ClientEndpointConfig, java.util.Map, ClientEngine)).- See Also:
- Constant Field Values
-
WLS_INCOMING_BUFFER_SIZE
static final java.lang.String WLS_INCOMING_BUFFER_SIZE
WLS version ofINCOMING_BUFFER_SIZE.- See Also:
- Constant Field Values
-
-
Method Detail
-
openClientSocket
void openClientSocket(ClientEndpointConfig cec, java.util.Map<java.lang.String,java.lang.Object> properties, ClientEngine clientEngine) throws DeploymentException, java.io.IOException
Open client socket - connect to endpoint specified withurlparameter.Called from ClientManager when
WebSocketContainer.connectToServer(Class, jakarta.websocket.ClientEndpointConfig, java.net.URI)is invoked.- Parameters:
cec- endpoint configuration. SPI consumer can access user properties,ClientEndpointConfig.Configurator, extensions and subprotocol configuration, etc..properties- properties passed from client container. Don't mix up this withEndpointConfig.getUserProperties(), these are Tyrus proprietary.clientEngine- one instance equals to one connection, cannot be reused. Implementation is expected to callClientEngine.createUpgradeRequest(ClientEngine.TimeoutHandler)andClientEngine.processResponse(UpgradeResponse, Writer, org.glassfish.tyrus.spi.Connection.CloseListener)(in that order).- Throws:
DeploymentException- when the client endpoint is invalid or when there is any other (not specified) connection problem.java.io.IOException- when there is any I/O issue related to opening client socket or connecting to remote endpoint.
-
-