zVMComandLineController

Purpose: Provides an interface that allows for execution of z/VM commands and retrieval of output due to the execution of commands.

Properties:

TelnetController myTelnetController

TelnetController used by the zVMCommanlineController.

String username

Username that will be used for the logon.

String password

Password that will be used for the logon.

String by

Represents the guest name we should log in by. Example: “L MAINT BY MUSER”. Only used if the login(1,2,3) method is used to log on to z/VM.

Public Methods:

zVMCommandLineController(String host)

Uses port 23 with specified host.

zVMCommandLineController(String host, int myPort)

Uses specified port with specified host.

void login(String myUname, String myPassword)

Sends the login command to z/VM with the given username and

password.

void login(String myUname, String myPassword, String myBy)

Sends the login command to z/VM with the given username and

password and by string.

void logout()

Sends the logout command to z/VM.

void disconnect()

Sends the disconnect command to z/VM.

String sendCommand(String command)

Will send a command and return its output. This makes it

impossible for two commands to be executed simultaneously and

having the output from both commands mixed together.

String getMessage()

Returns a message from the stream. The function will only return when a full message has been read, in which case the message will be returned.

Private Methods:

Notes:

Login HERE is being ignored for the time being as we see no urgent need for it.

2004-02-29T11:11:30