|
UC Berkeley Group for User Interface Research Updated November 17, 2000 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.lang.Thread | +--edu.berkeley.guir.lib.net.GenericServer | +--edu.berkeley.guir.lib.net.Proxy
A non-threaded generic proxy between a client and a server.
The client thinks the Proxy is the server. The server thinks the Proxy is the client.
When the client sends data to the Proxy, the Proxy reads in the bytes, filters the input, and forwards the filtered bytes to the server.
When the server sends data to the Proxy, the Proxy reads in the bytes, filters the input (through a different filter), and forwards the filtered bytes to the client.
------- proxyport ---> -- dstaddr dstport --> Client Proxy Server <--------------------- <---------------------
This software is distributed under the Berkeley Software License.
Revisions: - GUIRLib-v1.2-1.0.0, Jul 22 2000, JH Created class - GUIRLib-v1.3-1.0.0, Aug 11 2000, JH Touched for GUIRLib release - GUIRLib-v1.4-1.0.0, Aug 31 2000, JH Touched for GUIRLib release
Fields inherited from class java.lang.Thread |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Fields inherited from interface edu.berkeley.guir.lib.net.NetConstants |
ANYPORT, DEFAULT_TIMEOUT, NO_TIMEOUT |
Constructor Summary | |
protected |
Proxy()
Just in case this class ever needs to be subclassed. |
|
Proxy(int proxyport,
InetAddress dstaddr,
int dstport)
Create a Proxy listening on the specified port with the default timeout. |
|
Proxy(int proxyport,
InetAddress dstaddr,
int dstport,
int timeout)
Create a Proxy listening on the specified port with the specified timeout. |
Method Summary | |
static void |
main(String[] argv)
|
void |
setDestinationAddress(InetAddress addr)
Set the address the proxy will connect to. |
void |
setDestinationPort(int port)
Set the port the proxy will connect to. |
void |
setInputFilter(Filter f)
Set the filter for input from client to server. |
void |
setOutputFilter(Filter f)
Set the filter for output from server to client. |
Methods inherited from class edu.berkeley.guir.lib.net.GenericServer |
close, run, setPlugin, setServerPort, setTimeout |
Methods inherited from class java.lang.Thread |
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
protected Proxy()
public Proxy(int proxyport, InetAddress dstaddr, int dstport)
proxyport
- is the port number to listen on.dstaddr
- is the destination address to connect to.dstport
- is the destination port to connect to.public Proxy(int proxyport, InetAddress dstaddr, int dstport, int timeout)
proxyport
- is the port number to listen on.dstaddr
- is the destination address to connect to.dstport
- is the destination port to connect to.timeout
- is the timeout for the system.Method Detail |
public void setInputFilter(Filter f)
f
- is the filter to use.public void setOutputFilter(Filter f)
f
- is the filter to use.public void setDestinationPort(int port)
port
- is the destination port to connect to.public void setDestinationAddress(InetAddress addr)
addr
- is the destination address to connect to.public static void main(String[] argv) throws Exception
|
Copyright Information | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |