Package | Description |
---|---|
javax.websocket |
This package contains all the WebSocket APIs common to both the client
and server side.
|
org.glassfish.tyrus.client | |
org.glassfish.tyrus.core | |
org.glassfish.tyrus.core.cluster |
Modifier and Type | Method and Description |
---|---|
Session |
WebSocketContainer.connectToServer(Class<?> annotatedEndpointClass,
URI path)
Connect the supplied annotated endpoint to its server.
|
Session |
WebSocketContainer.connectToServer(Class<? extends Endpoint> endpointClass,
ClientEndpointConfig cec,
URI path)
Connect the supplied programmatic endpoint to its server with the given
configuration.
|
Session |
WebSocketContainer.connectToServer(Endpoint endpointInstance,
ClientEndpointConfig cec,
URI path)
Connect the supplied programmatic client endpoint instance to its server
with the given configuration.
|
Session |
WebSocketContainer.connectToServer(Object annotatedEndpointInstance,
URI path)
Connect the supplied annotated endpoint instance to its server.
|
Session |
SessionException.getSession()
Return the Session on which the problem occurred.
|
Modifier and Type | Method and Description |
---|---|
Set<Session> |
Session.getOpenSessions()
Return a copy of the Set of all the open web socket sessions that represent
connections to the same endpoint to which this session represents a connection.
|
Modifier and Type | Method and Description |
---|---|
void |
Endpoint.onClose(Session session,
CloseReason closeReason)
This method is called immediately prior to the session with the remote
peer being closed.
|
void |
Endpoint.onError(Session session,
Throwable thr)
Developers may implement this method when the web socket session
creates some kind of error that is not modeled in the web socket protocol.
|
abstract void |
Endpoint.onOpen(Session session,
EndpointConfig config)
Developers must implement this method to be notified when a new conversation has
just begun.
|
Constructor and Description |
---|
SessionException(String message,
Throwable cause,
Session session)
Creates a new instance of this exception with the given message,
the wrapped cause of the exception and the session with which
the problem is associated.
|
Modifier and Type | Method and Description |
---|---|
Session |
ClientManager.connectToServer(Class<? extends Endpoint> endpointClass,
ClientEndpointConfig cec,
URI path) |
Session |
ClientManager.connectToServer(Class annotatedEndpointClass,
URI path) |
Session |
ClientManager.connectToServer(Endpoint endpointInstance,
ClientEndpointConfig cec,
URI path) |
Session |
ClientManager.connectToServer(Object obj,
URI path) |
Modifier and Type | Method and Description |
---|---|
Future<Session> |
ClientManager.asyncConnectToServer(Class<?> annotatedEndpointClass,
URI path)
Non-blocking version of
WebSocketContainer.connectToServer(Class, java.net.URI) . |
Future<Session> |
ClientManager.asyncConnectToServer(Class<? extends Endpoint> endpointClass,
ClientEndpointConfig cec,
URI path)
Non-blocking version of
WebSocketContainer.connectToServer(Class, javax.websocket.ClientEndpointConfig, java.net.URI) . |
Future<Session> |
ClientManager.asyncConnectToServer(Endpoint endpointInstance,
ClientEndpointConfig cec,
URI path)
|
Future<Session> |
ClientManager.asyncConnectToServer(Object obj,
URI path)
Non-blocking version of
WebSocketContainer.connectToServer(Object, java.net.URI) . |
Modifier and Type | Method and Description |
---|---|
void |
TyrusClientEngine.ClientHandshakeListener.onSessionCreated(Session session)
Invoked when handshake is completed and provided
Session is open and ready to be
returned from WebSocketContainer.connectToServer(Class, javax.websocket.ClientEndpointConfig, java.net.URI)
(and alternatives) call. |
Modifier and Type | Class and Description |
---|---|
class |
TyrusSession
Implementation of the
Session . |
Modifier and Type | Method and Description |
---|---|
Session |
TyrusEndpointWrapper.createSessionForRemoteEndpoint(TyrusWebSocket socket,
String subprotocol,
List<Extension> extensions)
Creates a Session based on the
TyrusWebSocket , subprotocols and extensions. |
Session |
TyrusEndpointWrapper.onConnect(TyrusWebSocket socket,
UpgradeRequest upgradeRequest,
String subProtocol,
List<Extension> extensions,
String connectionId)
Called by the provider when the web socket connection
is established.
|
Modifier and Type | Method and Description |
---|---|
Map<Session,Future<?>> |
TyrusSession.broadcast(ByteBuffer message)
Broadcasts binary message to all connected clients.
|
Map<Session,Future<?>> |
TyrusEndpointWrapper.broadcast(ByteBuffer message)
Broadcasts binary message to all connected clients.
|
Map<Session,Future<?>> |
TyrusSession.broadcast(String message)
Broadcasts text message to all connected clients.
|
Map<Session,Future<?>> |
TyrusEndpointWrapper.broadcast(String message)
Broadcasts text message to all connected clients.
|
Set<Session> |
TyrusSession.getOpenSessions() |
Set<Session> |
TyrusEndpointWrapper.getOpenSessions(TyrusSession tyrusSession)
Get the endpoint's open
Session s. |
Modifier and Type | Method and Description |
---|---|
Object |
TyrusEndpointWrapper.doEncode(Session session,
Object message) |
<T> Object |
ComponentProviderService.getCoderInstance(Class<T> c,
Session session,
EndpointConfig endpointConfig,
ErrorCollector collector)
|
<T> Object |
ComponentProviderService.getInstance(Class<T> c,
Session session,
ErrorCollector collector)
Provide an instance of class which is coupled to
Session . |
void |
AnnotatedEndpoint.onClose(Session session,
CloseReason closeReason) |
void |
AnnotatedEndpoint.onError(Session session,
Throwable thr) |
void |
AnnotatedEndpoint.onOpen(Session session,
EndpointConfig configuration) |
void |
ComponentProviderService.removeSession(Session session)
Remove
Session from cache. |
Modifier and Type | Class and Description |
---|---|
class |
ClusterSession
Cluster session represents session present on another node.
|
Modifier and Type | Method and Description |
---|---|
Set<Session> |
ClusterSession.getOpenSessions()
Not supported.
|
Constructor and Description |
---|
ClusterSession(String sessionId,
ClusterContext clusterContext,
Map<ClusterSession.DistributedMapKey,Object> distributedPropertyMap,
TyrusEndpointWrapper endpointWrapper,
Session session)
Constructor.
|
SessionEventListener(Session session)
Constructor.
|
Copyright © 2012-2014, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.