Codota Logo
ContinuationWebSocketFrame.<init>
Code IndexAdd Codota to your IDE (free)

How to use
io.netty.handler.codec.http.websocketx.ContinuationWebSocketFrame
constructor

Best Java code snippets using io.netty.handler.codec.http.websocketx.ContinuationWebSocketFrame.<init> (Showing top 20 results out of 315)

  • Common ways to obtain ContinuationWebSocketFrame
private void myMethod () {
ContinuationWebSocketFrame c =
  • Codota IconWebSocketFrame webSocketFrame;(ContinuationWebSocketFrame) webSocketFrame.duplicate()
  • Codota IconWebSocketFrame webSocketFrame;(ContinuationWebSocketFrame) webSocketFrame.copy()
  • Codota IconWebSocketFrame webSocketFrame;(ContinuationWebSocketFrame) webSocketFrame.retainedDuplicate()
  • Smart code suggestions by Codota
}
origin: AsyncHttpClient/async-http-client

@Override
public Future<Void> sendContinuationFrame(String payload, boolean finalFragment, int rsv) {
 return channel.writeAndFlush(new ContinuationWebSocketFrame(finalFragment, rsv, payload));
}
origin: AsyncHttpClient/async-http-client

@Override
public Future<Void> sendContinuationFrame(ByteBuf payload, boolean finalFragment, int rsv) {
 return channel.writeAndFlush(new ContinuationWebSocketFrame(finalFragment, rsv, payload));
}
origin: wildfly/wildfly

@Override
public ContinuationWebSocketFrame replace(ByteBuf content) {
  return new ContinuationWebSocketFrame(isFinalFragment(), rsv(), content);
}
origin: wildfly/wildfly

/**
 * Fetches a chunked data from the stream. Once this method returns the last chunk
 * and thus the stream has reached at its end, any subsequent {@link #isEndOfInput()}
 * call must return {@code true}.
 *
 * @param allocator {@link ByteBufAllocator}
 * @return {@link WebSocketFrame} contain chunk of data
 */
@Override
public WebSocketFrame readChunk(ByteBufAllocator allocator) throws Exception {
  ByteBuf buf = input.readChunk(allocator);
  if (buf == null) {
    return null;
  }
  return new ContinuationWebSocketFrame(input.isEndOfInput(), rsv, buf);
}
origin: normanmaurer/netty-in-action

 @Override
 protected void encode(ChannelHandlerContext ctx,
   WebSocketConvertHandler.MyWebSocketFrame msg,
   List<Object> out) throws Exception {
   ByteBuf payload = msg.getData().duplicate().retain();
   switch (msg.getType()) {
     case BINARY:
       out.add(new BinaryWebSocketFrame(payload));
       break;
     case TEXT:
       out.add(new TextWebSocketFrame(payload));
       break;
     case CLOSE:
       out.add(new CloseWebSocketFrame(true, 0, payload));
       break;
     case CONTINUATION:
       out.add(new ContinuationWebSocketFrame(payload));
       break;
     case PONG:
       out.add(new PongWebSocketFrame(payload));
       break;
     case PING:
       out.add(new PingWebSocketFrame(payload));
       break;
     default:
       throw new IllegalStateException(
         "Unsupported websocket msg " + msg);}
}
origin: eclipse-vertx/vert.x

WebSocketFrame encodeFrame(WebSocketFrameImpl frame) {
 ByteBuf buf = frame.getBinaryData();
 if (buf != Unpooled.EMPTY_BUFFER) {
  buf = safeBuffer(buf, chctx.alloc());
 }
 switch (frame.type()) {
  case BINARY:
   return new BinaryWebSocketFrame(frame.isFinal(), 0, buf);
  case TEXT:
   return new TextWebSocketFrame(frame.isFinal(), 0, buf);
  case CLOSE:
   return new CloseWebSocketFrame(true, 0, buf);
  case CONTINUATION:
   return new ContinuationWebSocketFrame(frame.isFinal(), 0, buf);
  case PONG:
   return new PongWebSocketFrame(buf);
  case PING:
   return new PingWebSocketFrame(buf);
  default:
   throw new IllegalStateException("Unsupported websocket msg " + frame);
 }
}
origin: wildfly/wildfly

  outMsg = new BinaryWebSocketFrame(msg.isFinalFragment(), newRsv(msg), compositeUncompressedContent);
} else if (msg instanceof ContinuationWebSocketFrame) {
  outMsg = new ContinuationWebSocketFrame(msg.isFinalFragment(), newRsv(msg),
      compositeUncompressedContent);
} else {
origin: wildfly/wildfly

  return;
} else if (frameOpcode == OPCODE_CONT) {
  out.add(new ContinuationWebSocketFrame(frameFinalFlag, frameRsv,
      payloadBuffer));
  payloadBuffer = null;
origin: wildfly/wildfly

  outMsg = new BinaryWebSocketFrame(msg.isFinalFragment(), rsv(msg), compressedContent);
} else if (msg instanceof ContinuationWebSocketFrame) {
  outMsg = new ContinuationWebSocketFrame(msg.isFinalFragment(), rsv(msg), compressedContent);
} else {
  throw new CodecException("unexpected frame type: " + msg.getClass().getName());
origin: io.vertx/vertx-core

WebSocketFrame encodeFrame(WebSocketFrameImpl frame) {
 ByteBuf buf = frame.getBinaryData();
 if (buf != Unpooled.EMPTY_BUFFER) {
  buf = safeBuffer(buf, chctx.alloc());
 }
 switch (frame.type()) {
  case BINARY:
   return new BinaryWebSocketFrame(frame.isFinal(), 0, buf);
  case TEXT:
   return new TextWebSocketFrame(frame.isFinal(), 0, buf);
  case CLOSE:
   return new CloseWebSocketFrame(true, 0, buf);
  case CONTINUATION:
   return new ContinuationWebSocketFrame(frame.isFinal(), 0, buf);
  case PONG:
   return new PongWebSocketFrame(buf);
  case PING:
   return new PingWebSocketFrame(buf);
  default:
   throw new IllegalStateException("Unsupported websocket msg " + frame);
 }
}
origin: org.wso2.transport.http/org.wso2.transport.http.netty

@Override
public ChannelFuture pushText(String text, boolean finalFrame) {
  if (continuationFrameType == WebSocketFrameType.BINARY) {
    throw new IllegalStateException("Cannot interrupt WebSocket binary frame continuation");
  }
  if (closeFrameSent) {
    throw new IllegalStateException("Close frame already sent. Cannot push text data!");
  }
  if (continuationFrameType != null) {
    if (finalFrame) {
      continuationFrameType = null;
    }
    return ctx.writeAndFlush(new ContinuationWebSocketFrame(finalFrame, 0, text));
  }
  if (!finalFrame) {
    continuationFrameType = WebSocketFrameType.TEXT;
  }
  return ctx.writeAndFlush(new TextWebSocketFrame(finalFrame, 0, text));
}
origin: io.netty/netty-codec-http

@Override
public ContinuationWebSocketFrame replace(ByteBuf content) {
  return new ContinuationWebSocketFrame(isFinalFragment(), rsv(), content);
}
origin: apache/activemq-artemis

@Override
public ContinuationWebSocketFrame replace(ByteBuf content) {
  return new ContinuationWebSocketFrame(isFinalFragment(), rsv(), content);
}
origin: org.jboss.eap/wildfly-client-all

@Override
public ContinuationWebSocketFrame replace(ByteBuf content) {
  return new ContinuationWebSocketFrame(isFinalFragment(), rsv(), content);
}
origin: org.apache.activemq/artemis-jms-client-all

@Override
public ContinuationWebSocketFrame replace(ByteBuf content) {
  return new ContinuationWebSocketFrame(isFinalFragment(), rsv(), content);
}
origin: org.wso2.transport.http/org.wso2.transport.http.netty

@Override
public ChannelFuture pushBinary(ByteBuffer data, boolean finalFrame) {
  if (continuationFrameType == WebSocketFrameType.TEXT) {
    throw new IllegalStateException("Cannot interrupt WebSocket text frame continuation");
  }
  if (closeFrameSent) {
    throw new IllegalStateException("Close frame already sent. Cannot push binary data.");
  }
  if (continuationFrameType != null) {
    if (finalFrame) {
      continuationFrameType = null;
    }
    return ctx.writeAndFlush(new ContinuationWebSocketFrame(finalFrame, 0, getNettyByteBuf(data)));
  }
  if (!finalFrame) {
    continuationFrameType = WebSocketFrameType.BINARY;
  }
  return ctx.writeAndFlush(new BinaryWebSocketFrame(finalFrame, 0, getNettyByteBuf(data)));
}
origin: io.netty/netty-codec-http

/**
 * Fetches a chunked data from the stream. Once this method returns the last chunk
 * and thus the stream has reached at its end, any subsequent {@link #isEndOfInput()}
 * call must return {@code true}.
 *
 * @param allocator {@link ByteBufAllocator}
 * @return {@link WebSocketFrame} contain chunk of data
 */
@Override
public WebSocketFrame readChunk(ByteBufAllocator allocator) throws Exception {
  ByteBuf buf = input.readChunk(allocator);
  if (buf == null) {
    return null;
  }
  return new ContinuationWebSocketFrame(input.isEndOfInput(), rsv, buf);
}
origin: apache/activemq-artemis

/**
 * Fetches a chunked data from the stream. Once this method returns the last chunk
 * and thus the stream has reached at its end, any subsequent {@link #isEndOfInput()}
 * call must return {@code true}.
 *
 * @param allocator {@link ByteBufAllocator}
 * @return {@link WebSocketFrame} contain chunk of data
 */
@Override
public WebSocketFrame readChunk(ByteBufAllocator allocator) throws Exception {
  ByteBuf buf = input.readChunk(allocator);
  if (buf == null) {
    return null;
  }
  return new ContinuationWebSocketFrame(input.isEndOfInput(), rsv, buf);
}
origin: org.jboss.eap/wildfly-client-all

/**
 * Fetches a chunked data from the stream. Once this method returns the last chunk
 * and thus the stream has reached at its end, any subsequent {@link #isEndOfInput()}
 * call must return {@code true}.
 *
 * @param allocator {@link ByteBufAllocator}
 * @return {@link WebSocketFrame} contain chunk of data
 */
@Override
public WebSocketFrame readChunk(ByteBufAllocator allocator) throws Exception {
  ByteBuf buf = input.readChunk(allocator);
  if (buf == null) {
    return null;
  }
  return new ContinuationWebSocketFrame(input.isEndOfInput(), rsv, buf);
}
origin: org.apache.activemq/artemis-jms-client-all

/**
 * Fetches a chunked data from the stream. Once this method returns the last chunk
 * and thus the stream has reached at its end, any subsequent {@link #isEndOfInput()}
 * call must return {@code true}.
 *
 * @param allocator {@link ByteBufAllocator}
 * @return {@link WebSocketFrame} contain chunk of data
 */
@Override
public WebSocketFrame readChunk(ByteBufAllocator allocator) throws Exception {
  ByteBuf buf = input.readChunk(allocator);
  if (buf == null) {
    return null;
  }
  return new ContinuationWebSocketFrame(input.isEndOfInput(), rsv, buf);
}
io.netty.handler.codec.http.websocketxContinuationWebSocketFrame<init>

Javadoc

Creates a new empty continuation frame.

Popular methods of ContinuationWebSocketFrame

  • content
  • isFinalFragment
  • fromText
    Sets the string for this frame
  • rsv
  • text
    Returns the text data in this frame

Popular in Java

  • Updating database using SQL prepared statement
  • getSystemService (Context)
  • addToBackStack (FragmentTransaction)
  • getSharedPreferences (Context)
  • Runnable (java.lang)
    Represents a command that can be executed. Often used to run code in a different Thread.
  • Selector (java.nio.channels)
    A controller for the selection of SelectableChannel objects. Selectable channels can be registered w
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • SortedSet (java.util)
    A Set that further provides a total ordering on its elements. The elements are ordered using their C
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
  • JButton (javax.swing)
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