|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object | +--com.dallaway.sloppy.SloppyServer
Main wrapper class for starting the proxy.
Each request creates a new SlowProxyThread to process the request.
Latest version of sloppy at http://www.dallaway.com/sloppy. See RELEASE field for this version number.
The proxy can be configured via a properties file. See default.properties for a sample.
main(java.lang.String[])| Field Summary | |
protected int |
bps
Bytes per second |
static int |
DEFAULT_LISTEN_PORT
The port we listen on by default |
static java.lang.String |
DEFAULT_SEND_HOST
The IP address we proxy to by default |
static int |
DEFAULT_SEND_PORT
The port we proxy to by default |
protected int |
listen_port
|
protected Log |
log
For logging events, errors and so on |
static java.lang.String |
RELEASE
Version of this proxy |
protected boolean |
running
Is this proxy running? |
protected java.lang.String |
send_host
|
protected int |
send_port
|
protected boolean |
start_gui
|
| Constructor Summary | |
SloppyServer()
Create a new proxy server with default settings |
|
| Method Summary | |
void |
go()
Start the proxy service |
static void |
main(java.lang.String[] args)
Start a proxy server Usage: Sloppy [+|-gui] [configuration.properties] +gui means start with a graphical user interface (not yet implemented; will be default) -gui means do not start a GUI To override the default settings supply a configuration file. |
void |
setBPS(int bps)
Set the bytes per second to simulate. |
void |
setLog(Log log)
Set the log instance to use for all events and errors |
void |
setPort(int port)
Set the port for listening on |
void |
setServerHost(java.lang.String host)
Set the host/ip where the real server runs |
void |
setServerPort(int port)
Set the port where the real server runs |
void |
startGUI(boolean do_start)
Decide if we do or do not start the GUI from main() |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| Field Detail |
public static java.lang.String RELEASE
public static int DEFAULT_LISTEN_PORT
public static int DEFAULT_SEND_PORT
public static java.lang.String DEFAULT_SEND_HOST
protected int listen_port
protected int send_port
protected java.lang.String send_host
protected int bps
protected Log log
protected boolean running
protected boolean start_gui
| Constructor Detail |
public SloppyServer()
| Method Detail |
public void setLog(Log log)
logger - The instance of a Log for recording eventspublic void setBPS(int bps)
bps - Bytes per secondpublic void setPort(int port)
port - The port the proxy runs on. Default is 7569public void setServerPort(int port)
port - The port to proxy to. Default is 80public void startGUI(boolean do_start)
do_start - True means the gui will start (default)public void setServerHost(java.lang.String host)
host - The IP where the real sever runs. Default 127.0.0.1
public void go()
throws java.io.IOException
public static void main(java.lang.String[] args)
throws java.io.IOException,
java.lang.NumberFormatException
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||