Class GrizzlyClientContainer
- java.lang.Object
-
- org.glassfish.tyrus.container.grizzly.client.GrizzlyClientContainer
-
- All Implemented Interfaces:
ClientContainer
public class GrizzlyClientContainer extends java.lang.Object implements ClientContainer
- Author:
- Danny Coward (danny.coward at oracle.com), Pavel Bucek (pavel.bucek at oracle.com)
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
SHARED_CONTAINER
Deprecated.please useClientProperties.SHARED_CONTAINER
.static java.lang.String
SHARED_CONTAINER_IDLE_TIMEOUT
Deprecated.please useClientProperties.SHARED_CONTAINER_IDLE_TIMEOUT
.static java.lang.String
SSL_ENGINE_CONFIGURATOR
Deprecated.please useClientProperties.SSL_ENGINE_CONFIGURATOR
.-
Fields inherited from interface org.glassfish.tyrus.spi.ClientContainer
INCOMING_BUFFER_SIZE, WLS_INCOMING_BUFFER_SIZE
-
-
Constructor Summary
Constructors Constructor Description GrizzlyClientContainer()
-
Method Summary
All Methods Instance Methods Concrete 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
-
SSL_ENGINE_CONFIGURATOR
public static final java.lang.String SSL_ENGINE_CONFIGURATOR
Deprecated.please useClientProperties.SSL_ENGINE_CONFIGURATOR
.- See Also:
- Constant Field Values
-
SHARED_CONTAINER
public static final java.lang.String SHARED_CONTAINER
Deprecated.please useClientProperties.SHARED_CONTAINER
.When set totrue
(boolean value), client runtime preserves used container and reuses it for outgoing connections.
-
SHARED_CONTAINER_IDLE_TIMEOUT
public static final java.lang.String SHARED_CONTAINER_IDLE_TIMEOUT
Deprecated.please useClientProperties.SHARED_CONTAINER_IDLE_TIMEOUT
.Container idle timeout in seconds (Integer value).
-
-
Method Detail
-
openClientSocket
public void openClientSocket(ClientEndpointConfig cec, java.util.Map<java.lang.String,java.lang.Object> properties, ClientEngine clientEngine) throws DeploymentException, java.io.IOException
Description copied from interface:ClientContainer
Open client socket - connect to endpoint specified withurl
parameter.Called from ClientManager when
WebSocketContainer.connectToServer(Class, javax.websocket.ClientEndpointConfig, java.net.URI)
is invoked.- Specified by:
openClientSocket
in interfaceClientContainer
- 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.
-
-