Class FrameCaptureExtension

java.lang.Object
org.eclipse.jetty.util.component.AbstractLifeCycle
org.eclipse.jetty.websocket.common.extensions.AbstractExtension
org.eclipse.jetty.websocket.common.extensions.FrameCaptureExtension
All Implemented Interfaces:
org.eclipse.jetty.util.component.LifeCycle, Extension, IncomingFrames, OutgoingFrames

public class FrameCaptureExtension extends AbstractExtension
  • Field Details

    • LOG

      private static final org.eclipse.jetty.util.log.Logger LOG
    • BUFSIZE

      private static final int BUFSIZE
      See Also:
    • generator

      private Generator generator
    • outputDir

      private Path outputDir
    • prefix

      private String prefix
    • incomingFramesPath

      private Path incomingFramesPath
    • outgoingFramesPath

      private Path outgoingFramesPath
    • incomingCount

      private AtomicInteger incomingCount
    • outgoingCount

      private AtomicInteger outgoingCount
    • incomingChannel

      private SeekableByteChannel incomingChannel
    • outgoingChannel

      private SeekableByteChannel outgoingChannel
  • Constructor Details

    • FrameCaptureExtension

      public FrameCaptureExtension()
  • Method Details

    • getName

      public String getName()
      Description copied from interface: Extension
      The Sec-WebSocket-Extensions name for this extension.

      Also known as the extension-token per Section 9.1. Negotiating Extensions.

      Specified by:
      getName in interface Extension
      Overrides:
      getName in class AbstractExtension
      Returns:
      the name of the extension
    • incomingFrame

      public void incomingFrame(Frame frame)
      Description copied from interface: IncomingFrames
      Process the incoming frame.

      Note: if you need to hang onto any information from the frame, be sure to copy it, as the information contained in the Frame will be released and/or reused by the implementation.

      Parameters:
      frame - the frame to process
    • outgoingFrame

      public void outgoingFrame(Frame frame, WriteCallback callback, BatchMode batchMode)
      Description copied from interface: OutgoingFrames
      A frame, and optional callback, intended for the network layer.

      Note: the frame can undergo many transformations in the various layers and extensions present in the implementation.

      If you are implementing a mutation, you are obliged to handle the incoming WriteCallback appropriately.

      Parameters:
      frame - the frame to eventually write to the network layer.
      callback - the callback to notify when the frame is written.
      batchMode - the batch mode requested by the sender.
    • saveFrame

      private void saveFrame(Frame frame, boolean outgoing)
    • setConfig

      public void setConfig(ExtensionConfig config)
      Overrides:
      setConfig in class AbstractExtension