Jakarta API for WebSocket
WebSocket - 2.1
JavaDoc Assertion Detail

TotalsTotalActiveDeprecatedRemoved
# of Assertions 21321300
# of Required Assertions 20920900
# of Optional Assertions 4400

IDReturnMethod/FieldDescriptionRequiredDeprecatedTestable
WebSocket:JAVADOC:1Classjakarta.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:2Class[]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:3Class[]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:4String[]jakarta.websocket.ClientEndpoint.subprotocols
The names of the subprotocols this client supports.true
true
WebSocket:JAVADOC:5Configuratorjakarta.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:6Listjakarta.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:7Listjakarta.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:8ClientEndpointConfigjakarta.websocket.ClientEndpointConfig.Builder.build
Builds a configuration object using the attributes set on this builder.true
true
WebSocket:JAVADOC:9Builderjakarta.websocket.ClientEndpointConfig.Builder.configurator
( Configurator )
Sets the configurator object for the configuration this builder will build.true
true
WebSocket:JAVADOC:10Builderjakarta.websocket.ClientEndpointConfig.Builder.create
Creates a new builder object with no subprotocols, extensions, encoders, decoders and a null configurator.true
true
WebSocket:JAVADOC:11Builderjakarta.websocket.ClientEndpointConfig.Builder.decoders
( List )
Assign the list of decoder implementation classes the client will use.true
true
WebSocket:JAVADOC:12Builderjakarta.websocket.ClientEndpointConfig.Builder.encoders
( List )
Assign the list of encoder implementation classes the client will use.true
true
WebSocket:JAVADOC:13Builderjakarta.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:14Builderjakarta.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:15voidjakarta.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:16voidjakarta.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:17Configuratorjakarta.websocket.ClientEndpointConfig.Configurator.ClientEndpointConfig.Configurator

true
true
WebSocket:JAVADOC:18CloseReasonjakarta.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:19CloseCodejakarta.websocket.CloseReason.getCloseCode
The Close code associated with this CloseReason.true
true
WebSocket:JAVADOC:20Stringjakarta.websocket.CloseReason.getReasonPhrase
The reason phrase associated with this CloseReason.true
true
WebSocket:JAVADOC:21Stringjakarta.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:22intjakarta.websocket.CloseReason.CloseCode.getCode
Returns the code number, for example the integer '1000' for normal closure.true
true
WebSocket:JAVADOC:23CloseCodejakarta.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 thetrue
true
WebSocket:JAVADOC:24intjakarta.websocket.CloseReason.CloseCodes.getCode
Return the code number of this status code.true
true
WebSocket:JAVADOC:25CloseCodesjakarta.websocket.CloseReason.CloseCodes.valueOf
( String )

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

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

true
true
WebSocket:JAVADOC:28WebSocketContainerjakarta.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:29DecodeExceptionjakarta.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:30DecodeExceptionjakarta.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:31DecodeExceptionjakarta.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:32DecodeExceptionjakarta.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:33ByteBufferjakarta.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:34Stringjakarta.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:35voidjakarta.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:36voidjakarta.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:37Objectjakarta.websocket.Decoder.Binary.decode
( ByteBuffer )
Decode the given bytes into an object of type T.true
true
WebSocket:JAVADOC:38Objectjakarta.websocket.Decoder.Binary.decode
( ByteBuffer )
throws DecodeException

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

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

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

true
true
WebSocket:JAVADOC:45booleanjakarta.websocket.Decoder.Text.willDecode
( String )
Answer whether the given String can be decoded into an object of type T.true
true
WebSocket:JAVADOC:46Objectjakarta.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:47Objectjakarta.websocket.Decoder.TextStream.decode
( Reader )
throws DecodeException

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

true
true
WebSocket:JAVADOC:49DeploymentExceptionjakarta.websocket.DeploymentException.DeploymentException
( String )
Creates a deployment exception with the given reason for the deployment failure.true
true
WebSocket:JAVADOC:50DeploymentExceptionjakarta.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:51EncodeExceptionjakarta.websocket.EncodeException.EncodeException
( Object ,
String )
Constructor with the object being encoded, and the reason why it failed to be.true
true
WebSocket:JAVADOC:52EncodeExceptionjakarta.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:53Objectjakarta.websocket.EncodeException.getObject
Return the Object that could not be encoded.true
true
WebSocket:JAVADOC:54voidjakarta.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:55voidjakarta.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:56ByteBufferjakarta.websocket.Encoder.Binary.encode
( Object )
Encode the given object into a byte array.true
true
WebSocket:JAVADOC:57ByteBufferjakarta.websocket.Encoder.Binary.encode
( Object )
throws EncodeException

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

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

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

true
true
WebSocket:JAVADOC:63voidjakarta.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:64voidjakarta.websocket.Encoder.TextStream.encode
( Object ,
Writer )
throws EncodeException
if there was an error encoding the object due to its state.true
true
WebSocket:JAVADOC:65voidjakarta.websocket.Encoder.TextStream.encode
( Object ,
Writer )
throws IOException
if there was an exception writing to the writer.true
true
WebSocket:JAVADOC:66Endpointjakarta.websocket.Endpoint.Endpoint

true
true
WebSocket:JAVADOC:67voidjakarta.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:68voidjakarta.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 DecodeExceptionstrue
true
WebSocket:JAVADOC:69voidjakarta.websocket.Endpoint.onOpen
( Session ,
EndpointConfig )
Developers must implement this method to be notified when a new conversation has just begun.true
true
WebSocket:JAVADOC:70Listjakarta.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:71Listjakarta.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:72Mapjakarta.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:73Stringjakarta.websocket.Extension.getName
The name of the extension.true
true
WebSocket:JAVADOC:74Listjakarta.websocket.Extension.getParameters
The extension parameters for this extension in the order they appear in the http headers.true
true
WebSocket:JAVADOC:75Stringjakarta.websocket.Extension.Parameter.getName
Return the name of the extension parameter.true
true
WebSocket:JAVADOC:76Stringjakarta.websocket.Extension.Parameter.getValue
Return the value of the extension parameter.true
true
WebSocket:JAVADOC:77Mapjakarta.websocket.HandshakeResponse.getHeaders
Return the list of Http headers sent by the web socket server.true
true
WebSocket:JAVADOC:78voidjakarta.websocket.MessageHandler.Partial.onMessage
( Object ,
boolean )
Called when the next part of a message has been fully received.true
true
WebSocket:JAVADOC:79voidjakarta.websocket.MessageHandler.Whole.onMessage
( Object )
Called when the message has been fully received.true
true
WebSocket:JAVADOC:80longjakarta.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:81ByteBufferjakarta.websocket.PongMessage.getApplicationData
The application data inside the pong message from the peer.true
true
WebSocket:JAVADOC:82voidjakarta.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:83voidjakarta.websocket.RemoteEndpoint.flushBatch

throws IOException

false
true
WebSocket:JAVADOC:84booleanjakarta.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:85voidjakarta.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:86voidjakarta.websocket.RemoteEndpoint.sendPing
( ByteBuffer )
throws IOException
if the ping failed to be senttrue
true
WebSocket:JAVADOC:87voidjakarta.websocket.RemoteEndpoint.sendPing
( ByteBuffer )
throws IllegalArgumentException
if the applicationData exceeds the maximum allowed payload of 125 bytestrue
true
WebSocket:JAVADOC:88voidjakarta.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:89voidjakarta.websocket.RemoteEndpoint.sendPong
( ByteBuffer )
throws IOException
if the pong failed to be senttrue
true
WebSocket:JAVADOC:90voidjakarta.websocket.RemoteEndpoint.sendPong
( ByteBuffer )
throws IllegalArgumentException
if the applicationData exceeds the maximum allowed payload of 125 bytestrue
true
WebSocket:JAVADOC:91voidjakarta.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:92voidjakarta.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:93longjakarta.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:94Futurejakarta.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:95voidjakarta.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:96Futurejakarta.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:97voidjakarta.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:98voidjakarta.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:99Futurejakarta.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:100voidjakarta.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:101OutputStreamjakarta.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:102OutputStreamjakarta.websocket.RemoteEndpoint.Basic.getSendStream

throws IOException
if there is a problem obtaining the OutputStream to write the binary message.true
true
WebSocket:JAVADOC:103Writerjakarta.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:104Writerjakarta.websocket.RemoteEndpoint.Basic.getSendWriter

throws IOException
if there is a problem obtaining the Writer to write the text message.true
true
WebSocket:JAVADOC:105voidjakarta.websocket.RemoteEndpoint.Basic.sendBinary
( ByteBuffer )
Send a binary message, returning when all of the message has been transmitted.true
true
WebSocket:JAVADOC:106voidjakarta.websocket.RemoteEndpoint.Basic.sendBinary
( ByteBuffer )
throws IOException
if there is a problem delivering the message.true
true
WebSocket:JAVADOC:107voidjakarta.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:108voidjakarta.websocket.RemoteEndpoint.Basic.sendBinary
( ByteBuffer ,
boolean )
throws IOException
if there is a problem delivering the partial message.true
true
WebSocket:JAVADOC:109voidjakarta.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:110voidjakarta.websocket.RemoteEndpoint.Basic.sendObject
( Object )
throws IOException
if there is a communication error sending the message object.true
true
WebSocket:JAVADOC:111voidjakarta.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:112voidjakarta.websocket.RemoteEndpoint.Basic.sendText
( String )
Send a text message, blocking until all of the message has been transmitted.true
true
WebSocket:JAVADOC:113voidjakarta.websocket.RemoteEndpoint.Basic.sendText
( String )
throws IOException
if there is a problem delivering the message.true
true
WebSocket:JAVADOC:114voidjakarta.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:115voidjakarta.websocket.RemoteEndpoint.Basic.sendText
( String ,
boolean )
throws IOException
if there is a problem delivering the message fragment.true
true
WebSocket:JAVADOC:116voidjakarta.websocket.SendHandler.onResult
( SendResult )
Called once the message has been transmitted.true
true
WebSocket:JAVADOC:117Throwablejakarta.websocket.SendResult.getException
The problem sending the message.true
true
WebSocket:JAVADOC:118booleanjakarta.websocket.SendResult.isOK
Determines if this result is ok or not.true
true
WebSocket:JAVADOC:119SendResultjakarta.websocket.SendResult.SendResult
( Throwable )
Construct a SendResult carrying an exception.true
true
WebSocket:JAVADOC:120SendResultjakarta.websocket.SendResult.SendResult
Construct a SendResult signifying a successful send carrying no exception.true
true
WebSocket:JAVADOC:121voidjakarta.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:122voidjakarta.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:123voidjakarta.websocket.Session.close
Close the current conversation with a normal status code and no reason phrase.true
true
WebSocket:JAVADOC:124voidjakarta.websocket.Session.close

throws IOException
if there was a connection error closing the connection.true
true
WebSocket:JAVADOC:125voidjakarta.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:126voidjakarta.websocket.Session.close
( CloseReason )
throws IOException
if there was a connection error closing the connectiontrue
true
WebSocket:JAVADOC:127Asyncjakarta.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:128Basicjakarta.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:129WebSocketContainerjakarta.websocket.Session.getContainer
Return the container that this session is part of.true
true
WebSocket:JAVADOC:130Stringjakarta.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:131intjakarta.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:132longjakarta.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:133intjakarta.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:134Setjakarta.websocket.Session.getMessageHandlers
Return an unmodifiable copy of the set of MessageHandlers for this Session.true
true
WebSocket:JAVADOC:135Listjakarta.websocket.Session.getNegotiatedExtensions
Return the list of extensions currently in use for this conversation.true
true
WebSocket:JAVADOC:136Stringjakarta.websocket.Session.getNegotiatedSubprotocol
Return the sub protocol agreed during the websocket handshake for this conversation.true
true
WebSocket:JAVADOC:137Setjakarta.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:138Mapjakarta.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:139Stringjakarta.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:140Stringjakarta.websocket.Session.getQueryString
Return the query string associated with the request this session was opened under.true
true
WebSocket:JAVADOC:141Mapjakarta.websocket.Session.getRequestParameterMap
Return the request parameters associated with the request this session was opened under.true
true
WebSocket:JAVADOC:142URIjakarta.websocket.Session.getRequestURI
Return the URI under which this session was opened, including the query string if there is one.true
true
WebSocket:JAVADOC:143Principaljakarta.websocket.Session.getUserPrincipal
Return the authenticated user for this Session or null if no user is authenticated for this session.true
true
WebSocket:JAVADOC:144Mapjakarta.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:145booleanjakarta.websocket.Session.isOpen
Return true if and only if the underlying socket is open.true
true
WebSocket:JAVADOC:146booleanjakarta.websocket.Session.isSecure
Return true if and only if the underlying socket is using a secure transport.true
true
WebSocket:JAVADOC:147voidjakarta.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:148voidjakarta.websocket.Session.setMaxBinaryMessageBufferSize
( int )
Sets the maximum length of incoming binary messages that this Session can buffer.true
true
WebSocket:JAVADOC:149voidjakarta.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:150voidjakarta.websocket.Session.setMaxTextMessageBufferSize
( int )
Sets the maximum length of incoming text messages that this Session can buffer.true
true
WebSocket:JAVADOC:151Sessionjakarta.websocket.SessionException.getSession
Return the Session on which the problem occurred.true
true
WebSocket:JAVADOC:152SessionExceptionjakarta.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:153Sessionjakarta.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:154Sessionjakarta.websocket.WebSocketContainer.connectToServer
( Object ,
URI )
throws DeploymentException
if the annotated endpoint instance is not valid.true
true
WebSocket:JAVADOC:155Sessionjakarta.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:156Sessionjakarta.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:157Sessionjakarta.websocket.WebSocketContainer.connectToServer
( Class ,
URI )
throws DeploymentException
if the class is not a valid annotated endpoint class.true
true
WebSocket:JAVADOC:158Sessionjakarta.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:159Sessionjakarta.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:160Sessionjakarta.websocket.WebSocketContainer.connectToServer
( Endpoint ,
ClientEndpointConfig ,
URI )
throws DeploymentException
if the configuration is not validtrue
true
WebSocket:JAVADOC:161Sessionjakarta.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 servertrue
true
WebSocket:JAVADOC:162Sessionjakarta.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:163Sessionjakarta.websocket.WebSocketContainer.connectToServer
( Class ,
ClientEndpointConfig ,
URI )
throws DeploymentException
if the configuration is not validtrue
true
WebSocket:JAVADOC:164Sessionjakarta.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 servertrue
true
WebSocket:JAVADOC:165longjakarta.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:166intjakarta.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:167longjakarta.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:168intjakarta.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:169Setjakarta.websocket.WebSocketContainer.getInstalledExtensions
Return the set of Extensions installed in the container.true
true
WebSocket:JAVADOC:170voidjakarta.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:171voidjakarta.websocket.WebSocketContainer.setDefaultMaxBinaryMessageBufferSize
( int )
Sets the default maximum size of incoming binary message that this container will buffer.true
true
WebSocket:JAVADOC:172voidjakarta.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:173voidjakarta.websocket.WebSocketContainer.setDefaultMaxTextMessageBufferSize
( int )
Sets the maximum size of incoming text message that this container will buffer.true
true
WebSocket:JAVADOC:174Mapjakarta.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:175Objectjakarta.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:176Mapjakarta.websocket.server.HandshakeRequest.getParameterMap
Return the request parameters associated with the request.true
true
WebSocket:JAVADOC:177Stringjakarta.websocket.server.HandshakeRequest.getQueryString
Return the query string associated with the request.true
true
WebSocket:JAVADOC:178URIjakarta.websocket.server.HandshakeRequest.getRequestURI
Return the request URI of the handshake request.true
true
WebSocket:JAVADOC:179Principaljakarta.websocket.server.HandshakeRequest.getUserPrincipal
Return the authenticated user or null if no user is authenticated for this handshake.true
true
WebSocket:JAVADOC:180booleanjakarta.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:181Stringjakarta.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:182Setjakarta.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:183Setjakarta.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:184voidjakarta.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:185voidjakarta.websocket.server.ServerContainer.addEndpoint
( Class )
throws DeploymentException
if the annotated endpoint was badly formed.true
true
WebSocket:JAVADOC:186voidjakarta.websocket.server.ServerContainer.addEndpoint
( ServerEndpointConfig )

true
true
WebSocket:JAVADOC:187voidjakarta.websocket.server.ServerContainer.addEndpoint
( ServerEndpointConfig )
throws DeploymentException
if the endpoint was badly formed.true
true
WebSocket:JAVADOC:188Classjakarta.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:189Class[]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:190Class[]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:191String[]jakarta.websocket.server.ServerEndpoint.subprotocols
The ordered array of web socket protocols this endpoint supports. For example, {"superchat", "chat"}.true
true
WebSocket:JAVADOC:192Stringjakarta.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:193Configuratorjakarta.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:194Classjakarta.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:195Listjakarta.websocket.server.ServerEndpointConfig.getExtensions
Return the websocket extensions configured.true
true
WebSocket:JAVADOC:196Stringjakarta.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:197Listjakarta.websocket.server.ServerEndpointConfig.getSubprotocols
Return the websocket subprotocols configured.true
true
WebSocket:JAVADOC:198ServerEndpointConfigjakarta.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:199Builderjakarta.websocket.server.ServerEndpointConfig.Builder.configurator
( Configurator )
Sets the custom configurator to use on the configuration object built by this builder.true
true
WebSocket:JAVADOC:200Builderjakarta.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:201Builderjakarta.websocket.server.ServerEndpointConfig.Builder.decoders
( List )
Sets the decoder implementation classes to use in the configuration.true
true
WebSocket:JAVADOC:202Builderjakarta.websocket.server.ServerEndpointConfig.Builder.encoders
( List )
Sets the list of encoder implementation classes for this builder.true
true
WebSocket:JAVADOC:203Builderjakarta.websocket.server.ServerEndpointConfig.Builder.extensions
( List )
Sets the extensions to use in the configuration.true
true
WebSocket:JAVADOC:204Builderjakarta.websocket.server.ServerEndpointConfig.Builder.subprotocols
( List )
Sets the subprotocols to use in the configuration.true
true
WebSocket:JAVADOC:205booleanjakarta.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:206Objectjakarta.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:207Objectjakarta.websocket.server.ServerEndpointConfig.Configurator.getEndpointInstance
( Class )
throws InstantiationException
if there was an error producing the endpoint instance.true
false
WebSocket:JAVADOC:208Listjakarta.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:209Stringjakarta.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:210voidjakarta.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:211Configuratorjakarta.websocket.server.ServerEndpointConfig.Configurator.ServerEndpointConfig.Configurator

true
true
WebSocket:JAVADOC:212voidjakarta.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:213voidjakarta.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