- java.lang.Object
-
- javax.websocket.ClientEndpointConfig.Configurator
-
- Enclosing interface:
- ClientEndpointConfig
public static class ClientEndpointConfig.Configurator extends Object
The Configurator class may be extended by developers who want to provide custom configuration algorithms, such as intercepting the opening handshake, or providing arbitrary methods and algorithms that can be accessed from each endpoint instance configured with this configurator.
-
-
Constructor Summary
Constructors Constructor and Description Configurator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description void
afterResponse(HandshakeResponse hr)
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.void
beforeRequest(Map<String,List<String>> headers)
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.
-
-
-
Method Detail
-
beforeRequest
public void beforeRequest(Map<String,List<String>> headers)
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.- Parameters:
headers
- the mutable map of handshake request headers the implementation is about to send to start the handshake interaction.
-
afterResponse
public void afterResponse(HandshakeResponse hr)
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.- Parameters:
hr
- the handshake response sent by the server.
-
-
Document created the 11/06/2005, last modified the 18/08/2025
Source of the printed document:https://www.gaudry.be/en/java-api-javaee-rf-javax/websocket/ClientEndpointConfig.Configurator.html
The infobrol is a personal site whose content is my sole responsibility. The text is available under CreativeCommons license (BY-NC-SA). More info on the terms of use and the author.
References
These references and links indicate documents consulted during the writing of this page, or which may provide additional information, but the authors of these sources can not be held responsible for the content of this page.
The author of this site is solely responsible for the way in which the various concepts, and the freedoms that are taken with the reference works, are presented here. Remember that you must cross multiple source information to reduce the risk of errors.