THost
- The type of object held by the "hosts" drop lists.TVisitor
- The type of the object held by the "visitor" drop lists.public interface IModelAdapter<THost,TVisitor>
Modifier and Type | Method and Description |
---|---|
void |
addCmd(TVisitor visitor,
java.lang.String id,
java.lang.String resultStr)
Add or replace a command in the given visitor with a new command for the given host id
with the given result string.
|
THost |
makeHost(java.lang.String id)
Returns a new host object with the given id
|
TVisitor |
makeVisitor(java.lang.String name)
Returns a new visitor with the given name (shows when its toString() method is called).
|
java.lang.Object |
run(THost host,
TVisitor visitor)
Return the results of having the given host execute the given visitor with no input parameters.
|
THost makeHost(java.lang.String id)
id
- The id of the new hostjava.lang.Object run(THost host, TVisitor visitor)
host
- The host to usevisitor
- The visitor to use.TVisitor makeVisitor(java.lang.String name)
name
- The name of the visitorvoid addCmd(TVisitor visitor, java.lang.String id, java.lang.String resultStr)
id
- The id of the host corresponding to the new commandresultStr
- The String that is returned when that visitor is run on a host with the given id.visitor
- The visitor to modify