|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.peace_tools.core.ServerConnectionTester
public class ServerConnectionTester
Field Summary | |
---|---|
private java.lang.Thread |
connThread
The background thread that is attempting to connect to the remote server. |
private javax.swing.JDialog |
dialog
The dialog that is being used to display some message and progress information to the user. |
private static java.lang.String |
ERROR_MSG
An error message that is formatted (to fill in server name) and displayed to the user informing him about the problem that occurred when attempting to connect to the server. |
private static java.lang.String |
INFO_MSG
A simple message that is formatted (to fill in server name) and displayed to the user informing him of the progress being made. |
private javax.swing.JProgressBar |
progressBar
The roving (indeterminate mode) progress bar to illustrate that some work is being done (and to ensure that the GUI is not hanging). |
private static java.lang.String |
PURPOSE_MSG
A simple message that is formatted (to fill in server name) and set as the purpose for the session/connection. |
private Server |
server
The server to which this class is attempting to establish is a connection to verify that the GUI can actually connect to the server. |
Constructor Summary | |
---|---|
ServerConnectionTester(MainFrame mainFrame,
Server server)
The constructor. |
Method Summary | |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent event)
Handle user clicking the "Interrupt" button. |
private javax.swing.JDialog |
createDialog(javax.swing.JFrame parent)
Helper method to create the dialog to be displayed. |
void |
run()
The background thread method that performs the connection test. |
void |
start()
Starts the background thread to test connection. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private final Server server
private javax.swing.JProgressBar progressBar
private java.lang.Thread connThread
private javax.swing.JDialog dialog
private static final java.lang.String INFO_MSG
private static final java.lang.String ERROR_MSG
private static final java.lang.String PURPOSE_MSG
Constructor Detail |
---|
public ServerConnectionTester(MainFrame mainFrame, Server server)
mainFrame
- The main frame that logically owns this
class.server
- The server with which a connection is to be
established.Method Detail |
---|
public void start()
public void run()
run
in interface java.lang.Runnable
private javax.swing.JDialog createDialog(javax.swing.JFrame parent)
parent
- The frame that logically owns this dialog.
public void actionPerformed(java.awt.event.ActionEvent event)
actionPerformed
in interface java.awt.event.ActionListener
event
- The action event associated with the button click.
This event is not really used.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |