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

How to use
AbstractWsFrameEncoder
in
org.kaazing.gateway.transport.ws.bridge.filter

Best Java code snippets using org.kaazing.gateway.transport.ws.bridge.filter.AbstractWsFrameEncoder (Showing top 3 results out of 315)

origin: kaazing/gateway

  @Override
  public IoBufferEx encode(IoBufferAllocatorEx<?> allocator, WsMessage message, int flags) {
    return doEncode(allocator, flags, message);
  }
}
origin: kaazing/gateway

protected IoBufferEx doEncode(IoBufferAllocatorEx<?> allocator, int flags, WsMessage message) {
  switch (message.getKind()) {
    case CONTINUATION:
      return doContinuationEncode(allocator, flags, message);
    case BINARY: {
      return doBinaryEncode(allocator, flags, message);
    }
    case TEXT: {
      return doTextEncode(allocator, flags, message);
    }
    case PING: {
      return doBinaryEncode(allocator, flags, message);
    }
    case PONG: {
       return doBinaryEncode(allocator, flags, message);
    }
    case CLOSE: {
      return doCloseEncode(allocator, flags, (WsCloseMessage)message);
    }
    default:
      throw new IllegalStateException("Unrecognized frame type: " + message.getKind());
  }
}
origin: kaazing/gateway

@Override
public void encode(IoSession session, Object message,
          ProtocolEncoderOutput out) throws Exception {
  WsMessage wsMessage = (WsMessage) message;
  if (wsMessage.hasCache()) {
    IoBufferEx buf = cachingEncoder.encode(encoder, wsMessage, allocator, FLAG_SHARED | FLAG_ZERO_COPY);
    out.write(buf);
  } else {
    IoBufferEx buf = doEncode(allocator, FLAG_ZERO_COPY, wsMessage);
    out.write(buf);
  }
}
org.kaazing.gateway.transport.ws.bridge.filterAbstractWsFrameEncoder

Javadoc

Shared capability amongst native and emulated WebSocket frame encoders.

Most used methods

  • doBinaryEncode
  • doCloseEncode
  • doContinuationEncode
  • doEncode
  • doTextEncode

Popular in Java

  • Finding current android device location
  • getSystemService (Context)
  • requestLocationUpdates (LocationManager)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • System (java.lang)
    Provides access to system-related information and resources including standard input and output. Ena
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • Callable (java.util.concurrent)
    A task that returns a result and may throw an exception. Implementors define a single method with no
  • FileUtils (org.apache.commons.io)
    General file manipulation utilities. Facilities are provided in the following areas: * writing to a
  • Logger (org.apache.log4j)
    This is the central class in the log4j package. Most logging operations, except configuration, are d
  • 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