congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
WebSocketProcessor.open
Code IndexAdd Tabnine to your IDE (free)

How to use
open
method
in
org.atmosphere.websocket.WebSocketProcessor

Best Java code snippets using org.atmosphere.websocket.WebSocketProcessor.open (Showing top 5 results out of 315)

origin: Atmosphere/atmosphere

webSocketProcessor.open(webSocket, request, AtmosphereResponseImpl.newInstance(framework.getAtmosphereConfig(), request, webSocket));
origin: Atmosphere/nettosphere

  @Override
  public void operationComplete(ChannelFuture future) throws Exception {
    if (!future.isSuccess()) {
      future.channel().close();
    } else {
      websocketChannels.add(ctx.channel());
      ctx.channel().attr(ATTACHMENT).set(webSocket);
      if (config.noInternalAlloc()) {
        webSocket.resource(proxiedResource);
      }
      AtmosphereResponse response = config.noInternalAlloc() ? proxiedResponse :
          AtmosphereResponseImpl.newInstance(framework.getAtmosphereConfig(), atmosphereRequest, webSocket);
      webSocketProcessor.open(webSocket, atmosphereRequest, response);
      if (webSocketTimeout > 0) {
        webSocket.closeFuture(suspendTimer.scheduleAtFixedRate(() -> {
          if (webSocket.lastWriteTimeStampInMilliseconds() != 0 && (System.currentTimeMillis() - webSocket.lastWriteTimeStampInMilliseconds() > webSocketTimeout)) {
            logger.debug("Timing out {}", webSocket);
            webSocket.close();
          }
        }, webSocketTimeout, webSocketTimeout, TimeUnit.MILLISECONDS));
      }
    }
  }
});
origin: org.atmosphere/nettosphere

  @Override
  public void operationComplete(ChannelFuture future) throws Exception {
    if (!future.isSuccess()) {
      future.channel().close();
    } else {
      websocketChannels.add(ctx.channel());
      ctx.channel().attr(ATTACHMENT).set(webSocket);
      if (config.noInternalAlloc()) {
        webSocket.resource(proxiedResource);
      }
      AtmosphereResponse response = config.noInternalAlloc() ? proxiedResponse :
          AtmosphereResponseImpl.newInstance(framework.getAtmosphereConfig(), atmosphereRequest, webSocket);
      webSocketProcessor.open(webSocket, atmosphereRequest, response);
      if (webSocketTimeout > 0) {
        webSocket.closeFuture(suspendTimer.scheduleAtFixedRate(() -> {
          if (webSocket.lastWriteTimeStampInMilliseconds() != 0 && (System.currentTimeMillis() - webSocket.lastWriteTimeStampInMilliseconds() > webSocketTimeout)) {
            logger.debug("Timing out {}", webSocket);
            webSocket.close();
          }
        }, webSocketTimeout, webSocketTimeout, TimeUnit.MILLISECONDS));
      }
    }
  }
});
origin: Atmosphere/atmosphere-vertx

  webSocketProcessor.open(w, r, AtmosphereResponseImpl.newInstance(framework.getAtmosphereConfig(), r, w));
} catch (IOException e) {
  logger.debug("", e);
origin: Atmosphere/atmosphere-play

@Override
public void preStart() {
  try {
    this.playWebSocket = new PlayWebSocket(actorRef, atmosphereConfig);
    this.webSocketProcessor = WebSocketProcessorFactory.getDefault().getWebSocketProcessor(atmosphereConfig.framework());
    AtmosphereRequest atmosphereRequest = AtmosphereUtils.request(new Http.RequestImpl(requestHeader), additionalAttributes);
    this.webSocketProcessor.open(playWebSocket, atmosphereRequest, AtmosphereResponseImpl.newInstance(atmosphereConfig, atmosphereRequest, playWebSocket));
  } catch (Throwable throwable) {
    LOG.error("Failed to start the actor ", throwable);
  }
}
org.atmosphere.websocketWebSocketProcessoropen

Javadoc

Invoked when a WebSocket gets opened by the underlying container

Popular methods of WebSocketProcessor

  • close
  • invokeWebSocketProtocol
  • handshake
  • notifyListener
  • configure
    Configure, or post construct a WebSocketProcessor
  • destroy
    Destroy all resources associated with this class.
  • registerWebSocketHandler
    Register a WebSocketHandler

Popular in Java

  • Parsing JSON documents to java classes using gson
  • getSharedPreferences (Context)
  • setRequestProperty (URLConnection)
  • runOnUiThread (Activity)
  • Dictionary (java.util)
    Note: Do not use this class since it is obsolete. Please use the Map interface for new implementatio
  • Stack (java.util)
    Stack is a Last-In/First-Out(LIFO) data structure which represents a stack of objects. It enables u
  • Notification (javax.management)
  • DataSource (javax.sql)
    An interface for the creation of Connection objects which represent a connection to a database. This
  • LogFactory (org.apache.commons.logging)
    Factory for creating Log instances, with discovery and configuration features similar to that employ
  • Option (scala)
  • Top 17 Plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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