Tabnine Logo
WsnSession.getParent
Code IndexAdd Tabnine 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)

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
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • getSharedPreferences (Context)
  • getExternalFilesDir (Context)
  • Rectangle (java.awt)
    A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-
  • KeyStore (java.security)
    KeyStore is responsible for maintaining cryptographic keys and their owners. The type of the syste
  • Hashtable (java.util)
    A plug-in replacement for JDK1.5 java.util.Hashtable. This version is based on org.cliffc.high_scale
  • LinkedList (java.util)
    Doubly-linked list implementation of the List and Dequeinterfaces. Implements all optional list oper
  • JComboBox (javax.swing)
  • JPanel (javax.swing)
  • From CI to AI: The AI layer in your organization
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