There is one TyrusEndpointWrapper for each application class, which handles all the methods.
| Modifier and Type | Class and Description |
|---|---|
| private static interface | |
| public abstract static class | TyrusEndpointWrapper.
Session listener. |
| Modifier and Type | Field and Description |
|---|---|
| private final ClusterContext | |
| private final Map | |
| private final ComponentProviderService | |
| private final EndpointConfig | |
| private final ServerEndpointConfig. | |
| private final WebSocketContainer | container
The container for this session. |
| private final String | |
| private final List | |
| private static final Session | dummySession
Used only as a placeholder to get encoder instances from |
| private final List | |
| private final Endpoint | |
| private final Class | |
| private final EndpointEventListener | |
| private final String | |
| private static final boolean | |
| private static final AtomicBoolean | |
| private static final Logger | |
| private static final int | MIN_SESSIONS_PER_THREAD
Used as threshold for parallel broadcast. |
| private final Method | |
| private final Method | |
| private final Method | |
| private final boolean | |
| private final boolean | |
| private final String | |
| private final TyrusEndpointWrapper. | |
| private final Map |
| Access | Constructor and Description |
|---|---|
| public | TyrusEndpointWrapper(Class<? extends Endpoint>
endpoint class for which the wrapper is created. endpointClass, EndpointConfig endpoint configuration. configuration, ComponentProviderService component provider. componentProvider, WebSocketContainer container where the wrapper is running. container, String context path of the application. contextPath, ServerEndpointConfig.endpoint configurator. configurator,session listener. sessionListener,cluster context instance. clusterContext, EndpointEventListener null indicates standalone mode.endpoint event listener. endpointEventListener, Boolean true if parallel broadcast should be enabled, true is default.Create |
| public | TyrusEndpointWrapper(Endpoint
endpoint instance for which the wrapper is created. endpoint, EndpointConfig endpoint configuration. configuration, ComponentProviderService component provider. componentProvider, WebSocketContainer container where the wrapper is running. container, String context path of the application. contextPath, ServerEndpointConfig.endpoint configurator. configurator,session listener. sessionListener,cluster context instance. clusterContext, EndpointEventListener null indicates standalone mode.endpoint event listener. endpointEventListener, Boolean true if parallel broadcast should be enabled, true is default.Create |
| private | TyrusEndpointWrapper(Endpoint endpoint, Class<? extends Endpoint> endpointClass, EndpointConfig configuration, ComponentProviderService componentProvider, WebSocketContainer container, String contextPath, final ServerEndpointConfig.
|
| Modifier and Type | Method and Description |
|---|---|
| pack-priv Map | |
| private Map | |
| pack-priv Map | Returns: map of sessions and futures for user to get the information about status of the message. Messages send from other cluster nodes are not included.message to be broadcasted. message)Broadcasts binary message to all connected clients. |
| private Map | |
| private Map | Returns: map of send futures.callable which serializes a frame to byte[] and passes it to
broadcastCallableorg.. The org. also handles extensions,
if any.Perform broadcast. |
| private HandshakeRequest | |
| public Session | Returns: Session representing the connection.the other end of the connection. socket, String used. subprotocol, List<Extension> extensions used. extensions, DebugContext debug context. debugContext)Creates a Session based on the |
| pack-priv TyrusWebSocket | Returns: TODOthe handler)ProtocolHandler to use with the newly created
TyrusWebSocket.Factory method to create new |
| pack-priv Object | decodeCompleteMessage(TyrusSession session, Object message, Class<?> type, CoderWrapper<Decoder> selectedDecoder)
|
| public Object | |
| private Map | Returns: futures of the operations executed on each session.operation to be executed on open sessions. broadcastCallableDivides open sessions into subsets on which an operation passed as |
| private ArrayList | |
| private <T> Object | |
| private Class | |
| pack-priv List | |
| pack-priv static List | |
| private Class | |
| public EndpointConfig | |
| public String | |
| pack-priv List | Returns: names of extensions supported by both client and class that implements this one.names of the extensions' supported by client. clientExtensions)Server-side; Get the negotiated extensions' names based on the extensions supported by client. |
| pack-priv String | Returns: negotiated sub-protocol,null if none found.sub-protocols supported by client. clientProtocols)Server-side; Compute the sub-protocol which will be used. |
| pack-priv Set | |
| pack-priv Set | |
| pack-priv String | |
| private TyrusSession | |
| private static URI | |
| private void | handleSubmitException(Map<Session, Future<?>> futures, List<Map.
|
| private void | |
| pack-priv void | onClose(TyrusWebSocket
TyrusWebSocket who has just closed the connection.Called by the provider when the web socket connection to the given remote endpoint has just closed. |
| pack-priv Session | Returns: CreatedSession instance or null when session was not created properly (max sessions
limit on endpoint or application or issues with endpoint validation).TyrusWebSocket who has just connected to this web socket endpoint.request associated with accepted connection. upgradeRequest, String subProtocol, List<Extension> extensions, String connectionId, DebugContext debug context. debugContext)Called by the provider when the web socket connection is established. |
| pack-priv boolean | Returns: true if the WebSocket should be closed otherwise
false.the websocket being processed at the time the
exception occurred. socket, Throwable the unexpected exception. t)This method will be invoked if an unexpected exception is caught by the WebSocket runtime. |
| pack-priv void | onHandShakeResponse(UpgradeRequest
original request which caused this handshake. request, UpgradeResponse response to be send. response)Invoked when server side handshake is ready to send response. |
| pack-priv void | onMessage(TyrusWebSocket
TyrusWebSocket who sent the message.the message. messageBytes)Called by the provider when the web socket connection has an incoming text message from the given remote endpoint. |
| pack-priv void | onMessage(TyrusWebSocket
TyrusWebSocket who sent the message.the message. messageString)Called by the provider when the web socket connection has an incoming text message from the given remote endpoint. |
| pack-priv void | onPartialMessage(TyrusWebSocket
TyrusWebSocket who sent the message.the String message. partialString, boolean to indicate if this is the last partial string in the sequence last)Called by the provider when the web socket connection has an incoming partial text message from the given remote endpoint. |
| pack-priv void | onPartialMessage(TyrusWebSocket
TyrusWebSocket who sent the message.the piece of the binary message. partialBytes, boolean to indicate if this is the last partial byte buffer in the sequence last)Called by the provider when the web socket connection has an incoming partial binary message from the given remote endpoint. |
| pack-priv void | onPing(TyrusWebSocket
TyrusWebSocket who sent the message.the message. bytes)Called by the provider when the web socket connection has an incoming ping message from the given remote endpoint. |
| pack-priv void | onPong(TyrusWebSocket
TyrusWebSocket who sent the message.the message. bytes)Called by the provider when the web socket connection has an incoming pong message from the given remote endpoint. |
| private boolean | Returns: true when exception is handled within this method (framework produced it), false
otherwise.thrown throwable, Session session)Throwable.Check |
| private Future | Returns: future representing outcome of the send operation.org. instance used for sending the frame.frame to be sent. dataFrame, TyrusFrame.type of the frame (monitoring). frameTypeSerialize dataframe and send it to |
| public String | |
| pack-priv final boolean | Returns: true if the request should be upgraded to a WebSocket connection.received request)UpgradeRequest.Server side check for protocol specific information to determine whether the request can be upgraded. |