Package org.glassfish.tyrus.spi
Interface ClientContainer
- All Known Implementing Classes:
GrizzlyClientContainer
public interface ClientContainer
Entry point for client implementation.
- Author:
- Pavel Bucek
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Deprecated.static final String
WLS version ofINCOMING_BUFFER_SIZE
. -
Method Summary
Modifier and TypeMethodDescriptionvoid
openClientSocket
(ClientEndpointConfig cec, Map<String, Object> properties, ClientEngine clientEngine) Open client socket - connect to endpoint specified withurl
parameter.
-
Field Details
-
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:
-
WLS_INCOMING_BUFFER_SIZE
WLS version ofINCOMING_BUFFER_SIZE
.- See Also:
-
-
Method Details
-
openClientSocket
void openClientSocket(ClientEndpointConfig cec, Map<String, Object> properties, ClientEngine clientEngine) throws DeploymentException, IOExceptionOpen client socket - connect to endpoint specified withurl
parameter.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.IOException
- when there is any I/O issue related to opening client socket or connecting to remote endpoint.
-
org.glassfish.tyrus.client.ClientProperties#INCOMING_BUFFER_SIZE
.