Class FullFlowContext

java.lang.Object
org.microproxy.FlowContext
org.microproxy.FullFlowContext

public class FullFlowContext extends FlowContext
A FlowContext that also knows the server side of the flow.
  • Constructor Details

    • FullFlowContext

      public FullFlowContext(FlowContext clientContext, String serverHostAndPort, ChainedProxy chainedProxy, InetSocketAddress remoteAddress)
      Creates a server-side view of a client exchange.
      Parameters:
      clientContext - the client connection or exchange context
      serverHostAndPort - the requested server host and port
      chainedProxy - the upstream proxy in use, or null for direct routing
      remoteAddress - the connected server or upstream proxy address
  • Method Details

    • getClientContext

      public FlowContext getClientContext()
      Returns the client-side context this server-side view was made from.
      Returns:
      the client-side context this server-side view was made from
    • getServerHostAndPort

      public String getServerHostAndPort()
      Returns the host:port the client asked for.
      Returns:
      the host:port the client asked for
    • getChainedProxy

      public ChainedProxy getChainedProxy()
      Returns the upstream proxy in use, or null for a direct connection.
      Returns:
      the upstream proxy in use, or null for a direct connection
    • getRemoteAddress

      public InetSocketAddress getRemoteAddress()
      Returns the address the proxy is connected to: the server, or the chained proxy.
      Returns:
      the address the proxy is connected to: the server, or the chained proxy