com.ibm.dse.services.landp
Class DeviceStatus
java.lang.Object
|
+--com.ibm.dse.services.landp.DeviceStatus
- public class DeviceStatus
- extends java.lang.Object
This class encapsulates a device status (closed, open, reading or writing), so that
its getter and setter are both synchronized. This way, there is no possibility of
any conflict when the status is changed concurrently. For example, when a secondary
thread is in charge of waiting for a LANDP read event and the user thread cancels
the read request.
Method Summary |
int |
get()
Synchronized status getter. |
java.lang.String |
toString()
Returns a string with a text representation of the status value. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
CLOSED
public static final int CLOSED
OPEN
public static final int OPEN
READING
public static final int READING
WRITING
public static final int WRITING
get
public int get()
- Synchronized status getter.
- Returns:
- int the device status value.
toString
public java.lang.String toString()
- Returns a string with a text representation of the status value.
- Overrides:
- toString in class java.lang.Object
- Returns:
- the representation of the status value.