|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface CommandManager
The CommandManager interface is used to execute CLI commands and query information from the Master Server.
Method Summary | |
---|---|
void |
clearSession()
Clears the current SessionID so that a subsequent call to this CommandManager will be unauthenticated. |
void |
close()
Shutdown connection to the MS. |
java.lang.Object |
convert(java.lang.String inStringToConvert,
java.lang.Class desiredClass)
Acquire an SPS Object based on the CLI string synatx specified in the "CLI Input Types" documentation Example: HostID hostID = (HostID) manager.convert("NM:myhost", HostID.class); This method uses the current SessionID as returned by getSessionID() for authentication to the Master Server. |
TypedList |
createEmptyList(java.lang.Class inPublicIfaceClass)
Create an empty TypedList of the desired type Example: HostIDSet hostSet = (HostIDSet) manager.createEmptySet(HostIDSet.class); |
TypedSet |
createEmptySet(java.lang.Class inPublicIfaceClass)
Create an empty TypedSet of the desired type Example: HostIDSet hostSet = (HostIDSet) manager.createEmptySet(HostIDSet.class); |
java.lang.Object |
execute(java.lang.String command,
java.util.Map arguments)
Execute CLI commands on the MasterServer. |
SessionID |
getSessionID()
Gets the current SessionID associated with this CommandManager. |
java.lang.String |
getVersionString()
Returns the version of the CLUI that the CommandManager is connected to. |
void |
setLocalOutputStream(java.io.OutputStream inOutputStream)
Associates the specified output stream with the current thread such that any commands executed which write to an output stream will use the specified stream for such output. |
void |
setSessionID(SessionID inSessionID)
Sets the Session for this CommandManager to the specified SessionID. |
Method Detail |
---|
java.lang.Object execute(java.lang.String command, java.util.Map arguments) throws ClientException
command
- The CLI command to executearguments
- The collection of arguments to pass to the command, or null if there are no arguments.
AuthenticationException
- the user could not be authenticated to the Master Server
NetworkException
- the Master Server could not be reached
CommandException
- The command was not found, did not have the correct arguments, or failed during execution
ConversionException
- There was a problem converting some of the supplied arguments or the result
ClientException
java.lang.Object convert(java.lang.String inStringToConvert, java.lang.Class desiredClass) throws ClientException
inStringToConvert
- The string representation of the desired objectdesiredClass
- The Class to convert to
ClientException
- if the user could not be authenticated to the Master Server, or
the Master Server could not be reached, or an unexpected error occurs.TypedList createEmptyList(java.lang.Class inPublicIfaceClass) throws ClientException
inPublicIfaceClass
- A class of type TypedSet
IllegalArgumentsException
- if the typedSetClass argument does not extend TypedSet or is null
ClientException
- if an error occurs.TypedSet createEmptySet(java.lang.Class inPublicIfaceClass) throws ClientException
inPublicIfaceClass
- A class of type TypedSet
IllegalArgumentsException
- if the typedSetClass argument does not extend TypedSet or is null
ClientException
- if an error occurs.SessionID getSessionID() throws ClientException
ClientException
- if an error occurs.void setSessionID(SessionID inSessionID) throws ClientException
inSessionID
- the id of the session to use for this CommandManager
ClientException
- if an error occurs.void clearSession() throws ClientException
ClientException
- if an error occurs.void setLocalOutputStream(java.io.OutputStream inOutputStream)
inOutputStream
- OutputStream to be used in the local thread
for any commands which write output to a stream. May be null,
in which case command stream output will be discarded.java.lang.String getVersionString()
void close() throws ClientException
ClientException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |