jreceiver.common.callback.rec
Class DeviceStatusRec
java.lang.Object
|
+--jreceiver.common.rec.BaseRec
|
+--jreceiver.common.rec.driver.DeviceRec
|
+--jreceiver.common.callback.rec.DeviceStatusRec
- All Implemented Interfaces:
- Device, DeviceStatus, Hashable, Rec
- public class DeviceStatusRec
- extends DeviceRec
- implements DeviceStatus
Details for a device provided by a driver.
- Version:
- $Revision: 1.5 $ $Date: 2002/07/20 01:40:43 $
- Author:
- Reed Esau
Constructor Summary |
DeviceStatusRec(java.util.Hashtable hash)
ctor - construct from a hashtable, usually retrieved via XML-RPC |
DeviceStatusRec(int device_id,
int driver_id,
java.lang.String address,
long timestamp,
java.lang.String mac_address,
int play_state,
Source source,
long timecode)
ctor |
Method Summary |
java.lang.String |
getMacAddress()
This address is a unique network card address by which to
identify the receiver. |
int |
getPlayState()
The play state is one of the play state constants |
java.lang.String |
getPlayStateMessage()
The play_state is a message_id (you'll have to translate via message.properties) |
Source |
getSource()
This corresponds to a media source. |
long |
getTimecode()
This is the approximate number of MILLISECONDS into the current song. |
long |
getTimecodeInSeconds()
This is the approximate number of SECONDS into the current song. |
static java.util.Vector |
reconstitute(java.util.Vector vector)
Reconstitute each DeviceStatusRec object that appears as a hash
in the list. |
java.util.Hashtable |
toHash()
Store the object as a hash suitable for
transport over an XML-RPC connection or similar. |
java.lang.String |
toString()
Returns a string representation of the event. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
timecode
protected long timecode
mac_address
protected java.lang.String mac_address
play_state
protected int play_state
source
protected Source source
DeviceStatusRec
public DeviceStatusRec(int device_id,
int driver_id,
java.lang.String address,
long timestamp,
java.lang.String mac_address,
int play_state,
Source source,
long timecode)
- ctor
DeviceStatusRec
public DeviceStatusRec(java.util.Hashtable hash)
throws RecException
- ctor - construct from a hashtable, usually retrieved via XML-RPC
toHash
public java.util.Hashtable toHash()
- Store the object as a hash suitable for
transport over an XML-RPC connection or similar.
Use DeviceStatusRec(Hashtable)
to transform the data
back into an object of this type.
- Specified by:
toHash
in interface Hashable
- Overrides:
toHash
in class DeviceRec
- Returns:
-
toString
public java.lang.String toString()
- Returns a string representation of the event.
- Specified by:
toString
in interface Hashable
- Overrides:
toString
in class DeviceRec
- Returns:
- a string representation of the object.
getTimecode
public long getTimecode()
- This is the approximate number of MILLISECONDS into the current song.
- Specified by:
getTimecode
in interface DeviceStatus
getTimecodeInSeconds
public long getTimecodeInSeconds()
- This is the approximate number of SECONDS into the current song.
- Specified by:
getTimecodeInSeconds
in interface DeviceStatus
getMacAddress
public java.lang.String getMacAddress()
- This address is a unique network card address by which to
identify the receiver.
- Specified by:
getMacAddress
in interface DeviceStatus
getPlayState
public int getPlayState()
- The play state is one of the play state constants
- Specified by:
getPlayState
in interface DeviceStatus
getPlayStateMessage
public java.lang.String getPlayStateMessage()
- The play_state is a message_id (you'll have to translate via message.properties)
getSource
public Source getSource()
- This corresponds to a media source. If src_id!=0 it refers to a source in the JRec database.
- Specified by:
getSource
in interface DeviceStatus
reconstitute
public static java.util.Vector reconstitute(java.util.Vector vector)
throws RecException
- Reconstitute each DeviceStatusRec object that appears as a hash
in the list.
Copyright © 2001-2002 Reed Esau, All Rights Reserved.