Package org.microproxy.frames
Enum Class FrameDirection
- All Implemented Interfaces:
Serializable,Comparable<FrameDirection>,Constable
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.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionReceived from the client, after decoding and before the proxy acts on it.Received from a server, after decoding and before the proxy acts on it.Sent by the proxy to the client, before encoding.Sent by the proxy to a server, before encoding. -
Method Summary
Modifier and TypeMethodDescriptionbooleanWhether the frame travels between the proxy and the client (FROM_CLIENT,TO_CLIENT) rather than a server.booleaninbound()Whether the proxy received the frame (FROM_CLIENT,FROM_SERVER) rather than being about to send it.static FrameDirectionReturns the enum constant of this class with the specified name.static FrameDirection[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
FROM_CLIENT
Received from the client, after decoding and before the proxy acts on it. -
TO_CLIENT
Sent by the proxy to the client, before encoding. -
FROM_SERVER
Received from a server, after decoding and before the proxy acts on it. -
TO_SERVER
Sent by the proxy to a server, before encoding.
-
-
Method Details
-
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
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 nameNullPointerException- 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
-