| Package | Description | 
|---|---|
| jakarta.websocket | This package contains all the Jakartq WebSocket APIs common to both the client and server side. | 
| org.glassfish.tyrus.client | Common Client. | 
| org.glassfish.tyrus.core | Core classes. | 
| org.glassfish.tyrus.core.cluster | Cluster relates classes and interfaces. | 
| org.glassfish.tyrus.server | Server implementation. | 
| Modifier and Type | Method and Description | 
|---|---|
| Session | WebSocketContainer. connectToServer(java.lang.Class<?> annotatedEndpointClass,
               java.net.URI path)Connect the supplied annotated endpoint to its server. | 
| Session | WebSocketContainer. connectToServer(java.lang.Class<? extends Endpoint> endpointClass,
               ClientEndpointConfig cec,
               java.net.URI path)Connect the supplied programmatic endpoint to its server with the given configuration. | 
| Session | WebSocketContainer. connectToServer(Endpoint endpointInstance,
               ClientEndpointConfig cec,
               java.net.URI path)Connect the supplied programmatic client endpoint instance to its server with the given configuration. | 
| Session | WebSocketContainer. connectToServer(java.lang.Object annotatedEndpointInstance,
               java.net.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 | 
|---|---|
| java.util.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,
       java.lang.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(java.lang.String message,
                java.lang.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(java.lang.Class<? extends Endpoint> endpointClass,
               ClientEndpointConfig cec,
               java.net.URI path) | 
| Session | ClientManager. connectToServer(java.lang.Class annotatedEndpointClass,
               java.net.URI path) | 
| Session | ClientManager. connectToServer(Endpoint endpointInstance,
               ClientEndpointConfig cec,
               java.net.URI path) | 
| Session | ClientManager. connectToServer(java.lang.Object obj,
               java.net.URI path) | 
| Modifier and Type | Method and Description | 
|---|---|
| java.util.concurrent.Future<Session> | ClientManager. asyncConnectToServer(java.lang.Class<?> annotatedEndpointClass,
                    java.net.URI path)Non-blocking version of  WebSocketContainer.connectToServer(Class, java.net.URI). | 
| java.util.concurrent.Future<Session> | ClientManager. asyncConnectToServer(java.lang.Class<? extends Endpoint> endpointClass,
                    ClientEndpointConfig cec,
                    java.net.URI path)Non-blocking version of  WebSocketContainer.connectToServer(Class, jakarta.websocket.ClientEndpointConfig,
 java.net.URI). | 
| java.util.concurrent.Future<Session> | ClientManager. asyncConnectToServer(Endpoint endpointInstance,
                    ClientEndpointConfig cec,
                    java.net.URI path) | 
| java.util.concurrent.Future<Session> | ClientManager. asyncConnectToServer(java.lang.Object obj,
                    java.net.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  Sessionis open and ready to be returned fromWebSocketContainer.connectToServer(Class, jakarta.websocket.ClientEndpointConfig, java.net.URI)(and
 alternatives) call. | 
| Modifier and Type | Class and Description | 
|---|---|
| class  | TyrusSessionImplementation of the  Session. | 
| Modifier and Type | Method and Description | 
|---|---|
| Session | TyrusEndpointWrapper. createSessionForRemoteEndpoint(TyrusWebSocket socket,
                              java.lang.String subprotocol,
                              java.util.List<Extension> extensions,
                              DebugContext debugContext)Creates a Session based on the  TyrusWebSocket, subprotocols and extensions. | 
| Modifier and Type | Method and Description | 
|---|---|
| java.util.Map<Session,java.util.concurrent.Future<?>> | TyrusSession. broadcast(java.nio.ByteBuffer message)Broadcasts binary message to all connected clients, including remote sessions (if any). | 
| java.util.Map<Session,java.util.concurrent.Future<?>> | TyrusSession. broadcast(java.lang.String message)Broadcasts text message to all connected clients. | 
| java.util.Set<Session> | TyrusSession. getOpenSessions() | 
| Modifier and Type | Method and Description | 
|---|---|
| java.lang.Object | TyrusEndpointWrapper. doEncode(Session session,
        java.lang.Object message) | 
| <T> java.lang.Object | ComponentProviderService. getCoderInstance(java.lang.Class<T> c,
                Session session,
                EndpointConfig endpointConfig,
                ErrorCollector collector) | 
| <T> java.lang.Object | ComponentProviderService. getInstance(java.lang.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,
       java.lang.Throwable thr) | 
| void | AnnotatedEndpoint. onOpen(Session session,
      EndpointConfig configuration) | 
| void | ComponentProviderService. removeSession(Session session)Remove  Sessionfrom cache. | 
| Modifier and Type | Interface and Description | 
|---|---|
| interface  | DistributedSessionExtended  Sessionwhich adds distributed properties. | 
| Modifier and Type | Class and Description | 
|---|---|
| class  | RemoteSessionRemote session represents session originating from another node. | 
| Modifier and Type | Method and Description | 
|---|---|
| java.util.Set<Session> | RemoteSession. getOpenSessions()This method is not supported on  RemoteSession. | 
| Constructor and Description | 
|---|
| RemoteSession(java.lang.String sessionId,
             ClusterContext clusterContext,
             java.util.Map<RemoteSession.DistributedMapKey,java.lang.Object> distributedPropertyMap,
             TyrusEndpointWrapper endpointWrapper,
             Session session)Constructor. | 
| SessionEventListener(Session session)Constructor. | 
| Modifier and Type | Method and Description | 
|---|---|
| Session | TyrusServerContainer. connectToServer(java.lang.Class<? extends Endpoint> endpointClass,
               ClientEndpointConfig cec,
               java.net.URI path) | 
| Session | TyrusServerContainer. connectToServer(java.lang.Class annotatedEndpointClass,
               java.net.URI path) | 
| Session | TyrusServerContainer. connectToServer(Endpoint endpointInstance,
               ClientEndpointConfig cec,
               java.net.URI path) | 
| Session | TyrusServerContainer. connectToServer(java.lang.Object annotatedEndpointInstance,
               java.net.URI path) | 
| Modifier and Type | Method and Description | 
|---|---|
| java.util.concurrent.Future<Session> | TyrusServerContainer. asyncConnectToServer(java.lang.Class<?> annotatedEndpointClass,
                    java.net.URI path)Non-blocking version of  WebSocketContainer.connectToServer(Class, java.net.URI). | 
| java.util.concurrent.Future<Session> | TyrusServerContainer. asyncConnectToServer(java.lang.Class<? extends Endpoint> endpointClass,
                    ClientEndpointConfig cec,
                    java.net.URI path)Non-blocking version of  WebSocketContainer.connectToServer(Class,
 jakarta.websocket.ClientEndpointConfig, java.net.URI). | 
| java.util.concurrent.Future<Session> | TyrusServerContainer. asyncConnectToServer(Endpoint endpointInstance,
                    ClientEndpointConfig cec,
                    java.net.URI path) | 
| java.util.concurrent.Future<Session> | TyrusServerContainer. asyncConnectToServer(java.lang.Object obj,
                    java.net.URI path)Non-blocking version of  WebSocketContainer.connectToServer(Object, java.net.URI). | 
Copyright © 2012–2020 Oracle Corporation. All rights reserved.