gumbo.net
Class ProxyWindow
java.lang.Object
|
+--gumbo.util.AbstractDisposable
|
+--gumbo.app.MainWindow
|
+--gumbo.net.NetWindow
|
+--gumbo.net.ProxyWindow
- All Implemented Interfaces:
- Disposable, NetThreadListener
- public class ProxyWindow
- extends NetWindow
- implements NetThreadListener
A NetFrame for a proxy server application, with default actions and status.
Separate client and server threads are used, the former for talking to the
remote server and the latter for talking to the remote client.
Thread status is obtained through a thread listener and reported on the
status line.
- Version:
- $Revision: 1.8 $
- Author:
- Jon Barrilleaux (jonb@jmbaai.com) of JMB and Associates Inc.
Method Summary |
protected void |
handleEvent(NetThread thread,
java.lang.String msg)
|
void |
socketConnect(NetThread thread,
java.lang.String msg)
Called when a socket connection is made (to the server if a client
thread, and to a client if a server thread). |
void |
socketDisconnect(NetThread thread,
java.lang.String msg)
Called when a socket connection is broken (to the server if a client
thread, and to a client if a server thread). |
void |
socketFailure(NetThread thread,
java.lang.String msg)
Called when socket connection (client) or listen (server) attempt failed. |
void |
threadDone(NetThread thread,
java.lang.String msg)
Called when the thread (client or server) is done. |
void |
threadReady(NetThread thread,
java.lang.String msg)
Called when the thread is ready for socket connection (i.e. |
Methods inherited from class gumbo.app.MainWindow |
getContentPane, getMenuBar, getStatusBar, getStatusText, getTitleText, getToolBar, getWindowGraphic, getWindowName, implDispose, initWindowGraphic, pack, setDefaultCloseOperation, setMainArea, setStatusText, setTitleText, setVisible, setWindowName, showProblemMessage, showProblemMessage |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ProxyWindow
public ProxyWindow(javax.swing.JFrame window,
ClientThread client,
ServerThread server)
- Parameters:
window
- The delegate window. Never null.client
- The client thread associated this frame. Never null.server
- The server thread associated this frame. Never null.
The app name is taken from this thread, which is presumably the same as
that for the client thread.
handleEvent
protected void handleEvent(NetThread thread,
java.lang.String msg)
socketConnect
public void socketConnect(NetThread thread,
java.lang.String msg)
- Description copied from interface:
NetThreadListener
- Called when a socket connection is made (to the server if a client
thread, and to a client if a server thread).
- Specified by:
socketConnect
in interface NetThreadListener
- Parameters:
thread
- The host thread. Never null.msg
- Text message describing the event. Null if none.
socketDisconnect
public void socketDisconnect(NetThread thread,
java.lang.String msg)
- Description copied from interface:
NetThreadListener
- Called when a socket connection is broken (to the server if a client
thread, and to a client if a server thread).
- Specified by:
socketDisconnect
in interface NetThreadListener
- Parameters:
thread
- The host thread. Never null.msg
- Text message describing the event. Null if none.
socketFailure
public void socketFailure(NetThread thread,
java.lang.String msg)
- Description copied from interface:
NetThreadListener
- Called when socket connection (client) or listen (server) attempt failed.
- Specified by:
socketFailure
in interface NetThreadListener
- Parameters:
thread
- The host thread. Never null.msg
- Text message describing the event. Null if none.
present. Null if none.
threadReady
public void threadReady(NetThread thread,
java.lang.String msg)
- Description copied from interface:
NetThreadListener
- Called when the thread is ready for socket connection (i.e.
client or server connect loop is beginning).
- Specified by:
threadReady
in interface NetThreadListener
- Parameters:
thread
- The host thread. Never null.msg
- Text message describing the event. Null if none.
threadDone
public void threadDone(NetThread thread,
java.lang.String msg)
- Description copied from interface:
NetThreadListener
- Called when the thread (client or server) is done.
- Specified by:
threadDone
in interface NetThreadListener
- Parameters:
thread
- The host thread. Never null.msg
- Text message describing the event. Null if none.