Package com.slave.application.gui
Class TerminalGUI
java.lang.Object
com.slave.application.gui.TerminalGUI
Terminal Graphical User Interface Class
This class implements the simple user interface running in a terminal environment.
- Version:
- 1.0
- Author:
- Bruno Guiomar
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Stringprivate intprivate Stringprivate intprivate Scannerprivate Stringprivate SlaveServiceManager -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidInitiates the registration process in the coordinatorprivate voidDisplays the about menu graphicsprivate String[]showAddressInput(String agent) Displays the network address input graphicsprivate voidDisplays the help menu graphicsprivate voidShows the identification input graphicsprivate intShows the actions menu graphicsvoidDisplays the start menu graphics
-
Field Details
-
scanner
-
slaveServiceManager
-
localAddress
-
localPort
private int localPort -
slaveID
-
coordinatorAddress
-
coordinatorPort
private int coordinatorPort
-
-
Constructor Details
-
TerminalGUI
Class Constructor- Parameters:
slaveServiceManager- Slave service manager instance
-
-
Method Details
-
showStartMenu
public void showStartMenu()Displays the start menu graphics -
connectCoordinator
private void connectCoordinator()Initiates the registration process in the coordinator -
showHelpMenu
private void showHelpMenu()Displays the help menu graphics -
showAboutMenu
private void showAboutMenu()Displays the about menu graphics -
showAddressInput
Displays the network address input graphics- Parameters:
agent- Agent which the address belongs- Returns:
- Agent address in the form of {ip_address, port}
-
showIDInput
private void showIDInput()Shows the identification input graphics -
showMenu
Shows the actions menu graphics- Parameters:
content- Menu textual contentlimit- max input value- Returns:
- Selected option
-