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

How to use
getFilterChain
method
in
org.kaazing.gateway.transport.wsn.WsnSession

Best Java code snippets using org.kaazing.gateway.transport.wsn.WsnSession.getFilterChain (Showing top 5 results out of 315)

origin: kaazing/gateway

@Override
protected void doSessionIdle(IoSessionEx session, IdleStatus status) throws Exception {
  WsnSession wsnSession = SESSION_KEY.get(session);
  if (wsnSession != null) {
    IoFilterChain filterChain = wsnSession.getFilterChain();
    filterChain.fireSessionIdle(status);
  }
}
origin: kaazing/gateway

@Override
protected void doSessionIdle(IoSessionEx session, IdleStatus status) throws Exception {
  WsnSession wsnSession = SESSION_KEY.get(session);
  IoFilterChain filterChain = wsnSession.getFilterChain();
  filterChain.fireSessionIdle(status);
}
origin: kaazing/gateway

@Override
protected void doMessageReceived(IoSessionEx session, Object message) throws Exception {
  WsnSession wsnSession = SESSION_KEY.get(session);
  IoFilterChain filterChain = wsnSession.getFilterChain();
origin: kaazing/gateway

@Override
protected void doFilterWrite(final NextFilter nextFilter,
               final WsnSession wsnSession,
               WriteRequest writeRequest) throws Exception {
  IoSession parent = wsnSession.getParent();
  Encoding encoding = (Encoding) parent.getAttribute("encoding");
  final WsMessage emptyWsMessage;
  final IoBufferAllocatorEx<?> allocator = wsnSession.getBufferAllocator();
  switch(encoding) {
    case TEXT:
      emptyWsMessage = new WsTextMessage(allocator.wrap(allocator.allocate(0)));
      break;
    default:
      emptyWsMessage = new WsBinaryMessage(allocator.wrap(allocator.allocate(0)));
  }
  writeRequest.getFuture().addListener(new IoFutureListener<WriteFuture>() {
    @Override
    public void operationComplete(WriteFuture future) {
      if (logger.isDebugEnabled()) {
        logger.debug("HttpEmptyPacketWriterFilter writing empty packet.");
      }
      wsnSession.getParent().write(emptyWsMessage);
    }
  });
  HttpResponseMessage message = (HttpResponseMessage) writeRequest.getMessage();
  if ( message.getStatus() != HttpStatus.CLIENT_UNAUTHORIZED) {
    wsnSession.getFilterChain().remove(HttpEmptyPacketWriterFilter.this);
  }
  nextFilter.filterWrite(wsnSession, writeRequest);
}
origin: kaazing/gateway

IoFilterChain filterChain = wsnSession.getFilterChain();
IoBufferAllocatorEx<? extends WsBuffer> allocator = wsnSession.getBufferAllocator();
org.kaazing.gateway.transport.wsnWsnSessiongetFilterChain

Popular methods of WsnSession

  • close
  • getParent
  • isBalanceSupported
  • getBalanceeURIs
  • getBufferAllocator
  • getCloseException
  • getCloseFuture
  • getHandler
  • getLocalAddress
  • getParentHttpRequestURI
  • getProcessor
  • getVersion
  • getProcessor,
  • getVersion,
  • isClosing,
  • reset,
  • setBalanceeURIs,
  • setCloseException,
  • setLoginContext,
  • startupScheduledCommands

Popular in Java

  • Creating JSON documents from java classes using gson
  • startActivity (Activity)
  • getExternalFilesDir (Context)
  • putExtra (Intent)
  • PrintWriter (java.io)
    Wraps either an existing OutputStream or an existing Writerand provides convenience methods for prin
  • ConnectException (java.net)
    A ConnectException is thrown if a connection cannot be established to a remote host on a specific po
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • TimeUnit (java.util.concurrent)
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t
  • Top PhpStorm plugins
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