congrats Icon
New! Announcing our next generation AI code completions
Read here
Tabnine Logo
WebSocketProcessor.close
Code IndexAdd Tabnine to your IDE (free)

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

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

origin: Atmosphere/atmosphere

@Override
public void onClose(javax.websocket.Session session, javax.websocket.CloseReason closeCode) {
  logger.trace("{} closed {}", session, closeCode);
  if (request != null) {
    request.destroy();
    webSocketProcessor.close(webSocket, closeCode.getCloseCode().getCode());
  }
}
origin: Atmosphere/atmosphere

void patchGlassFish(NullPointerException e) {
  // https://java.net/jira/browse/TYRUS-175
  logger.trace("", e);
  WebSocketProcessorFactory.getDefault().getWebSocketProcessor(config().framework()).close(this, 1002);
}
origin: Atmosphere/atmosphere-play

@Override
public void postStop() {
  this.webSocketProcessor.close(playWebSocket, 1002);
}
origin: Atmosphere/atmosphere-vertx

  @Override
  public void handle(Throwable event) {
    w.close();
    logger.debug("", event);
    webSocketProcessor.close(w, 1006);
  }
});
origin: Atmosphere/nettosphere

@Override
public void channelInactive(ChannelHandlerContext ctx) throws Exception {
  super.channelInactive(ctx);
  Object o = ctx.attr(ATTACHMENT).get();
  if (o == null) return;
  if (WebSocket.class.isAssignableFrom(o.getClass())) {
    NettyWebSocket webSocket = NettyWebSocket.class.cast(o);
    logger.trace("Closing {}", webSocket.uuid());
    try {
      if (webSocket.closeFuture() != null) {
        webSocket.closeFuture().cancel(true);
      }
      webSocketProcessor.close(webSocket, 1005);
    } catch (Exception ex) {
      logger.error("{}", webSocket, ex);
    }
  } else if (State.class.isAssignableFrom(o.getClass())) {
    logger.trace("State {}", o);
    State s = State.class.cast(o);
    if (s.action.type() == Action.TYPE.SUSPEND) {
      asynchronousProcessor.endRequest(s.resource(), true);
    }
  } else {
    logger.warn("Invalid state {} and Channel {}", o, ctx.channel());
  }
}
origin: org.atmosphere/nettosphere

@Override
public void channelInactive(ChannelHandlerContext ctx) throws Exception {
  super.channelInactive(ctx);
  Object o = ctx.attr(ATTACHMENT).get();
  if (o == null) return;
  if (WebSocket.class.isAssignableFrom(o.getClass())) {
    NettyWebSocket webSocket = NettyWebSocket.class.cast(o);
    logger.trace("Closing {}", webSocket.uuid());
    try {
      if (webSocket.closeFuture() != null) {
        webSocket.closeFuture().cancel(true);
      }
      webSocketProcessor.close(webSocket, 1005);
    } catch (Exception ex) {
      logger.error("{}", webSocket, ex);
    }
  } else if (State.class.isAssignableFrom(o.getClass())) {
    logger.trace("State {}", o);
    State s = State.class.cast(o);
    if (s.action.type() == Action.TYPE.SUSPEND) {
      asynchronousProcessor.endRequest(s.resource(), true);
    }
  } else {
    logger.warn("Invalid state {} and Channel {}", o, ctx.channel());
  }
}
origin: Atmosphere/atmosphere-vertx

webSocket.closeHandler(aVoid -> {
  w.close();
  webSocketProcessor.close(w, 1005);
});
return this;
org.atmosphere.websocketWebSocketProcessorclose

Javadoc

Invked when the WebServer is closing the native WebSocket

Popular methods of WebSocketProcessor

  • open
  • 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

  • Creating JSON documents from java classes using gson
  • setRequestProperty (URLConnection)
  • putExtra (Intent)
  • getExternalFilesDir (Context)
  • BorderLayout (java.awt)
    A border layout lays out a container, arranging and resizing its components to fit in five regions:
  • Date (java.util)
    A specific moment in time, with millisecond precision. Values typically come from System#currentTime
  • Collectors (java.util.stream)
  • Stream (java.util.stream)
    A sequence of elements supporting sequential and parallel aggregate operations. The following exampl
  • Response (javax.ws.rs.core)
    Defines the contract between a returned instance and the runtime when an application needs to provid
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
  • 21 Best IntelliJ Plugins
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