Codota Logo
WebSocketClientHandshakerFactory
Code IndexAdd Codota to your IDE (free)

How to use
WebSocketClientHandshakerFactory
in
io.netty.handler.codec.http.websocketx

Best Java code snippets using io.netty.handler.codec.http.websocketx.WebSocketClientHandshakerFactory (Showing top 20 results out of 369)

origin: wildfly/wildfly

/**
 * Creates a new handshaker.
 *
 * @param webSocketURL
 *            URL for web socket communications. e.g "ws://myhost.com/mypath".
 *            Subsequent web socket frames will be sent to this URL.
 * @param version
 *            Version of web socket specification to use to connect to the server
 * @param subprotocol
 *            Sub protocol request sent to the server. Null if no sub-protocol support is required.
 * @param allowExtensions
 *            Allow extensions to be used in the reserved bits of the web socket frame
 * @param customHeaders
 *            Custom HTTP headers to send during the handshake
 */
public static WebSocketClientHandshaker newHandshaker(
    URI webSocketURL, WebSocketVersion version, String subprotocol,
    boolean allowExtensions, HttpHeaders customHeaders) {
  return newHandshaker(webSocketURL, version, subprotocol, allowExtensions, customHeaders, 65536);
}
origin: org.jboss.errai.io.netty/netty-example

new WebSocketClientHandshakerFactory().newHandshaker(
    uri, WebSocketVersion.V13, null, false, customHeaders);
origin: wildfly/wildfly

/**
 * Creates a new handshaker.
 *
 * @param webSocketURL
 *            URL for web socket communications. e.g "ws://myhost.com/mypath".
 *            Subsequent web socket frames will be sent to this URL.
 * @param version
 *            Version of web socket specification to use to connect to the server
 * @param subprotocol
 *            Sub protocol request sent to the server. Null if no sub-protocol support is required.
 * @param allowExtensions
 *            Allow extensions to be used in the reserved bits of the web socket frame
 * @param customHeaders
 *            Custom HTTP headers to send during the handshake
 * @param maxFramePayloadLength
 *            Maximum allowable frame payload length. Setting this value to your application's
 *            requirement may reduce denial of service attacks using long data frames.
 */
public static WebSocketClientHandshaker newHandshaker(
    URI webSocketURL, WebSocketVersion version, String subprotocol,
    boolean allowExtensions, HttpHeaders customHeaders, int maxFramePayloadLength) {
  return newHandshaker(webSocketURL, version, subprotocol, allowExtensions, customHeaders,
             maxFramePayloadLength, true, false);
}
origin: wildfly/wildfly

                 int maxFramePayloadLength, boolean handleCloseFrames,
                 boolean performMasking, boolean allowMaskMismatch) {
this(WebSocketClientHandshakerFactory.newHandshaker(webSocketURL, version, subprotocol,
                          allowExtensions, customHeaders, maxFramePayloadLength,
                          performMasking, allowMaskMismatch), handleCloseFrames);
origin: jamesdbloom/mockserver

WebSocketClientHandler(InetSocketAddress serverAddress, String contextPath, WebSocketClient webSocketClient) throws URISyntaxException {
  this.handshaker = WebSocketClientHandshakerFactory.newHandshaker(
    new URI("ws://" + serverAddress.getHostName() + ":" + serverAddress.getPort() + cleanContextPath(contextPath) + "/_mockserver_callback_websocket"),
    WebSocketVersion.V13,
    null,
    false,
    new DefaultHttpHeaders(),
    Integer.MAX_VALUE
  );
  this.webSocketClient = webSocketClient;
}
origin: eclipse-vertx/vert.x

handshaker = WebSocketClientHandshakerFactory.newHandshaker(wsuri, version, subProtocols, !extensionHandshakers.isEmpty(),
                              nettyHeaders, maxWebSocketFrameSize,!options.isSendUnmaskedFrames(),false);
origin: ballerina-platform/ballerina-lang

handler = new WebSocketClientHandler(WebSocketClientHandshakerFactory.newHandshaker(uri,
    WebSocketVersion.V13, null, true, httpHeaders), callback);
origin: apache/tinkerpop

@Override
public void configure(final ChannelPipeline pipeline) {
  final String scheme = connection.getUri().getScheme();
  if (!"ws".equalsIgnoreCase(scheme) && !"wss".equalsIgnoreCase(scheme))
    throw new IllegalStateException("Unsupported scheme (only ws: or wss: supported): " + scheme);
  if (!supportsSsl() && "wss".equalsIgnoreCase(scheme))
    throw new IllegalStateException("To use wss scheme ensure that enableSsl is set to true in configuration");
  final int maxContentLength = cluster.connectionPoolSettings().maxContentLength;
  handler = new WebSocketClientHandler(
      WebSocketClientHandshakerFactory.newHandshaker(
          connection.getUri(), WebSocketVersion.V13, null, false, EmptyHttpHeaders.INSTANCE, maxContentLength));
  pipeline.addLast("http-codec", new HttpClientCodec());
  pipeline.addLast("aggregator", new HttpObjectAggregator(maxContentLength));
  pipeline.addLast("ws-handler", handler);
  pipeline.addLast("gremlin-encoder", webSocketGremlinRequestEncoder);
  pipeline.addLast("gremlin-decoder", webSocketGremlinResponseDecoder);
}
origin: apache/tinkerpop

final WebSocketClientHandler wsHandler =
    new WebSocketClientHandler(
        WebSocketClientHandshakerFactory.newHandshaker(
            uri, WebSocketVersion.V13, null, false, EmptyHttpHeaders.INSTANCE, 65536));
final MessageSerializer serializer = new GryoMessageSerializerV3d0();
origin: io.vertx/vertx-core

handshaker = WebSocketClientHandshakerFactory.newHandshaker(wsuri, version, subProtocols, !extensionHandshakers.isEmpty(),
                              nettyHeaders, maxWebSocketFrameSize,!options.isSendUnmaskedFrames(),false);
origin: org.apache.activemq/artemis-jms-client-all

/**
 * Creates a new handshaker.
 *
 * @param webSocketURL
 *            URL for web socket communications. e.g "ws://myhost.com/mypath".
 *            Subsequent web socket frames will be sent to this URL.
 * @param version
 *            Version of web socket specification to use to connect to the server
 * @param subprotocol
 *            Sub protocol request sent to the server. Null if no sub-protocol support is required.
 * @param allowExtensions
 *            Allow extensions to be used in the reserved bits of the web socket frame
 * @param customHeaders
 *            Custom HTTP headers to send during the handshake
 */
public static WebSocketClientHandshaker newHandshaker(
    URI webSocketURL, WebSocketVersion version, String subprotocol,
    boolean allowExtensions, HttpHeaders customHeaders) {
  return newHandshaker(webSocketURL, version, subprotocol, allowExtensions, customHeaders, 65536);
}
origin: apache/activemq-artemis

/**
 * Creates a new handshaker.
 *
 * @param webSocketURL
 *            URL for web socket communications. e.g "ws://myhost.com/mypath".
 *            Subsequent web socket frames will be sent to this URL.
 * @param version
 *            Version of web socket specification to use to connect to the server
 * @param subprotocol
 *            Sub protocol request sent to the server. Null if no sub-protocol support is required.
 * @param allowExtensions
 *            Allow extensions to be used in the reserved bits of the web socket frame
 * @param customHeaders
 *            Custom HTTP headers to send during the handshake
 */
public static WebSocketClientHandshaker newHandshaker(
    URI webSocketURL, WebSocketVersion version, String subprotocol,
    boolean allowExtensions, HttpHeaders customHeaders) {
  return newHandshaker(webSocketURL, version, subprotocol, allowExtensions, customHeaders, 65536);
}
origin: io.netty/netty-codec-http

/**
 * Creates a new handshaker.
 *
 * @param webSocketURL
 *            URL for web socket communications. e.g "ws://myhost.com/mypath".
 *            Subsequent web socket frames will be sent to this URL.
 * @param version
 *            Version of web socket specification to use to connect to the server
 * @param subprotocol
 *            Sub protocol request sent to the server. Null if no sub-protocol support is required.
 * @param allowExtensions
 *            Allow extensions to be used in the reserved bits of the web socket frame
 * @param customHeaders
 *            Custom HTTP headers to send during the handshake
 */
public static WebSocketClientHandshaker newHandshaker(
    URI webSocketURL, WebSocketVersion version, String subprotocol,
    boolean allowExtensions, HttpHeaders customHeaders) {
  return newHandshaker(webSocketURL, version, subprotocol, allowExtensions, customHeaders, 65536);
}
origin: org.jboss.eap/wildfly-client-all

/**
 * Creates a new handshaker.
 *
 * @param webSocketURL
 *            URL for web socket communications. e.g "ws://myhost.com/mypath".
 *            Subsequent web socket frames will be sent to this URL.
 * @param version
 *            Version of web socket specification to use to connect to the server
 * @param subprotocol
 *            Sub protocol request sent to the server. Null if no sub-protocol support is required.
 * @param allowExtensions
 *            Allow extensions to be used in the reserved bits of the web socket frame
 * @param customHeaders
 *            Custom HTTP headers to send during the handshake
 */
public static WebSocketClientHandshaker newHandshaker(
    URI webSocketURL, WebSocketVersion version, String subprotocol,
    boolean allowExtensions, HttpHeaders customHeaders) {
  return newHandshaker(webSocketURL, version, subprotocol, allowExtensions, customHeaders, 65536);
}
origin: org.apache.activemq/artemis-jms-client-all

/**
 * Creates a new handshaker.
 *
 * @param webSocketURL
 *            URL for web socket communications. e.g "ws://myhost.com/mypath".
 *            Subsequent web socket frames will be sent to this URL.
 * @param version
 *            Version of web socket specification to use to connect to the server
 * @param subprotocol
 *            Sub protocol request sent to the server. Null if no sub-protocol support is required.
 * @param allowExtensions
 *            Allow extensions to be used in the reserved bits of the web socket frame
 * @param customHeaders
 *            Custom HTTP headers to send during the handshake
 * @param maxFramePayloadLength
 *            Maximum allowable frame payload length. Setting this value to your application's
 *            requirement may reduce denial of service attacks using long data frames.
 */
public static WebSocketClientHandshaker newHandshaker(
    URI webSocketURL, WebSocketVersion version, String subprotocol,
    boolean allowExtensions, HttpHeaders customHeaders, int maxFramePayloadLength) {
  return newHandshaker(webSocketURL, version, subprotocol, allowExtensions, customHeaders,
             maxFramePayloadLength, true, false);
}
origin: apache/activemq-artemis

/**
 * Creates a new handshaker.
 *
 * @param webSocketURL
 *            URL for web socket communications. e.g "ws://myhost.com/mypath".
 *            Subsequent web socket frames will be sent to this URL.
 * @param version
 *            Version of web socket specification to use to connect to the server
 * @param subprotocol
 *            Sub protocol request sent to the server. Null if no sub-protocol support is required.
 * @param allowExtensions
 *            Allow extensions to be used in the reserved bits of the web socket frame
 * @param customHeaders
 *            Custom HTTP headers to send during the handshake
 * @param maxFramePayloadLength
 *            Maximum allowable frame payload length. Setting this value to your application's
 *            requirement may reduce denial of service attacks using long data frames.
 */
public static WebSocketClientHandshaker newHandshaker(
    URI webSocketURL, WebSocketVersion version, String subprotocol,
    boolean allowExtensions, HttpHeaders customHeaders, int maxFramePayloadLength) {
  return newHandshaker(webSocketURL, version, subprotocol, allowExtensions, customHeaders,
             maxFramePayloadLength, true, false);
}
origin: io.netty/netty-codec-http

/**
 * Creates a new handshaker.
 *
 * @param webSocketURL
 *            URL for web socket communications. e.g "ws://myhost.com/mypath".
 *            Subsequent web socket frames will be sent to this URL.
 * @param version
 *            Version of web socket specification to use to connect to the server
 * @param subprotocol
 *            Sub protocol request sent to the server. Null if no sub-protocol support is required.
 * @param allowExtensions
 *            Allow extensions to be used in the reserved bits of the web socket frame
 * @param customHeaders
 *            Custom HTTP headers to send during the handshake
 * @param maxFramePayloadLength
 *            Maximum allowable frame payload length. Setting this value to your application's
 *            requirement may reduce denial of service attacks using long data frames.
 */
public static WebSocketClientHandshaker newHandshaker(
    URI webSocketURL, WebSocketVersion version, String subprotocol,
    boolean allowExtensions, HttpHeaders customHeaders, int maxFramePayloadLength) {
  return newHandshaker(webSocketURL, version, subprotocol, allowExtensions, customHeaders,
             maxFramePayloadLength, true, false);
}
origin: org.jboss.eap/wildfly-client-all

/**
 * Creates a new handshaker.
 *
 * @param webSocketURL
 *            URL for web socket communications. e.g "ws://myhost.com/mypath".
 *            Subsequent web socket frames will be sent to this URL.
 * @param version
 *            Version of web socket specification to use to connect to the server
 * @param subprotocol
 *            Sub protocol request sent to the server. Null if no sub-protocol support is required.
 * @param allowExtensions
 *            Allow extensions to be used in the reserved bits of the web socket frame
 * @param customHeaders
 *            Custom HTTP headers to send during the handshake
 * @param maxFramePayloadLength
 *            Maximum allowable frame payload length. Setting this value to your application's
 *            requirement may reduce denial of service attacks using long data frames.
 */
public static WebSocketClientHandshaker newHandshaker(
    URI webSocketURL, WebSocketVersion version, String subprotocol,
    boolean allowExtensions, HttpHeaders customHeaders, int maxFramePayloadLength) {
  return newHandshaker(webSocketURL, version, subprotocol, allowExtensions, customHeaders,
             maxFramePayloadLength, true, false);
}
origin: io.netty/netty-codec-http

                 int maxFramePayloadLength, boolean handleCloseFrames,
                 boolean performMasking, boolean allowMaskMismatch) {
this(WebSocketClientHandshakerFactory.newHandshaker(webSocketURL, version, subprotocol,
                          allowExtensions, customHeaders, maxFramePayloadLength,
                          performMasking, allowMaskMismatch), handleCloseFrames);
origin: org.apache.activemq/artemis-jms-client-all

                 int maxFramePayloadLength, boolean handleCloseFrames,
                 boolean performMasking, boolean allowMaskMismatch) {
this(WebSocketClientHandshakerFactory.newHandshaker(webSocketURL, version, subprotocol,
                          allowExtensions, customHeaders, maxFramePayloadLength,
                          performMasking, allowMaskMismatch), handleCloseFrames);
io.netty.handler.codec.http.websocketxWebSocketClientHandshakerFactory

Javadoc

Creates a new WebSocketClientHandshaker of desired protocol version.

Most used methods

  • newHandshaker
  • <init>
    Private constructor so this static class cannot be instanced.

Popular in Java

  • Creating JSON documents from java classes using gson
  • notifyDataSetChanged (ArrayAdapter)
  • scheduleAtFixedRate (ScheduledExecutorService)
    Creates and executes a periodic action that becomes enabled first after the given initial delay, and
  • getApplicationContext (Context)
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • Date (java.sql)
    A class which can consume and produce dates in SQL Date format. Dates are represented in SQL as yyyy
  • Executors (java.util.concurrent)
    Factory and utility methods for Executor, ExecutorService, ScheduledExecutorService, ThreadFactory,
  • Pattern (java.util.regex)
    A compiled representation of a regular expression. A regular expression, specified as a string, must
  • JTable (javax.swing)
  • Response (javax.ws.rs.core)
    Defines the contract between a returned instance and the runtime when an application needs to provid
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now