All Packages Class Hierarchy This Package Previous Next Index
Class com.ibm.beans.samples.dips.trace.MsgDispServer
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Container
|
+----java.awt.Window
|
+----java.awt.Frame
|
+----com.ibm.beans.samples.dips.trace.MsgDispServer
- public class MsgDispServer
- extends Frame
- implements ActionListener
The MsgDispServer class is a server GUI
that enables MsgDispClient instances to log messages to it.
This utility serves as a centralized place where
Java beans can log messages.
To start the MsgDispServer GUI, enter
"java com.ibm.beans.samples.dips.trace.MsgDispServer".
-
MsgDispServer()
- Constructs a MsgDispServer instance.
-
actionPerformed(ActionEvent)
- Implements the functions behind
the menu options.
-
DisplayMessage(String)
- Adds the message to the GUI TextArea.
-
main(String[])
- Creates a ServerSocket instance and one socket for
each process that needs to display a message.
MsgDispServer
public MsgDispServer()
- Constructs a MsgDispServer instance.
actionPerformed
public void actionPerformed(ActionEvent evt)
- Implements the functions behind
the menu options. These options are New, Save, SaveAs, and Quit.
- Parameters:
- evt - The event.
DisplayMessage
public static synchronized void DisplayMessage(String myString)
- Adds the message to the GUI TextArea.
- Parameters:
- myString - The message to display in the GUI TextArea.
main
public static void main(String args[])
- Creates a ServerSocket instance and one socket for
each process that needs to display a message.
(Generally a client wants to display a message
because they create a socket attached to the same
port.) The accept() method remains blocked until
a new client attaches to the socket.
- Parameters:
- args[] - The arguments passed to the MsgDispServer GUI
(the first argument, if present, specifies the port number).
All Packages Class Hierarchy This Package Previous Next Index