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
Fields Modifier and Type Field Description static java.lang.String
INCOMING_BUFFER_SIZE
Deprecated.please useorg.glassfish.tyrus.client.ClientProperties#INCOMING_BUFFER_SIZE
.static java.lang.String
WLS_INCOMING_BUFFER_SIZE
WLS version ofINCOMING_BUFFER_SIZE
.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
openClientSocket(ClientEndpointConfig cec, java.util.Map<java.lang.String,java.lang.Object> properties, ClientEngine clientEngine)
Open client socket - connect to endpoint specified withurl
parameter.
-
-
-
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 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.java.io.IOException
- when there is any I/O issue related to opening client socket or connecting to remote endpoint.
-
-