|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ace.moab.api.connect.LocalConnection
public class LocalConnection
Provides a local connection to an instance of Moab running locally (the same machine). As with all MoabConnection objects, this class provides a way to execute commands and return the results.
IMoabConnection
Constructor Summary | |
---|---|
LocalConnection()
Creates a connection with the local machine. |
Method Summary | |
---|---|
MoabInputStream |
executeCommand(java.lang.String command,
boolean isMoabCommand)
Same as connect(command,
isMoabCommand, null) . |
MoabInputStream |
executeCommand(java.lang.String command,
boolean isMoabCommand,
org.apache.log4j.Level log4jLevel)
Runs a command on the local machine and returns back a reference to the intputStream which will output the results of that command. |
ConnectionType |
getConnectionType()
Returns the connection type of LOCAL. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LocalConnection()
Method Detail |
---|
public ConnectionType getConnectionType()
getConnectionType
in interface IMoabConnection
ConnectionType
public MoabInputStream executeCommand(java.lang.String command, boolean isMoabCommand) throws MoabCommunicationException
connect(command,
isMoabCommand, null)
.
executeCommand
in interface IMoabConnection
command
- the command to be run on the machine where Moab is runningisMoabCommand
- whether the command is a Moab command.
executeCommand(String, boolean, Level)
method.
MoabCommunicationException
- If the command is invalid or the connection has issues, a
MoabCommunciationException is thrown.public MoabInputStream executeCommand(java.lang.String command, boolean isMoabCommand, org.apache.log4j.Level log4jLevel) throws MoabCommunicationException
Runs a command on the local machine and returns 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 on the local machine
executeCommand
in interface IMoabConnection
command
- the command to be run on the local machineisMoabCommand
- whether the command is a Moab command. (i.e. 'showq')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
users the ability to prevent the logs from becoming
unnecessarily cluttered by frequently called Moab commands.
MoabCommunicationException
- If the command is invalid or the connection has issues, a
MoabCommunciationException is thrown.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |