com.ace.moab.api.connect
Interface IMoabConnection

All Known Implementing Classes:
LocalConnection, SSHConnection

public interface IMoabConnection

Provides a connection to an instance of Moab. All MoabConnections must be able to execute commands on the machine where Moab is running and return the results of executing these commands.

Author:
Scott Brown

Method Summary
 MoabInputStream executeCommand(java.lang.String command, boolean isMoabCommand)
           Runs a command on the machine where Moab is running and return back a reference to the intputStream which will output the results of that command.
 MoabInputStream executeCommand(java.lang.String command, boolean isMoabCommand, org.apache.log4j.Level log4jLevel)
           Runs a command on the machine where Moab is running and return back a reference to the intputStream which will output the results of that command.
 ConnectionType getConnectionType()
          Returns the current connection type being used to communicate with Moab.
 

Method Detail

getConnectionType

ConnectionType getConnectionType()
Returns the current connection type being used to communicate with Moab.

Returns:
the type of connection MCM is using.

executeCommand

MoabInputStream executeCommand(java.lang.String command,
                               boolean isMoabCommand)
                               throws MoabCommunicationException

Runs a command on the machine where Moab is running and return back a reference to the intputStream which will output the results of that command. This can be a Moab command, or any other command that can be run over the connection.

Parameters:
command - the command to be run on the machine where Moab is running
isMoabCommand - whether the command is a Moab command.
Returns:
the inputStream which will contain the results of the command.
Throws:
MoabCommunicationException - If the command is invalid or the connection has issues, a MoabCommunciationException is thrown.

executeCommand

MoabInputStream executeCommand(java.lang.String command,
                               boolean isMoabCommand,
                               org.apache.log4j.Level log4jLevel)
                               throws MoabCommunicationException

Runs a command on the machine where Moab is running and return back a reference to the intputStream which will output the results of that command. This can be a Moab command, or any other command that can be run over the connection.

Parameters:
command - the command to be run on the machine where Moab is running
isMoabCommand - whether the command is a Moab command.
log4jLevel - (can be null) the log4j level at which this Moab command and it's output should be written to the log file. This allows us to prevent the logs from becoming unnecessarily cluttered by frequently called Moab commands.
Returns:
the inputStream which will contain the results of the command.
Throws:
MoabCommunicationException - If the command is invalid or the connection has issues, a MoabCommunciationException is thrown.


Copyright © 2001-2009 Cluster Resources, Inc. All Rights Reserved.