Codota Logo
WsnSession.getParent
Code IndexAdd Codota to your IDE (free)

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

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

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Gson g =
  • Codota Iconnew Gson()
  • Codota IconGsonBuilder gsonBuilder;gsonBuilder.create()
  • Codota Iconnew GsonBuilder().create()
  • Smart code suggestions by Codota
}
origin: kaazing/gateway

  @Override
  public void operationComplete(WriteFuture future) {
    if (logger.isDebugEnabled()) {
      logger.debug("HttpEmptyPacketWriterFilter writing empty packet.");
    }
    wsnSession.getParent().write(emptyWsMessage);
  }
});
origin: kaazing/gateway

final IoSessionEx parent = wsnSession.getParent();
if (WebSocketWireProtocol.HYBI_13.equals(wsVersion) || WebSocketWireProtocol.HYBI_8.equals(wsVersion)) {
origin: kaazing/gateway

public boolean isBalanceSupported() {
  String query = httpRequestURI.getQuery();
  return ((query != null) && query.contains(".kl=Y")) || this.getParent().getAttribute(HttpAcceptor.BALANCEES_KEY) != null;
}
origin: kaazing/gateway

@Override
@SuppressWarnings("unchecked")
public void initializeSession(IoSession session, ConnectFuture future) {
  WsnSession wsnSession = (WsnSession) session;
  if (wsnSession.isBalanceSupported()) {
    IoSession parent = wsnSession.getParent();
    List<String> selectedBalanceeURIs = (List<String>) parent.getAttribute(HttpAcceptor.BALANCEES_KEY);
    wsnSession.setBalanceeURIs(selectedBalanceeURIs);
  }
}
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);
}
org.kaazing.gateway.transport.wsnWsnSessiongetParent

Popular methods of WsnSession

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

Popular in Java

  • Running tasks concurrently on multiple threads
  • requestLocationUpdates (LocationManager)
  • setRequestProperty (URLConnection)
    Sets the general request property. If a property with the key already exists, overwrite its value wi
  • getContentResolver (Context)
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • ServerSocket (java.net)
    This class represents a server-side socket that waits for incoming client connections. A ServerSocke
  • KeyStore (java.security)
    This class represents an in-memory collection of keys and certificates. It manages two types of entr
  • SecureRandom (java.security)
    This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
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