org.browsermob.proxy.http
Class SimulatedSocketFactory

java.lang.Object
  extended by org.browsermob.proxy.http.SimulatedSocketFactory
All Implemented Interfaces:
org.apache.http.conn.scheme.SocketFactory

public class SimulatedSocketFactory
extends Object
implements org.apache.http.conn.scheme.SocketFactory


Constructor Summary
SimulatedSocketFactory(org.apache.http.conn.scheme.HostNameResolver nameResolver)
           
 
Method Summary
 Socket connectSocket(Socket sock, String host, int port, InetAddress localAddress, int localPort, org.apache.http.params.HttpParams params)
           
 Socket createSocket()
           
 boolean isSecure(Socket sock)
          Checks whether a socket connection is secure.
 void setDownstreamKbps(long downstreamKbps)
           
 void setLatency(long latency)
           
 void setUpstreamKbps(long upstreamKbps)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimulatedSocketFactory

public SimulatedSocketFactory(org.apache.http.conn.scheme.HostNameResolver nameResolver)
Method Detail

createSocket

public Socket createSocket()
Specified by:
createSocket in interface org.apache.http.conn.scheme.SocketFactory

connectSocket

public Socket connectSocket(Socket sock,
                            String host,
                            int port,
                            InetAddress localAddress,
                            int localPort,
                            org.apache.http.params.HttpParams params)
                     throws IOException
Specified by:
connectSocket in interface org.apache.http.conn.scheme.SocketFactory
Throws:
IOException

isSecure

public final boolean isSecure(Socket sock)
                       throws IllegalArgumentException
Checks whether a socket connection is secure. This factory creates plain socket connections which are not considered secure.

Specified by:
isSecure in interface org.apache.http.conn.scheme.SocketFactory
Parameters:
sock - the connected socket
Returns:
false
Throws:
IllegalArgumentException - if the argument is invalid

setDownstreamKbps

public void setDownstreamKbps(long downstreamKbps)

setUpstreamKbps

public void setUpstreamKbps(long upstreamKbps)

setLatency

public void setLatency(long latency)


Copyright © 2011. All Rights Reserved.