public class Proxy extends Object implements ConnectionMonitor, Runnable
| Modifier and Type | Field and Description |
|---|---|
protected Vector |
connections
The vector of active connections.
|
protected ServerSocket |
mainSocket
The socket used for listening for client requests.
|
| Constructor and Description |
|---|
Proxy(int portNumber)
Instantiates a new FreeHost3270 Proxy with no encrption
|
Proxy(int portNumber,
boolean encryption)
Instantiates a new FreeHost3270 Proxy.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addConnection(Connection c)
Adds a Connection object to the connections Vector.
|
void |
attemptingConnection(Connection c)
Empty method.
|
void |
connectionError(Connection c,
String errMsg)
Reports connection error on the proxy log with
SEVERE
rating. |
static void |
main(String[] args) |
void |
removeConnection(Connection c)
Removes a Connection object from the connections Vector.
|
void |
run()
Starts the thread.
|
protected ServerSocket mainSocket
protected Vector connections
public Proxy(int portNumber,
boolean encryption)
throws IOException
portNumber - integer representing the port on which to listen for clients.encryption - default encryption on or off(t/f).IOException - if we can't open the portpublic Proxy(int portNumber)
throws IOException
portNumber - integer representing the port on which to listen for clients.IOException - if we can't open the portpublic void addConnection(Connection c)
addConnection in interface ConnectionMonitorc - The connection object to add.public void attemptingConnection(Connection c)
attemptingConnection in interface ConnectionMonitorc - DOCUMENT ME!public void connectionError(Connection c, String errMsg)
SEVERE
rating.connectionError in interface ConnectionMonitorc - DOCUMENT ME!errMsg - DOCUMENT ME!public void removeConnection(Connection c)
removeConnection in interface ConnectionMonitorc - The connection object to remove.public void run()
public static void main(String[] args) throws IOException
IOExceptionCopyright © 2013. All Rights Reserved.