org.mbari.siam.distributed
Class PowerPolicy

java.lang.Object
  extended by org.mbari.siam.distributed.PowerPolicy
All Implemented Interfaces:
java.io.Serializable, Importable, Mnemonic

public class PowerPolicy
extends java.lang.Object
implements Mnemonic, java.io.Serializable

PowerPolicy specifies how power should be applied to a device or to the device's communication channel.

See Also:
Serialized Form

Field Summary
static PowerPolicy ALWAYS
          Apply power at startup and leave it on
static PowerPolicy NEVER
          Device is self-powered, no need to apply power
static PowerPolicy UNDEFINED
          This object is necessary so that we can invoke methods of the Mnemonic interface on it.
static PowerPolicy WHEN_SAMPLING
          Apply power when accessing device
 
Constructor Summary
PowerPolicy()
          Public no-argument constructor (needed to be able to parse from properties file with Reflection...)
 
Method Summary
 java.lang.Object fromString(java.lang.String string)
          Generate PowerPolicy object from mnemonic string.
 java.lang.String toString()
          Generate mnemonic string for this power policy.
 java.lang.String[] validValues()
          Return array of valid string values.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NEVER

public static PowerPolicy NEVER
Device is self-powered, no need to apply power


WHEN_SAMPLING

public static PowerPolicy WHEN_SAMPLING
Apply power when accessing device


ALWAYS

public static PowerPolicy ALWAYS
Apply power at startup and leave it on


UNDEFINED

public static PowerPolicy UNDEFINED
This object is necessary so that we can invoke methods of the Mnemonic interface on it.

Constructor Detail

PowerPolicy

public PowerPolicy()
Public no-argument constructor (needed to be able to parse from properties file with Reflection...)

Method Detail

toString

public java.lang.String toString()
Generate mnemonic string for this power policy.

Overrides:
toString in class java.lang.Object

validValues

public java.lang.String[] validValues()
Return array of valid string values.

Specified by:
validValues in interface Mnemonic

fromString

public java.lang.Object fromString(java.lang.String string)
                            throws InvalidPropertyException
Generate PowerPolicy object from mnemonic string.

Specified by:
fromString in interface Importable
Throws:
InvalidPropertyException


Copyright © 2003 MBARI.

The Monterey Bay Aquarium Research Institute (MBARI) provides this documentation and code "as is", with no warranty, express or implied, of its quality or consistency. It is provided without support and without obligation on the part of MBARI to assist in its use, correction, modification, or enhancement.