Enum Class FrameDirection

java.lang.Object
java.lang.Enum<FrameDirection>
org.microproxy.frames.FrameDirection
All Implemented Interfaces:
Serializable, Comparable<FrameDirection>, Constable

public enum FrameDirection extends Enum<FrameDirection>
Where a frame is going, as a FrameInterceptor sees it. The proxy terminates HTTP/2 on each side, so a request travels as two sets of frames: the client's, seen FROM_CLIENT after the proxy decoded them, and the proxy's own towards the server, seen TO_SERVER before it encodes them. They are different frames: their stream ids, header blocks, DATA boundaries and connection-level frames are each side's own.
  • Enum Constant Details

    • FROM_CLIENT

      public static final FrameDirection FROM_CLIENT
      Received from the client, after decoding and before the proxy acts on it.
    • TO_CLIENT

      public static final FrameDirection TO_CLIENT
      Sent by the proxy to the client, before encoding.
    • FROM_SERVER

      public static final FrameDirection FROM_SERVER
      Received from a server, after decoding and before the proxy acts on it.
    • TO_SERVER

      public static final FrameDirection TO_SERVER
      Sent by the proxy to a server, before encoding.
  • Method Details

    • values

      public static FrameDirection[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static FrameDirection valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • inbound

      public boolean inbound()
      Whether the proxy received the frame (FROM_CLIENT, FROM_SERVER) rather than being about to send it.
      Returns:
      true for frames the proxy received
    • clientSide

      public boolean clientSide()
      Whether the frame travels between the proxy and the client (FROM_CLIENT, TO_CLIENT) rather than a server.
      Returns:
      true for the client side