Class DefaultClientEndpointConfig

    • Field Detail

      • preferredSubprotocols

        private java.util.List<java.lang.String> preferredSubprotocols
      • extensions

        private java.util.List<Extension> extensions
      • encoders

        private java.util.List<java.lang.Class<? extends Encoder>> encoders
      • decoders

        private java.util.List<java.lang.Class<? extends Decoder>> decoders
      • sslContext

        private javax.net.ssl.SSLContext sslContext
      • userProperties

        private java.util.Map<java.lang.String,​java.lang.Object> userProperties
    • Constructor Detail

      • DefaultClientEndpointConfig

        DefaultClientEndpointConfig​(java.util.List<java.lang.String> preferredSubprotocols,
                                    java.util.List<Extension> extensions,
                                    java.util.List<java.lang.Class<? extends Encoder>> encoders,
                                    java.util.List<java.lang.Class<? extends Decoder>> decoders,
                                    javax.net.ssl.SSLContext sslContext,
                                    ClientEndpointConfig.Configurator clientEndpointConfigurator)
    • Method Detail

      • getPreferredSubprotocols

        public java.util.List<java.lang.String> getPreferredSubprotocols()
        Return the protocols, in order of preference, favorite first, that this client would like to use for its sessions.
        Specified by:
        getPreferredSubprotocols in interface ClientEndpointConfig
        Returns:
        the preferred subprotocols.
      • getExtensions

        public java.util.List<Extension> getExtensions()
        Return the extensions, in order of preference, favorite first, that this client would like to use for its sessions.
        Specified by:
        getExtensions in interface ClientEndpointConfig
        Returns:
        the (unmodifiable) extension list.
      • getEncoders

        public java.util.List<java.lang.Class<? extends Encoder>> getEncoders()
        Return the (unmodifiable) list of encoders this client will use.
        Specified by:
        getEncoders in interface EndpointConfig
        Returns:
        the encoder list.
      • getDecoders

        public java.util.List<java.lang.Class<? extends Decoder>> getDecoders()
        Return the (unmodifiable) list of decoders this client will use.
        Specified by:
        getDecoders in interface EndpointConfig
        Returns:
        the decoders to use.
      • getSSLContext

        public javax.net.ssl.SSLContext getSSLContext()
        SSLContext to use to secure WebSocket (wss) connections or null for insecure Websocket (ws) connections. If there is an existing connection to the server that uses the same SSLContext and that connection supports multiplexing WebSocket connections then the container may choose to re-use that connection rather than creating a new one. Containers may provide container specific configuration to control this behaviour.
        Specified by:
        getSSLContext in interface ClientEndpointConfig
        Returns:
        the SSLContext to use to establish a secure connection to the server or null if an insecure connection should be established
      • getUserProperties

        public final java.util.Map<java.lang.String,​java.lang.Object> getUserProperties()
        Editable map of user properties.
        Specified by:
        getUserProperties in interface EndpointConfig
        Returns:
        a modifiable Map of application data.