All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.littleshoot.proxy.FlowContext Maven / Gradle / Ivy

Go to download

LittleProxy is a high performance HTTP proxy written in Java and using the Netty networking framework.

There is a newer version: 1.1.2
Show newest version
package org.littleshoot.proxy;

import java.net.InetSocketAddress;

import javax.net.ssl.SSLEngine;
import javax.net.ssl.SSLSession;

import org.littleshoot.proxy.impl.ClientToProxyConnection;

/**
 * 

* Encapsulates contextual information for flow information that's being * reported to a {@link ActivityTracker}. *

*/ public class FlowContext { private final InetSocketAddress clientAddress; private final SSLSession clientSslSession; public FlowContext(ClientToProxyConnection clientConnection) { super(); this.clientAddress = clientConnection.getClientAddress(); SSLEngine sslEngine = clientConnection.getSslEngine(); this.clientSslSession = sslEngine != null ? sslEngine.getSession() : null; } /** * The address of the client. * * @return */ public InetSocketAddress getClientAddress() { return clientAddress; } /** * If using SSL, this returns the {@link SSLSession} on the client * connection. * * @return */ public SSLSession getClientSslSession() { return clientSslSession; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy