Tabnine Logo
FrameType.from
Code IndexAdd Tabnine to your IDE (free)

How to use
from
method
in
org.eclipse.jetty.http2.frames.FrameType

Best Java code snippets using org.eclipse.jetty.http2.frames.FrameType.from (Showing top 6 results out of 315)

origin: jenkinsci/winstone

@Override
public String toString()
{
  return String.format("[%s|%d|%d|%d]", FrameType.from(getFrameType()), getLength(), flags, getStreamId());
}
origin: org.eclipse.jetty.http2/http2-common

@Override
public String toString()
{
  return String.format("[%s|%d|%d|%d]", FrameType.from(getFrameType()), getLength(), flags, getStreamId());
}
origin: org.eclipse.jetty.http2/http2-common

protected boolean parseBody(ByteBuffer buffer)
{
  int type = getFrameType();
  if (type < 0 || type >= bodyParsers.length)
  {
    // Unknown frame types must be ignored.
    if (LOG.isDebugEnabled())
      LOG.debug("Ignoring unknown frame type {}", Integer.toHexString(type));
    if (!unknownBodyParser.parse(buffer))
      return false;
    reset();
    return true;
  }
  BodyParser bodyParser = bodyParsers[type];
  if (headerParser.getLength() == 0)
  {
    bodyParser.emptyBody(buffer);
  }
  else
  {
    if (!bodyParser.parse(buffer))
      return false;
  }
  if (LOG.isDebugEnabled())
    LOG.debug("Parsed {} frame body from {}", FrameType.from(type), buffer);
  reset();
  return true;
}
origin: jenkinsci/winstone

protected boolean parseBody(ByteBuffer buffer)
{
  int type = getFrameType();
  if (type < 0 || type >= bodyParsers.length)
  {
    // Unknown frame types must be ignored.
    if (LOG.isDebugEnabled())
      LOG.debug("Ignoring unknown frame type {}", Integer.toHexString(type));
    if (!unknownBodyParser.parse(buffer))
      return false;
    reset();
    return true;
  }
  BodyParser bodyParser = bodyParsers[type];
  if (headerParser.getLength() == 0)
  {
    bodyParser.emptyBody(buffer);
  }
  else
  {
    if (!bodyParser.parse(buffer))
      return false;
  }
  if (LOG.isDebugEnabled())
    LOG.debug("Parsed {} frame body from {}", FrameType.from(type), buffer);
  reset();
  return true;
}
origin: org.eclipse.jetty.http2/http2-common

protected boolean parseHeader(ByteBuffer buffer)
{
  if (!headerParser.parse(buffer))
    return false;
  if (LOG.isDebugEnabled())
    LOG.debug("Parsed {} frame header from {}", headerParser, buffer);
  if (headerParser.getLength() > getMaxFrameLength())
    return connectionFailure(buffer, ErrorCode.FRAME_SIZE_ERROR, "invalid_frame_length");
  FrameType frameType = FrameType.from(getFrameType());
  if (continuation)
  {
    // SPEC: CONTINUATION frames must be consecutive.
    if (frameType != FrameType.CONTINUATION)
      return connectionFailure(buffer, ErrorCode.PROTOCOL_ERROR, "expected_continuation_frame");
    if (headerParser.hasFlag(Flags.END_HEADERS))
      continuation = false;
  }
  else
  {
    if (frameType == FrameType.HEADERS)
      continuation = !headerParser.hasFlag(Flags.END_HEADERS);
    else if (frameType == FrameType.CONTINUATION)
      return connectionFailure(buffer, ErrorCode.PROTOCOL_ERROR, "unexpected_continuation_frame");
  }
  state = State.BODY;
  return true;
}
origin: jenkinsci/winstone

protected boolean parseHeader(ByteBuffer buffer)
{
  if (!headerParser.parse(buffer))
    return false;
  if (LOG.isDebugEnabled())
    LOG.debug("Parsed {} frame header from {}", headerParser, buffer);
  if (headerParser.getLength() > getMaxFrameLength())
    return connectionFailure(buffer, ErrorCode.FRAME_SIZE_ERROR, "invalid_frame_length");
  FrameType frameType = FrameType.from(getFrameType());
  if (continuation)
  {
    // SPEC: CONTINUATION frames must be consecutive.
    if (frameType != FrameType.CONTINUATION)
      return connectionFailure(buffer, ErrorCode.PROTOCOL_ERROR, "expected_continuation_frame");
    if (headerParser.hasFlag(Flags.END_HEADERS))
      continuation = false;
  }
  else
  {
    if (frameType == FrameType.HEADERS)
      continuation = !headerParser.hasFlag(Flags.END_HEADERS);
    else if (frameType == FrameType.CONTINUATION)
      return connectionFailure(buffer, ErrorCode.PROTOCOL_ERROR, "unexpected_continuation_frame");
  }
  state = State.BODY;
  return true;
}
org.eclipse.jetty.http2.framesFrameTypefrom

Popular methods of FrameType

  • getType
  • values

Popular in Java

  • Creating JSON documents from java classes using gson
  • notifyDataSetChanged (ArrayAdapter)
  • onCreateOptionsMenu (Activity)
  • scheduleAtFixedRate (Timer)
  • RandomAccessFile (java.io)
    Allows reading from and writing to a file in a random-access manner. This is different from the uni-
  • System (java.lang)
    Provides access to system-related information and resources including standard input and output. Ena
  • URLEncoder (java.net)
    This class is used to encode a string using the format required by application/x-www-form-urlencoded
  • SecureRandom (java.security)
    This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
  • TreeMap (java.util)
    Walk the nodes of the tree left-to-right or right-to-left. Note that in descending iterations, next
  • LogFactory (org.apache.commons.logging)
    Factory for creating Log instances, with discovery and configuration features similar to that employ
  • Best IntelliJ 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