|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.networkupstools.jnut.Command
public class Command
Class representing a command of a device.
It can be used to retrieve description and execute commands. A Command object can be retrieved from Device instance and can not be constructed directly.
Constructor Summary | |
---|---|
protected |
Command(java.lang.String name,
Device device)
Internally create a command. |
Method Summary | |
---|---|
void |
execute()
Execute the instant command. |
java.lang.String |
getDescription()
Retrieve the command description from UPSD and store it in cache. |
Device |
getDevice()
Return the device to which the command can be executed. |
java.lang.String |
getName()
Return the command name. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected Command(java.lang.String name, Device device)
name
- Command name.device
- Device to which the command is attached.Method Detail |
---|
public Device getDevice()
public java.lang.String getName()
public java.lang.String getDescription() throws java.io.IOException, NutException
java.io.IOException
NutException
public void execute() throws java.io.IOException, NutException
java.io.IOException
NutException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |