Jakarta API for WebSocket
WebSocket - 2.1
JavaDoc Assertion Detail

Totals Total Active Deprecated Removed
# of Assertions 213 213 0 0
# of Required Assertions 209 209 0 0
# of Optional Assertions 4 4 0 0

ID Return Method/Field Description Required Deprecated Testable
WebSocket:JAVADOC:1 Class jakarta.websocket.ClientEndpoint.configurator
An optional custom configurator class that the developer would like to use to provide custom configuration of new instances of this endpoint. The implementation creates a new instance of the configurator per logical endpoint. true
true
WebSocket:JAVADOC:2 Class[] jakarta.websocket.ClientEndpoint.decoders
The array of Java classes that are to act as Decoders for messages coming into the client. true
true
WebSocket:JAVADOC:3 Class[] jakarta.websocket.ClientEndpoint.encoders
The array of Java classes that are to act as Encoders for messages sent by the client. true
true
WebSocket:JAVADOC:4 String[] jakarta.websocket.ClientEndpoint.subprotocols
The names of the subprotocols this client supports. true
true
WebSocket:JAVADOC:5 Configurator jakarta.websocket.ClientEndpointConfig.getConfigurator
Return the custom configurator for this configuration. If the developer did not provide one, the platform default configurator is returned. true
true
WebSocket:JAVADOC:6 List jakarta.websocket.ClientEndpointConfig.getExtensions
Return the extensions, in order of preference, favorite first, that this client would like to use for its sessions. These are the extensions that will be used to populate the Sec-WebSocket-Extensions header in the opening handshake for clients using this configuration. The first extension in the list is the most preferred extension. See Negotiating Extensions. true
true
WebSocket:JAVADOC:7 List jakarta.websocket.ClientEndpointConfig.getPreferredSubprotocols
Return the ordered list of sub protocols a client endpoint would like to use, in order of preference, favorite first that this client would like to use for its sessions. This list is used to generate the Sec-WebSocket-Protocol header in the opening handshake for clients using this configuration. The first protocol name is the most preferred. See Client Opening Handshake. true
true
WebSocket:JAVADOC:8 ClientEndpointConfig jakarta.websocket.ClientEndpointConfig.Builder.build
Builds a configuration object using the attributes set on this builder. true
true
WebSocket:JAVADOC:9 Builder jakarta.websocket.ClientEndpointConfig.Builder.configurator
( Configurator )
Sets the configurator object for the configuration this builder will build. true
true
WebSocket:JAVADOC:10 Builder jakarta.websocket.ClientEndpointConfig.Builder.create
Creates a new builder object with no subprotocols, extensions, encoders, decoders and a null configurator. true
true
WebSocket:JAVADOC:11 Builder jakarta.websocket.ClientEndpointConfig.Builder.decoders
( List )
Assign the list of decoder implementation classes the client will use. true
true
WebSocket:JAVADOC:12 Builder jakarta.websocket.ClientEndpointConfig.Builder.encoders
( List )
Assign the list of encoder implementation classes the client will use. true
true
WebSocket:JAVADOC:13 Builder jakarta.websocket.ClientEndpointConfig.Builder.extensions
( List )
Set the extensions for the configuration this builder will build. The list is treated in order of preference, favorite first, that the client would like to use for its sessions. true
true
WebSocket:JAVADOC:14 Builder jakarta.websocket.ClientEndpointConfig.Builder.preferredSubprotocols
( List )
Set the preferred sub protocols for the configuration this builder will build. The list is treated in order of preference, favorite first, that this client would like to use for its sessions. true
true
WebSocket:JAVADOC:15 void jakarta.websocket.ClientEndpointConfig.Configurator.afterResponse
( HandshakeResponse )
This method is called by the implementation after it has received a handshake response from the server as a result of a handshake interaction it initiated. The developer may implement this method in order to inspect the returning handshake response. true
true
WebSocket:JAVADOC:16 void jakarta.websocket.ClientEndpointConfig.Configurator.beforeRequest
( Map )
This method is called by the implementation after it has formulated the handshake request that will be used to initiate the connection to the server, but before it has sent any part of the request. This allows the developer to inspect and modify the handshake request headers prior to the start of the handshake interaction. true
true
WebSocket:JAVADOC:17 Configurator jakarta.websocket.ClientEndpointConfig.Configurator.ClientEndpointConfig.Configurator

true
true
WebSocket:JAVADOC:18 CloseReason jakarta.websocket.CloseReason.CloseReason
( CloseCode ,
String )
Creates a reason for closing a web socket connection with the given code and reason phrase. true
true
WebSocket:JAVADOC:19 CloseCode jakarta.websocket.CloseReason.getCloseCode
The Close code associated with this CloseReason. true
true
WebSocket:JAVADOC:20 String jakarta.websocket.CloseReason.getReasonPhrase
The reason phrase associated with this CloseReason. true
true
WebSocket:JAVADOC:21 String jakarta.websocket.CloseReason.toString
Converts the CloseReason to a debug-friendly string. The exact format is not defined by the specification and may change in future releases. true
false
WebSocket:JAVADOC:22 int jakarta.websocket.CloseReason.CloseCode.getCode
Returns the code number, for example the integer '1000' for normal closure. true
true
WebSocket:JAVADOC:23 CloseCode jakarta.websocket.CloseReason.CloseCodes.getCloseCode
( int )
Creates a CloseCode from the given int code number. This method throws an IllegalArgumentException if the int is not one of the true
true
WebSocket:JAVADOC:24 int jakarta.websocket.CloseReason.CloseCodes.getCode
Return the code number of this status code. true
true
WebSocket:JAVADOC:25 CloseCodes jakarta.websocket.CloseReason.CloseCodes.valueOf
( String )

true
true
WebSocket:JAVADOC:26 CloseCodes[] jakarta.websocket.CloseReason.CloseCodes.values

true
true
WebSocket:JAVADOC:27 ContainerProvider jakarta.websocket.ContainerProvider.ContainerProvider

true
true
WebSocket:JAVADOC:28 WebSocketContainer jakarta.websocket.ContainerProvider.getWebSocketContainer
Obtain a new instance of a WebSocketContainer. The method looks for the ContainerProvider implementation class in the order listed in the META-INF/services/jakarta.websocket.ContainerProvider file, returning the WebSocketContainer implementation from the ContainerProvider implementation that is not null. true
true
WebSocket:JAVADOC:29 DecodeException jakarta.websocket.DecodeException.DecodeException
( ByteBuffer ,
String ,
Throwable )
Constructor with the binary data that could not be decoded, and the reason why it failed to be, and the cause. The buffer may represent the whole message, or the part of the message most relevant to the decoding error, depending whether the application is using one of the streaming methods or not. true
true
WebSocket:JAVADOC:30 DecodeException jakarta.websocket.DecodeException.DecodeException
( String ,
String ,
Throwable )
Constructor with the text data that could not be decoded, and the reason why it failed to be, and the cause. The encoded string may represent the whole message, or the part of the message most relevant to the decoding error, depending whether the application is using one of the streaming methods or not. true
true
WebSocket:JAVADOC:31 DecodeException jakarta.websocket.DecodeException.DecodeException
( ByteBuffer ,
String )
Constructs a DecodedException with the given ByteBuffer that cannot be decoded, and reason why. The buffer may represent the whole message, or the part of the message most relevant to the decoding error, depending whether the application is using one of the streaming methods or not. true
true
WebSocket:JAVADOC:32 DecodeException jakarta.websocket.DecodeException.DecodeException
( String ,
String )
Constructs a DecodedException with the given encoded string that cannot be decoded, and reason why. The encoded string may represent the whole message, or the part of the message most relevant to the decoding error, depending whether the application is using one of the streaming methods or not. true
true
WebSocket:JAVADOC:33 ByteBuffer jakarta.websocket.DecodeException.getBytes
Return the ByteBuffer containing either the whole message, or the partial message, that could not be decoded, or null if this exception arose from a failure to decode a text message. if this exception arose from a failure to decode a text message. true
true
WebSocket:JAVADOC:34 String jakarta.websocket.DecodeException.getText
Return the encoded string that is either the whole message, or the partial message that could not be decoded, or null if this exception arose from a failure to decode a binary message.. if this exception arose from a failure to decode a binary message.. true
true
WebSocket:JAVADOC:35 void jakarta.websocket.Decoder.destroy
This method is called when the decoder is about to be removed from service in order that any resources the encoder used may be closed gracefully. true
true
WebSocket:JAVADOC:36 void jakarta.websocket.Decoder.init
( EndpointConfig )
This method is called with the endpoint configuration object of the endpoint this decoder is intended for when it is about to be brought into service. true
true
WebSocket:JAVADOC:37 Object jakarta.websocket.Decoder.Binary.decode
( ByteBuffer )
Decode the given bytes into an object of type T. true
true
WebSocket:JAVADOC:38 Object jakarta.websocket.Decoder.Binary.decode
( ByteBuffer )
throws DecodeException

true
true
WebSocket:JAVADOC:39 boolean jakarta.websocket.Decoder.Binary.willDecode
( ByteBuffer )
Answer whether the given bytes can be decoded into an object of type T. true
true
WebSocket:JAVADOC:40 Object jakarta.websocket.Decoder.BinaryStream.decode
( InputStream )
Decode the given bytes read from the input stream into an object of type T. true
true
WebSocket:JAVADOC:41 Object jakarta.websocket.Decoder.BinaryStream.decode
( InputStream )
throws DecodeException

true
true
WebSocket:JAVADOC:42 Object jakarta.websocket.Decoder.BinaryStream.decode
( InputStream )
throws IOException

true
true
WebSocket:JAVADOC:43 Object jakarta.websocket.Decoder.Text.decode
( String )
Decode the given String into an object of type T. true
true
WebSocket:JAVADOC:44 Object jakarta.websocket.Decoder.Text.decode
( String )
throws DecodeException

true
true
WebSocket:JAVADOC:45 boolean jakarta.websocket.Decoder.Text.willDecode
( String )
Answer whether the given String can be decoded into an object of type T. true
true
WebSocket:JAVADOC:46 Object jakarta.websocket.Decoder.TextStream.decode
( Reader )
Reads the websocket message from the implementation provided Reader and decodes it into an instance of the supplied object type. true
true
WebSocket:JAVADOC:47 Object jakarta.websocket.Decoder.TextStream.decode
( Reader )
throws DecodeException

true
true
WebSocket:JAVADOC:48 Object jakarta.websocket.Decoder.TextStream.decode
( Reader )
throws IOException

true
true
WebSocket:JAVADOC:49 DeploymentException jakarta.websocket.DeploymentException.DeploymentException
( String )
Creates a deployment exception with the given reason for the deployment failure. true
true
WebSocket:JAVADOC:50 DeploymentException jakarta.websocket.DeploymentException.DeploymentException
( String ,
Throwable )
Creates a deployment exception with the given reason for the deployment failure and wrapped cause of the failure. true
true
WebSocket:JAVADOC:51 EncodeException jakarta.websocket.EncodeException.EncodeException
( Object ,
String )
Constructor with the object being encoded, and the reason why it failed to be. true
true
WebSocket:JAVADOC:52 EncodeException jakarta.websocket.EncodeException.EncodeException
( Object ,
String ,
Throwable )
Constructor with the object being encoded, and the reason why it failed to be, and the cause. true
true
WebSocket:JAVADOC:53 Object jakarta.websocket.EncodeException.getObject
Return the Object that could not be encoded. true
true
WebSocket:JAVADOC:54 void jakarta.websocket.Encoder.destroy
This method is called when the encoder is about to be removed from service in order that any resources the encoder used may be closed gracefully. true
true
WebSocket:JAVADOC:55 void jakarta.websocket.Encoder.init
( EndpointConfig )
This method is called with the endpoint configuration object of the endpoint this encoder is intended for when it is about to be brought into service. true
true
WebSocket:JAVADOC:56 ByteBuffer jakarta.websocket.Encoder.Binary.encode
( Object )
Encode the given object into a byte array. true
true
WebSocket:JAVADOC:57 ByteBuffer jakarta.websocket.Encoder.Binary.encode
( Object )
throws EncodeException

true
true
WebSocket:JAVADOC:58 void jakarta.websocket.Encoder.BinaryStream.encode
( Object ,
OutputStream )
Encode the given object into a binary stream written to the implementation provided OutputStream. true
true
WebSocket:JAVADOC:59 void jakarta.websocket.Encoder.BinaryStream.encode
( Object ,
OutputStream )
throws EncodeException

true
true
WebSocket:JAVADOC:60 void jakarta.websocket.Encoder.BinaryStream.encode
( Object ,
OutputStream )
throws IOException

true
true
WebSocket:JAVADOC:61 String jakarta.websocket.Encoder.Text.encode
( Object )
Encode the given object into a String. true
true
WebSocket:JAVADOC:62 String jakarta.websocket.Encoder.Text.encode
( Object )
throws EncodeException

true
true
WebSocket:JAVADOC:63 void jakarta.websocket.Encoder.TextStream.encode
( Object ,
Writer )
Encode the given object to a character stream writing it to the supplied Writer. Implementations of this method may use the EncodeException to indicate a failure to convert the supplied object to an encoded form, and may use the IOException to indicate a failure to write the data to the supplied stream. true
true
WebSocket:JAVADOC:64 void jakarta.websocket.Encoder.TextStream.encode
( Object ,
Writer )
throws EncodeException
if there was an error encoding the object due to its state. true
true
WebSocket:JAVADOC:65 void jakarta.websocket.Encoder.TextStream.encode
( Object ,
Writer )
throws IOException
if there was an exception writing to the writer. true
true
WebSocket:JAVADOC:66 Endpoint jakarta.websocket.Endpoint.Endpoint

true
true
WebSocket:JAVADOC:67 void jakarta.websocket.Endpoint.onClose
( Session ,
CloseReason )
This method is called immediately prior to the session with the remote peer being closed. It is called whether the session is being closed because the remote peer initiated a close and sent a close frame, or whether the local websocket container or this endpoint requests to close the session. The developer may take this last opportunity to retrieve session attributes such as the ID, or any application data it holds before it becomes unavailable after the completion of the method. Developers should not attempt to modify the session from within this method, or send new messages from this call as the underlying connection will not be able to send them at this stage. true
true
WebSocket:JAVADOC:68 void jakarta.websocket.Endpoint.onError
( Session ,
Throwable )
Developers may implement this method when the web socket session creates some kind of error that is not modeled in the web socket protocol. This may for example be a notification that an incoming message is too big to handle, or that the incoming message could not be encoded. There are a number of categories of exception that this method is (currently) defined to handle: connection problems, for example, a socket failure that occurs before the web socket connection can be formally closed. These are modeled as SessionExceptions runtime errors thrown by developer created message handlers calls. conversion errors encoding incoming messages before any message handler has been called. These are modeled as DecodeExceptions true
true
WebSocket:JAVADOC:69 void jakarta.websocket.Endpoint.onOpen
( Session ,
EndpointConfig )
Developers must implement this method to be notified when a new conversation has just begun. true
true
WebSocket:JAVADOC:70 List jakarta.websocket.EndpointConfig.getDecoders
Return the Decoder implementation classes configured. These will be instantiated by the container to decode incoming messages into the expected custom objects on MessageHandler.Whole#onMessage(Object) callbacks. true
true
WebSocket:JAVADOC:71 List jakarta.websocket.EndpointConfig.getEncoders
Return the Encoder implementation classes configured. These will be instantiated by the container to encode custom objects passed into the send() methods on remote endpoints. true
true
WebSocket:JAVADOC:72 Map jakarta.websocket.EndpointConfig.getUserProperties
This method returns a modifiable Map that the developer may use to store application specific information relating to the endpoint that uses this configuration instance. Web socket applications running on distributed implementations of the web container should make any application specific objects stored here java.io.Serializable, or the object may not be recreated after a failover. true
true
WebSocket:JAVADOC:73 String jakarta.websocket.Extension.getName
The name of the extension. true
true
WebSocket:JAVADOC:74 List jakarta.websocket.Extension.getParameters
The extension parameters for this extension in the order they appear in the http headers. true
true
WebSocket:JAVADOC:75 String jakarta.websocket.Extension.Parameter.getName
Return the name of the extension parameter. true
true
WebSocket:JAVADOC:76 String jakarta.websocket.Extension.Parameter.getValue
Return the value of the extension parameter. true
true
WebSocket:JAVADOC:77 Map jakarta.websocket.HandshakeResponse.getHeaders
Return the list of Http headers sent by the web socket server. true
true
WebSocket:JAVADOC:78 void jakarta.websocket.MessageHandler.Partial.onMessage
( Object ,
boolean )
Called when the next part of a message has been fully received. true
true
WebSocket:JAVADOC:79 void jakarta.websocket.MessageHandler.Whole.onMessage
( Object )
Called when the message has been fully received. true
true
WebSocket:JAVADOC:80 long jakarta.websocket.OnMessage.maxMessageSize
Specifies the maximum size of message in bytes that the method this annotates will be able to process, or -1 to indicate that there is no maximum. The default is -1. This attribute only applies when the annotation is used to process whole messages, not to those methods that process messages in parts or use a stream or reader parameter to handle the incoming message. If the incoming whole message exceeds this limit, then the implementation generates an error and closes the connection using the reason that the message was too big. true
true
WebSocket:JAVADOC:81 ByteBuffer jakarta.websocket.PongMessage.getApplicationData
The application data inside the pong message from the peer. true
true
WebSocket:JAVADOC:82 void jakarta.websocket.RemoteEndpoint.flushBatch
This method is only used when batching is allowed for this RemoteEndpint. Calling this method forces the implementation to send any unsent messages it has been batching. false
true
WebSocket:JAVADOC:83 void jakarta.websocket.RemoteEndpoint.flushBatch

throws IOException

false
true
WebSocket:JAVADOC:84 boolean jakarta.websocket.RemoteEndpoint.getBatchingAllowed
Return whether the implementation is allowed to batch outgoing messages before sending. The default mode for RemoteEndpoints is false. The value may be changed by calling #setBatchingAllowed(boolean) setBatchingAllowed. true
true
WebSocket:JAVADOC:85 void jakarta.websocket.RemoteEndpoint.sendPing
( ByteBuffer )
Send a Ping message containing the given application data to the remote endpoint. The corresponding Pong message may be picked up using the MessageHandler.Pong handler. true
true
WebSocket:JAVADOC:86 void jakarta.websocket.RemoteEndpoint.sendPing
( ByteBuffer )
throws IOException
if the ping failed to be sent true
true
WebSocket:JAVADOC:87 void jakarta.websocket.RemoteEndpoint.sendPing
( ByteBuffer )
throws IllegalArgumentException
if the applicationData exceeds the maximum allowed payload of 125 bytes true
true
WebSocket:JAVADOC:88 void jakarta.websocket.RemoteEndpoint.sendPong
( ByteBuffer )
Allows the developer to send an unsolicited Pong message containing the given application data in order to serve as a unidirectional heartbeat for the session. true
true
WebSocket:JAVADOC:89 void jakarta.websocket.RemoteEndpoint.sendPong
( ByteBuffer )
throws IOException
if the pong failed to be sent true
true
WebSocket:JAVADOC:90 void jakarta.websocket.RemoteEndpoint.sendPong
( ByteBuffer )
throws IllegalArgumentException
if the applicationData exceeds the maximum allowed payload of 125 bytes true
true
WebSocket:JAVADOC:91 void jakarta.websocket.RemoteEndpoint.setBatchingAllowed
( boolean )
Indicate to the implementation that it is allowed to batch outgoing messages before sending. Not all implementations support batching of outgoing messages. The default mode for RemoteEndpoints is false. If the developer has indicated that batching of outgoing messages is permitted, then the developer must call flushBatch() in order to be sure that all the messages passed into the send methods of this RemoteEndpoint are sent. When batching is allowed, the implementations send operations are considered to have completed if the message has been written to the local batch, in the case when there is still room in the batch for the message, and are considered to have completed if the batch has been send to the peer and the remainder written to the new batch, in the case when writing the message causes the batch to need to be sent. The blocking and asynchronous send methods use this notion of completion in order to complete blocking calls, notify SendHandlers and complete Futures respectively. When batching is allowed, if the developer has called send methods on this RemoteEndpoint without calling flushBatch(), then the implementation may not have sent all the messages the developer has asked to be sent. If the parameter value is false and the implementation has a batch of unsent messages, then the implementation must immediately send the batch of unsent messages. false
true
WebSocket:JAVADOC:92 void jakarta.websocket.RemoteEndpoint.setBatchingAllowed
( boolean )
throws IOException
if batching is being disabled and there are unsent messages this error may be thrown as the implementation sends the batch of unsent messages if there is a problem. false
true
WebSocket:JAVADOC:93 long jakarta.websocket.RemoteEndpoint.Async.getSendTimeout
Return the number of milliseconds the implementation will timeout attempting to send a websocket message. A non-positive number indicates the implementation will not timeout attempting to send a websocket message asynchronously. This value overrides the default value assigned in the WebSocketContainer. true
true
WebSocket:JAVADOC:94 Future jakarta.websocket.RemoteEndpoint.Async.sendBinary
( ByteBuffer )
Initiates the asynchronous transmission of a binary message. This method returns before the message is transmitted. Developers use the returned Future object to track progress of the transmission. The Future's get() method returns null upon successful completion. Errors in transmission are wrapped in the java.util.concurrent.ExecutionException thrown when querying the Future object. true
true
WebSocket:JAVADOC:95 void jakarta.websocket.RemoteEndpoint.Async.sendBinary
( ByteBuffer ,
SendHandler )
Initiates the asynchronous transmission of a binary message. This method returns before the message is transmitted. Developers provide a callback to be notified when the message has been transmitted. Errors in transmission are given to the developer in the SendResult object. true
true
WebSocket:JAVADOC:96 Future jakarta.websocket.RemoteEndpoint.Async.sendObject
( Object )
Initiates the asynchronous transmission of a custom developer object. The developer will have provided an encoder for this object type in the endpoint configuration. Containers will by default be able to encode java primitive types and their object equivalents, otherwise the developer must have provided an encoder for the object type in the endpoint configuration. Progress may be tracked using the Future object. The Future's get() methods return null upon successful completion. Errors in transmission are wrapped in the java.util.concurrent.ExecutionException thrown when querying the Future object. true
true
WebSocket:JAVADOC:97 void jakarta.websocket.RemoteEndpoint.Async.sendObject
( Object ,
SendHandler )
Initiates the asynchronous transmission of a custom developer object. Containers will by default be able to encode java primitive types and their object equivalents, otherwise the developer must have provided an encoder for the object type in the endpoint configuration. Developers are notified when transmission is complete through the supplied callback object. true
true
WebSocket:JAVADOC:98 void jakarta.websocket.RemoteEndpoint.Async.sendText
( String ,
SendHandler )
Initiates the asynchronous transmission of a text message. This method returns before the message is transmitted. Developers provide a callback to be notified when the message has been transmitted. Errors in transmission are given to the developer in the SendResult object. true
true
WebSocket:JAVADOC:99 Future jakarta.websocket.RemoteEndpoint.Async.sendText
( String )
Initiates the asynchronous transmission of a text message. This method returns before the message is transmitted. Developers use the returned Future object to track progress of the transmission. The Future's get() method returns null upon successful completion. Errors in transmission are wrapped in the java.util.concurrent.ExecutionException thrown when querying the Future object. true
true
WebSocket:JAVADOC:100 void jakarta.websocket.RemoteEndpoint.Async.setSendTimeout
( long )
Sets the number of milliseconds the implementation will timeout attempting to send a websocket message. A non-positive number indicates the implementation will not timeout attempting to send a websocket message asynchronously. This value overrides the default value assigned in the WebSocketContainer. true
true
WebSocket:JAVADOC:101 OutputStream jakarta.websocket.RemoteEndpoint.Basic.getSendStream
Opens an output stream on which a binary message may be sent. The developer must close the output stream in order to indicate that the complete message has been placed into the output stream. true
true
WebSocket:JAVADOC:102 OutputStream jakarta.websocket.RemoteEndpoint.Basic.getSendStream

throws IOException
if there is a problem obtaining the OutputStream to write the binary message. true
true
WebSocket:JAVADOC:103 Writer jakarta.websocket.RemoteEndpoint.Basic.getSendWriter
Opens an character stream on which a text message may be sent. The developer must close the writer in order to indicate that the complete message has been placed into the character stream. true
true
WebSocket:JAVADOC:104 Writer jakarta.websocket.RemoteEndpoint.Basic.getSendWriter

throws IOException
if there is a problem obtaining the Writer to write the text message. true
true
WebSocket:JAVADOC:105 void jakarta.websocket.RemoteEndpoint.Basic.sendBinary
( ByteBuffer )
Send a binary message, returning when all of the message has been transmitted. true
true
WebSocket:JAVADOC:106 void jakarta.websocket.RemoteEndpoint.Basic.sendBinary
( ByteBuffer )
throws IOException
if there is a problem delivering the message. true
true
WebSocket:JAVADOC:107 void jakarta.websocket.RemoteEndpoint.Basic.sendBinary
( ByteBuffer ,
boolean )
Send a binary message in parts, blocking until all of the message has been transmitted. The runtime reads the message in order. Non-final parts are sent with isLast set to false. The final piece must be sent with isLast set to true. true
true
WebSocket:JAVADOC:108 void jakarta.websocket.RemoteEndpoint.Basic.sendBinary
( ByteBuffer ,
boolean )
throws IOException
if there is a problem delivering the partial message. true
true
WebSocket:JAVADOC:109 void jakarta.websocket.RemoteEndpoint.Basic.sendObject
( Object )
Sends a custom developer object, blocking until it has been transmitted. Containers will by default be able to encode java primitive types and their object equivalents, otherwise the developer must have provided an encoder for the object type in the endpoint configuration. A developer-provided encoder for a Java primitive type overrides the container default encoder. true
true
WebSocket:JAVADOC:110 void jakarta.websocket.RemoteEndpoint.Basic.sendObject
( Object )
throws IOException
if there is a communication error sending the message object. true
true
WebSocket:JAVADOC:111 void jakarta.websocket.RemoteEndpoint.Basic.sendObject
( Object )
throws EncodeException
if there was a problem encoding the message object into the form of a native websocket message. true
true
WebSocket:JAVADOC:112 void jakarta.websocket.RemoteEndpoint.Basic.sendText
( String )
Send a text message, blocking until all of the message has been transmitted. true
true
WebSocket:JAVADOC:113 void jakarta.websocket.RemoteEndpoint.Basic.sendText
( String )
throws IOException
if there is a problem delivering the message. true
true
WebSocket:JAVADOC:114 void jakarta.websocket.RemoteEndpoint.Basic.sendText
( String ,
boolean )
Send a text message in parts, blocking until all of the message has been transmitted. The runtime reads the message in order. Non-final parts of the message are sent with isLast set to false. The final part must be sent with isLast set to true. true
true
WebSocket:JAVADOC:115 void jakarta.websocket.RemoteEndpoint.Basic.sendText
( String ,
boolean )
throws IOException
if there is a problem delivering the message fragment. true
true
WebSocket:JAVADOC:116 void jakarta.websocket.SendHandler.onResult
( SendResult )
Called once the message has been transmitted. true
true
WebSocket:JAVADOC:117 Throwable jakarta.websocket.SendResult.getException
The problem sending the message. true
true
WebSocket:JAVADOC:118 boolean jakarta.websocket.SendResult.isOK
Determines if this result is ok or not. true
true
WebSocket:JAVADOC:119 SendResult jakarta.websocket.SendResult.SendResult
( Throwable )
Construct a SendResult carrying an exception. true
true
WebSocket:JAVADOC:120 SendResult jakarta.websocket.SendResult.SendResult
Construct a SendResult signifying a successful send carrying no exception. true
true
WebSocket:JAVADOC:121 void jakarta.websocket.Session.addMessageHandler
( MessageHandler )
Register to handle to incoming messages in this conversation. A maximum of one message handler per native websocket message type (text, binary, pong) may be added to each Session. I.e. a maximum of one message handler to handle incoming text messages a maximum of one message handler for handling incoming binary messages, and a maximum of one for handling incoming pong messages. For further details of which message handlers handle which of the native websocket message types please see MessageHandler.Whole and MessageHandler.Partial. Adding more than one of any one type will result in a runtime exception. This method is not safe to use unless you are providing an anonymous class derived directly from jakarta.websocket.MessageHandler.Whole or jakarta.websocket.MessageHandler.Partial. In all other cases (Lambda Expressions, more complex inheritance or generic type arrangements), one of the following methods have to be used: #addMessageHandler(Class, jakarta.websocket.MessageHandler.Whole) or #addMessageHandler(Class, jakarta.websocket.MessageHandler.Partial). true
true
WebSocket:JAVADOC:122 void jakarta.websocket.Session.addMessageHandler
( MessageHandler )
throws IllegalStateException
if there is already a MessageHandler registered for the same native websocket message type as this handler. true
true
WebSocket:JAVADOC:123 void jakarta.websocket.Session.close
Close the current conversation with a normal status code and no reason phrase. true
true
WebSocket:JAVADOC:124 void jakarta.websocket.Session.close

throws IOException
if there was a connection error closing the connection. true
true
WebSocket:JAVADOC:125 void jakarta.websocket.Session.close
( CloseReason )
Close the current conversation, giving a reason for the closure. The close call causes the implementation to attempt notify the client of the close as soon as it can. This may cause the sending of unsent messages immediately prior to the close notification. After the close notification has been sent the implementation notifies the endpoint's onClose method. Note the websocket specification defines the acceptable uses of status codes and reason phrases. If the application cannot determine a suitable close code to use for the closeReason, it is recommended to use CloseReason.CloseCodes#NO_STATUS_CODE. true
true
WebSocket:JAVADOC:126 void jakarta.websocket.Session.close
( CloseReason )
throws IOException
if there was a connection error closing the connection true
true
WebSocket:JAVADOC:127 Async jakarta.websocket.Session.getAsyncRemote
Return a reference a RemoteEndpoint object representing the peer of this conversation that is able to send messages asynchronously to the peer. true
true
WebSocket:JAVADOC:128 Basic jakarta.websocket.Session.getBasicRemote
Return a reference a RemoteEndpoint object representing the peer of this conversation that is able to send messages synchronously to the peer. true
true
WebSocket:JAVADOC:129 WebSocketContainer jakarta.websocket.Session.getContainer
Return the container that this session is part of. true
true
WebSocket:JAVADOC:130 String jakarta.websocket.Session.getId
Returns a string containing the unique identifier assigned to this session. The identifier is assigned by the web socket implementation and is implementation dependent. true
true
WebSocket:JAVADOC:131 int jakarta.websocket.Session.getMaxBinaryMessageBufferSize
The maximum length of incoming binary messages that this Session can buffer. If the implementation receives a binary message that it cannot buffer because it is too large, it must close the session with a close code of CloseReason.CloseCodes#TOO_BIG. true
true
WebSocket:JAVADOC:132 long jakarta.websocket.Session.getMaxIdleTimeout
Return the number of milliseconds before this conversation may be closed by the container if it is inactive, i.e. no messages are either sent or received in that time. true
true
WebSocket:JAVADOC:133 int jakarta.websocket.Session.getMaxTextMessageBufferSize
The maximum length of incoming text messages that this Session can buffer. If the implementation receives a text message that it cannot buffer because it is too large, it must close the session with a close code of CloseReason.CloseCodes#TOO_BIG. true
true
WebSocket:JAVADOC:134 Set jakarta.websocket.Session.getMessageHandlers
Return an unmodifiable copy of the set of MessageHandlers for this Session. true
true
WebSocket:JAVADOC:135 List jakarta.websocket.Session.getNegotiatedExtensions
Return the list of extensions currently in use for this conversation. true
true
WebSocket:JAVADOC:136 String jakarta.websocket.Session.getNegotiatedSubprotocol
Return the sub protocol agreed during the websocket handshake for this conversation. true
true
WebSocket:JAVADOC:137 Set jakarta.websocket.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. The Set includes the session this method is called on. These sessions may not still be open at any point after the return of this method. For example, iterating over the set at a later time may yield one or more closed sessions. Developers should use session.isOpen() to check. true
true
WebSocket:JAVADOC:138 Map jakarta.websocket.Session.getPathParameters
Return a map of the path parameter names and values used associated with the request this session was opened under. true
true
WebSocket:JAVADOC:139 String jakarta.websocket.Session.getProtocolVersion
Returns the version of the websocket protocol currently being used. This is taken as the value of the Sec-WebSocket-Version header used in the opening handshake. i.e. "13". true
true
WebSocket:JAVADOC:140 String jakarta.websocket.Session.getQueryString
Return the query string associated with the request this session was opened under. true
true
WebSocket:JAVADOC:141 Map jakarta.websocket.Session.getRequestParameterMap
Return the request parameters associated with the request this session was opened under. true
true
WebSocket:JAVADOC:142 URI jakarta.websocket.Session.getRequestURI
Return the URI under which this session was opened, including the query string if there is one. true
true
WebSocket:JAVADOC:143 Principal jakarta.websocket.Session.getUserPrincipal
Return the authenticated user for this Session or null if no user is authenticated for this session. true
true
WebSocket:JAVADOC:144 Map jakarta.websocket.Session.getUserProperties
While the session is open, this method returns a Map that the developer may use to store application specific information relating to this session instance. The developer may retrieve information from this Map at any time between the opening of the session and during the onClose() method. But outside that time, any information stored using this Map may no longer be kept by the container. Web socket applications running on distributed implementations of the web container should make any application specific objects stored here java.io.Serializable, or the object may not be recreated after a failover. true
true
WebSocket:JAVADOC:145 boolean jakarta.websocket.Session.isOpen
Return true if and only if the underlying socket is open. true
true
WebSocket:JAVADOC:146 boolean jakarta.websocket.Session.isSecure
Return true if and only if the underlying socket is using a secure transport. true
true
WebSocket:JAVADOC:147 void jakarta.websocket.Session.removeMessageHandler
( MessageHandler )
Remove the given MessageHandler from the set belonging to this session. This method may block if the given handler is processing a message until it is no longer in use. true
true
WebSocket:JAVADOC:148 void jakarta.websocket.Session.setMaxBinaryMessageBufferSize
( int )
Sets the maximum length of incoming binary messages that this Session can buffer. true
true
WebSocket:JAVADOC:149 void jakarta.websocket.Session.setMaxIdleTimeout
( long )
Set the non-zero number of milliseconds before this session will be closed by the container if it is inactive, ie no messages are either sent or received. A value that is 0 or negative indicates the session will never timeout due to inactivity. true
true
WebSocket:JAVADOC:150 void jakarta.websocket.Session.setMaxTextMessageBufferSize
( int )
Sets the maximum length of incoming text messages that this Session can buffer. true
true
WebSocket:JAVADOC:151 Session jakarta.websocket.SessionException.getSession
Return the Session on which the problem occurred. true
true
WebSocket:JAVADOC:152 SessionException jakarta.websocket.SessionException.SessionException
( String ,
Throwable ,
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. true
true
WebSocket:JAVADOC:153 Session jakarta.websocket.WebSocketContainer.connectToServer
( Object ,
URI )
Connect the supplied annotated endpoint instance to its server. The supplied object must be a class decorated with the class level jakarta.websocket.server.ServerEndpoint annotation. This method blocks until the connection is established, or throws an error if either the connection could not be made or there was a problem with the supplied endpoint class. If the developer uses this method to deploy the client endpoint, services like dependency injection that are supported, for example, when the implementation is part of the Java EE platform may not be available. If the client endpoint uses dependency injection, use WebSocketContainer#connectToServer(java.lang.Class, java.net.URI) instead. true
true
WebSocket:JAVADOC:154 Session jakarta.websocket.WebSocketContainer.connectToServer
( Object ,
URI )
throws DeploymentException
if the annotated endpoint instance is not valid. true
true
WebSocket:JAVADOC:155 Session jakarta.websocket.WebSocketContainer.connectToServer
( Object ,
URI )
throws IOException
if there was a network or protocol problem that prevented the client endpoint being connected to its server. true
true
WebSocket:JAVADOC:156 Session jakarta.websocket.WebSocketContainer.connectToServer
( Class ,
URI )
Connect the supplied annotated endpoint to its server. The supplied object must be a class decorated with the class level jakarta.websocket.server.ServerEndpoint annotation. This method blocks until the connection is established, or throws an error if either the connection could not be made or there was a problem with the supplied endpoint class. true
true
WebSocket:JAVADOC:157 Session jakarta.websocket.WebSocketContainer.connectToServer
( Class ,
URI )
throws DeploymentException
if the class is not a valid annotated endpoint class. true
true
WebSocket:JAVADOC:158 Session jakarta.websocket.WebSocketContainer.connectToServer
( Class ,
URI )
throws IOException
if there was a network or protocol problem that prevented the client endpoint being connected to its server. true
true
WebSocket:JAVADOC:159 Session jakarta.websocket.WebSocketContainer.connectToServer
( Endpoint ,
ClientEndpointConfig ,
URI )
Connect the supplied programmatic client endpoint instance to its server with the given configuration. This method blocks until the connection is established, or throws an error if the connection could not be made. If the developer uses this method to deploy the client endpoint, services like dependency injection that are supported, for example, when the implementation is part of the Java EE platform may not be available. If the client endpoint uses dependency injection, use WebSocketContainer#connectToServer(java.lang.Class, jakarta.websocket.ClientEndpointConfig, java.net.URI) instead. true
true
WebSocket:JAVADOC:160 Session jakarta.websocket.WebSocketContainer.connectToServer
( Endpoint ,
ClientEndpointConfig ,
URI )
throws DeploymentException
if the configuration is not valid true
true
WebSocket:JAVADOC:161 Session jakarta.websocket.WebSocketContainer.connectToServer
( Endpoint ,
ClientEndpointConfig ,
URI )
throws IOException
if there was a network or protocol problem that prevented the client endpoint being connected to its server true
true
WebSocket:JAVADOC:162 Session jakarta.websocket.WebSocketContainer.connectToServer
( Class ,
ClientEndpointConfig ,
URI )
Connect the supplied programmatic endpoint to its server with the given configuration. This method blocks until the connection is established, or throws an error if the connection could not be made. true
true
WebSocket:JAVADOC:163 Session jakarta.websocket.WebSocketContainer.connectToServer
( Class ,
ClientEndpointConfig ,
URI )
throws DeploymentException
if the configuration is not valid true
true
WebSocket:JAVADOC:164 Session jakarta.websocket.WebSocketContainer.connectToServer
( Class ,
ClientEndpointConfig ,
URI )
throws IOException
if there was a network or protocol problem that prevented the client endpoint being connected to its server true
true
WebSocket:JAVADOC:165 long jakarta.websocket.WebSocketContainer.getDefaultAsyncSendTimeout
Return the number of milliseconds the implementation will timeout attempting to send a websocket message for all RemoteEndpoints associated with this container. A non-positive number indicates the implementation will not timeout attempting to send a websocket message asynchronously. Note this default may be overridden in each RemoteEndpoint. true
true
WebSocket:JAVADOC:166 int jakarta.websocket.WebSocketContainer.getDefaultMaxBinaryMessageBufferSize
Returns the default maximum size of incoming binary message that this container will buffer. This default may be overridden on a per session basis using Session#setMaxBinaryMessageBufferSize(int) true
true
WebSocket:JAVADOC:167 long jakarta.websocket.WebSocketContainer.getDefaultMaxSessionIdleTimeout
Return the default time in milliseconds after which any web socket sessions in this container will be closed if it has been inactive. A value that is 0 or negative indicates the sessions will never timeout due to inactivity. The value may be overridden on a per session basis using Session#setMaxIdleTimeout(long) true
true
WebSocket:JAVADOC:168 int jakarta.websocket.WebSocketContainer.getDefaultMaxTextMessageBufferSize
Returns the default maximum size of incoming text message that this container will buffer. This default may be overridden on a per session basis using Session#setMaxTextMessageBufferSize(int) true
true
WebSocket:JAVADOC:169 Set jakarta.websocket.WebSocketContainer.getInstalledExtensions
Return the set of Extensions installed in the container. true
true
WebSocket:JAVADOC:170 void jakarta.websocket.WebSocketContainer.setAsyncSendTimeout
( long )
Sets the number of milliseconds the implementation will timeout attempting to send a websocket message for all RemoteEndpoints associated with this container. A non-positive number indicates the implementation will not timeout attempting to send a websocket message asynchronously. Note this default may be overridden in each RemoteEndpoint. true
true
WebSocket:JAVADOC:171 void jakarta.websocket.WebSocketContainer.setDefaultMaxBinaryMessageBufferSize
( int )
Sets the default maximum size of incoming binary message that this container will buffer. true
true
WebSocket:JAVADOC:172 void jakarta.websocket.WebSocketContainer.setDefaultMaxSessionIdleTimeout
( long )
Sets the default time in milliseconds after which any web socket sessions in this container will be closed if it has been inactive. A value that is 0 or negative indicates the sessions will never timeout due to inactivity. The value may be overridden on a per session basis using Session#setMaxIdleTimeout(long) true
true
WebSocket:JAVADOC:173 void jakarta.websocket.WebSocketContainer.setDefaultMaxTextMessageBufferSize
( int )
Sets the maximum size of incoming text message that this container will buffer. true
true
WebSocket:JAVADOC:174 Map jakarta.websocket.server.HandshakeRequest.getHeaders
Return the read only Map of Http Headers that came with the handshake request. The header names are case insensitive. true
true
WebSocket:JAVADOC:175 Object jakarta.websocket.server.HandshakeRequest.getHttpSession
Return a reference to the HttpSession that the web socket handshake that started this conversation was part of, if the implementation is part of a Java EE web container. true
true
WebSocket:JAVADOC:176 Map jakarta.websocket.server.HandshakeRequest.getParameterMap
Return the request parameters associated with the request. true
true
WebSocket:JAVADOC:177 String jakarta.websocket.server.HandshakeRequest.getQueryString
Return the query string associated with the request. true
true
WebSocket:JAVADOC:178 URI jakarta.websocket.server.HandshakeRequest.getRequestURI
Return the request URI of the handshake request. true
true
WebSocket:JAVADOC:179 Principal jakarta.websocket.server.HandshakeRequest.getUserPrincipal
Return the authenticated user or null if no user is authenticated for this handshake. true
true
WebSocket:JAVADOC:180 boolean jakarta.websocket.server.HandshakeRequest.isUserInRole
( String )
Checks whether the current user is in the given role. Roles and role membership can be defined using deployment descriptors of the containing WAR file, if running in a Java EE web container. If the user has not been authenticated, the method returns false. true
true
WebSocket:JAVADOC:181 String jakarta.websocket.server.PathParam.value
The name of the variable used in the URI-template. If the name does not match a path variable in the URI-template, the value of the method parameter this annotation annotates is null. true
true
WebSocket:JAVADOC:182 Set jakarta.websocket.server.ServerApplicationConfig.getAnnotatedEndpointClasses
( Set )
Return a set of annotated endpoint classes that the server container must deploy. The set of classes passed in to this method is the set obtained by scanning the archive containing the implementation of this interface. Therefore, this set passed in contains all the annotated endpoint classes in the JAR or WAR file containing the implementation of this interface. This set passed in may be used the build the set to return to the container for deployment. true
true
WebSocket:JAVADOC:183 Set jakarta.websocket.server.ServerApplicationConfig.getEndpointConfigs
( Set )
Return a set of ServerEndpointConfig instances that the server container will use to deploy the programmatic endpoints. The set of Endpoint classes passed in to this method is the set obtained by scanning the archive containing the implementation of this ServerApplicationConfig. This set passed in may be used the build the set of ServerEndpointConfig instances to return to the container for deployment. true
true
WebSocket:JAVADOC:184 void jakarta.websocket.server.ServerContainer.addEndpoint
( Class )
Deploys the given annotated endpoint into this ServerContainer during the initialization phase of deploying the application. true
true
WebSocket:JAVADOC:185 void jakarta.websocket.server.ServerContainer.addEndpoint
( Class )
throws DeploymentException
if the annotated endpoint was badly formed. true
true
WebSocket:JAVADOC:186 void jakarta.websocket.server.ServerContainer.addEndpoint
( ServerEndpointConfig )

true
true
WebSocket:JAVADOC:187 void jakarta.websocket.server.ServerContainer.addEndpoint
( ServerEndpointConfig )
throws DeploymentException
if the endpoint was badly formed. true
true
WebSocket:JAVADOC:188 Class jakarta.websocket.server.ServerEndpoint.configurator
The optional custom configurator class that the developer would like to use to further configure new instances of this endpoint. If no configurator class is provided, the implementation uses its own. The implementation creates a new instance of the configurator per logical endpoint. true
true
WebSocket:JAVADOC:189 Class[] jakarta.websocket.server.ServerEndpoint.decoders
The ordered array of decoder classes this endpoint will use. For example, if the developer has provided a MysteryObject decoder, this endpoint will be able to receive MysteryObjects as web socket messages. The websocket runtime will use the first decoder in the list able to decode a message, ignoring the remaining decoders. true
true
WebSocket:JAVADOC:190 Class[] jakarta.websocket.server.ServerEndpoint.encoders
The ordered array of encoder classes this endpoint will use. For example, if the developer has provided a MysteryObject encoder, this class will be able to send web socket messages in the form of MysteryObjects. The websocket runtime will use the first encoder in the list able to encode a message, ignoring the remaining encoders. true
true
WebSocket:JAVADOC:191 String[] jakarta.websocket.server.ServerEndpoint.subprotocols
The ordered array of web socket protocols this endpoint supports. For example, {"superchat", "chat"}. true
true
WebSocket:JAVADOC:192 String jakarta.websocket.server.ServerEndpoint.value
The URI or URI-template, level-1 (See RFC 6570) where the endpoint will be deployed. The URI us relative to the root of the web socket container and must begin with a leading "/". Trailing "/"'s are ignored. Examples: #64;ServerEndpoint("/chat") #64;ServerEndpoint("/chat/{user}") #64;ServerEndpoint("/booking/{privilege-level}") true
true
WebSocket:JAVADOC:193 Configurator jakarta.websocket.server.ServerEndpointConfig.getConfigurator
Return the ServerEndpointConfig.Configurator this configuration is using. If none was set by calling ServerEndpointConfig.Builder#configurator(jakarta.websocket.server.ServerEndpointConfig.Configurator) this methods returns the platform default configurator. true
true
WebSocket:JAVADOC:194 Class jakarta.websocket.server.ServerEndpointConfig.getEndpointClass
Returns the Class of the endpoint this configuration is configuring. If the endpoint is an annotated endpoint, the value is the class of the Java class annotated with @ServerEndpoint. if the endpoint is a programmatic, the value is the class of the subclass of Endpoint. true
true
WebSocket:JAVADOC:195 List jakarta.websocket.server.ServerEndpointConfig.getExtensions
Return the websocket extensions configured. true
true
WebSocket:JAVADOC:196 String jakarta.websocket.server.ServerEndpointConfig.getPath
Return the path for this endpoint configuration. The path is the URI or URI-template (level 1) relative to the websocket root of the server to which the endpoint using this configuration will be mapped. The path is always non-null and always begins with a leading "/". true
true
WebSocket:JAVADOC:197 List jakarta.websocket.server.ServerEndpointConfig.getSubprotocols
Return the websocket subprotocols configured. true
true
WebSocket:JAVADOC:198 ServerEndpointConfig jakarta.websocket.server.ServerEndpointConfig.Builder.build
Builds the configuration object using the current attributes that have been set on this builder object. true
true
WebSocket:JAVADOC:199 Builder jakarta.websocket.server.ServerEndpointConfig.Builder.configurator
( Configurator )
Sets the custom configurator to use on the configuration object built by this builder. true
true
WebSocket:JAVADOC:200 Builder jakarta.websocket.server.ServerEndpointConfig.Builder.create
( Class ,
String )
Creates the builder with the mandatory information of the endpoint class (programmatic or annotated), the relative URI or URI-template to use, and with no subprotocols, extensions, encoders, decoders or custom configurator. true
true
WebSocket:JAVADOC:201 Builder jakarta.websocket.server.ServerEndpointConfig.Builder.decoders
( List )
Sets the decoder implementation classes to use in the configuration. true
true
WebSocket:JAVADOC:202 Builder jakarta.websocket.server.ServerEndpointConfig.Builder.encoders
( List )
Sets the list of encoder implementation classes for this builder. true
true
WebSocket:JAVADOC:203 Builder jakarta.websocket.server.ServerEndpointConfig.Builder.extensions
( List )
Sets the extensions to use in the configuration. true
true
WebSocket:JAVADOC:204 Builder jakarta.websocket.server.ServerEndpointConfig.Builder.subprotocols
( List )
Sets the subprotocols to use in the configuration. true
true
WebSocket:JAVADOC:205 boolean jakarta.websocket.server.ServerEndpointConfig.Configurator.checkOrigin
( String )
Check the value of the Origin header (See Origin Header) the client passed during the opening handshake. The platform default implementation of this method makes a check of the validity of the Origin header sent along with the opening handshake following the recommendation at: Sending the Server's Opening Handshake. true
true
WebSocket:JAVADOC:206 Object jakarta.websocket.server.ServerEndpointConfig.Configurator.getEndpointInstance
( Class )
This method is called by the container each time a new client connects to the logical endpoint this configurator configures. Developers may override this method to control instantiation of endpoint instances in order to customize the initialization of the endpoint instance, or manage them in some other way. If the developer overrides this method, services like dependency injection that are otherwise supported, for example, when the implementation is part of the Java EE platform may not be available. The platform default implementation of this method returns a new endpoint instance per call, thereby ensuring that there is one endpoint instance per client, the default deployment cardinality. true
true
WebSocket:JAVADOC:207 Object jakarta.websocket.server.ServerEndpointConfig.Configurator.getEndpointInstance
( Class )
throws InstantiationException
if there was an error producing the endpoint instance. true
false
WebSocket:JAVADOC:208 List jakarta.websocket.server.ServerEndpointConfig.Configurator.getNegotiatedExtensions
( List ,
List )
Return the ordered list of extensions that t server endpoint will support given the requested extension list passed in, the empty list if none. See Negotiating Extensions The default platform implementation of this method returns a list containing all of the requested extensions passed to this method that it supports, using the order in the requested extensions, the empty list if none. true
true
WebSocket:JAVADOC:209 String jakarta.websocket.server.ServerEndpointConfig.Configurator.getNegotiatedSubprotocol
( List ,
List )
Return the subprotocol the server endpoint has chosen from the requested list supplied by a client who wishes to connect, or none if there wasn't one this server endpoint liked. See Sending the Server's Opening Handshake. Subclasses may provide custom algorithms based on other factors. The default platform implementation of this method returns the first subprotocol in the list sent by the client that the server supports, or the empty string if there isn't one. true
true
WebSocket:JAVADOC:210 void jakarta.websocket.server.ServerEndpointConfig.Configurator.modifyHandshake
( ServerEndpointConfig ,
HandshakeRequest ,
HandshakeResponse )
Called by the container after it has formulated a handshake response resulting from a well-formed handshake request. The container has already has already checked that this configuration has a matching URI, determined the validity of the origin using the checkOrigin method, and filled out the negotiated subprotocols and extensions based on this configuration. Custom configurations may override this method in order to inspect the request parameters and modify the handshake response that the server has formulated. and the URI checking also. If the developer does not override this method, no further modification of the request and response are made by the implementation. true
true
WebSocket:JAVADOC:211 Configurator jakarta.websocket.server.ServerEndpointConfig.Configurator.ServerEndpointConfig.Configurator

true
true
WebSocket:JAVADOC:212 void jakarta.websocket.Session.addMessageHandler
( Class ,
Whole )
Register to handle to incoming messages in this conversation. A maximum of one message handler per native websocket message type (text, binary, pong) may be added to each Session. I.e. a maximum of one message handler to handle incoming text messages a maximum of one message handler for handling incoming binary messages, and a maximum of one for handling incoming pong messages. For further details of which message handlers handle which of the native websocket message types please see MessageHandler.Whole and MessageHandler.Partial. Adding more than one of any one type will result in a runtime exception. true
true
WebSocket:JAVADOC:213 void jakarta.websocket.Session.addMessageHandler
( Class ,
Partial )
Register to handle to incoming messages in this conversation. A maximum of one message handler per native websocket message type (text, binary, pong) may be added to each Session. I.e. a maximum of one message handler to handle incoming text messages a maximum of one message handler for handling incoming binary messages, and a maximum of one for handling incoming pong messages. For further details of which message handlers handle which of the native websocket message types please see MessageHandler.Whole and MessageHandler.Partial. Adding more than one of any one type will result in a runtime exception. true
true
WebSocket:JAVADOC:213 Map jakarta.websocket.Session.getUserProperties
For client sessions, the initial contents of this Map must be a shallow copy of the user properties map returned from EndpointConfig.getUserProperties() for the ClientEndpointConfig passed to WebSocketContainer.connectToServer(Class, ClientEndpointConfig, URI) or WebSocketContainer.connectToServer(Endpoint, ClientEndpointConfig, URI). true true