congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
GrizzlyWebSocketAdapter.getGrizzlyWebSocket
Code IndexAdd Tabnine to your IDE (free)

How to use
getGrizzlyWebSocket
method
in
com.ning.http.client.providers.grizzly.websocket.GrizzlyWebSocketAdapter

Best Java code snippets using com.ning.http.client.providers.grizzly.websocket.GrizzlyWebSocketAdapter.getGrizzlyWebSocket (Showing top 4 results out of 315)

origin: com.ning/async-http-client

context.webSocket = webSocketAdapter;
final org.glassfish.grizzly.websockets.WebSocket ws =
    webSocketAdapter.getGrizzlyWebSocket();
origin: ch.squaredesk.nova/websockets

public ClientEndpoint createFor (
    AsyncHttpClient httpClient,
    String destination,
    MetricsCollector metricsCollector)  {
  StreamCreatingWebSocketTextListener listener = new StreamCreatingWebSocketTextListener();
  WebSocketUpgradeHandler webSocketUpgradeHandler =new WebSocketUpgradeHandler.Builder()
      .addWebSocketListener(listener)
      .build();
  com.ning.http.client.ws.WebSocket underlyingWebSocket = openConnection(httpClient, destination, webSocketUpgradeHandler);
  WebSocket webSocket = createWebSocket(destination, underlyingWebSocket, metricsCollector);
  Function<com.ning.http.client.ws.WebSocket, WebSocket> webSocketFactory = rawSocket -> webSocket;
  EndpointStreamSource endpointStreamSource =
      EndpointStreamSourceFactory.createStreamSourceFor(destination, webSocketFactory, listener, metricsCollector);
  Consumer<CloseReason> closeAction = closeReason -> {
    if (underlyingWebSocket instanceof GrizzlyWebSocketAdapter) {
      GrizzlyWebSocketAdapter gwsa = (GrizzlyWebSocketAdapter) underlyingWebSocket;
      gwsa.getGrizzlyWebSocket().close(closeReason.code, closeReason.text);
    } else {
      underlyingWebSocket.close();
    }
    listener.close();
  };
  return new ClientEndpoint(destination, endpointStreamSource, webSocket, closeAction, messageTranscriber, metricsCollector);
}
origin: javaee/grizzly-ahc

context.webSocket = webSocketAdapter;
final org.glassfish.grizzly.websockets.WebSocket ws =
    webSocketAdapter.getGrizzlyWebSocket();
origin: org.glassfish.grizzly/grizzly-http-client

context.webSocket = webSocketAdapter;
final org.glassfish.grizzly.websockets.WebSocket ws =
    webSocketAdapter.getGrizzlyWebSocket();
com.ning.http.client.providers.grizzly.websocketGrizzlyWebSocketAdaptergetGrizzlyWebSocket

Popular methods of GrizzlyWebSocketAdapter

  • <init>
  • newInstance
    Create new GrizzlyWebSocketAdapter instance.

Popular in Java

  • Finding current android device location
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • setScale (BigDecimal)
  • onRequestPermissionsResult (Fragment)
  • FlowLayout (java.awt)
    A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
  • Rectangle (java.awt)
    A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-
  • Runnable (java.lang)
    Represents a command that can be executed. Often used to run code in a different Thread.
  • Date (java.sql)
    A class which can consume and produce dates in SQL Date format. Dates are represented in SQL as yyyy
  • Time (java.sql)
    Java representation of an SQL TIME value. Provides utilities to format and parse the time's represen
  • JComboBox (javax.swing)
  • Top plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now