javax.websocket
Class ClientEndpointConfig.Configurator

java.lang.Object
  extended by javax.websocket.ClientEndpointConfig.Configurator
Enclosing interface:
ClientEndpointConfig

public abstract static class ClientEndpointConfig.Configurator
extends Object

The Configurator interface may be implemented 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
ClientEndpointConfig.Configurator()
           
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClientEndpointConfig.Configurator

public ClientEndpointConfig.Configurator()
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.


Copyright © 2012-2013, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.
Comments to : [email protected]