jreceiver.common.rec.driver
Class CommandRec

java.lang.Object
  |
  +--jreceiver.common.rec.BaseRec
        |
        +--jreceiver.common.rec.driver.CommandRec
All Implemented Interfaces:
Command, Hashable, Rec

public class CommandRec
extends BaseRec
implements Command

A record from the command table

Version:
$Revision: 1.2 $ $Date: 2002/12/29 00:44:06 $
Author:
Reed Esau

Field Summary
protected  java.lang.String cmd_code
           
protected  int command_id
           
protected  int medium_id
           
 
Fields inherited from interface jreceiver.common.rec.driver.Command
HKEY_CMD_CODE, HKEY_ID, HKEY_MEDIUM_ID, STD_FF, STD_NEXT, STD_NEXT_PL, STD_PAUSE, STD_PLAY, STD_PLAYPAUSE, STD_PREV, STD_PREV_PL, STD_PWRTGL, STD_RECORD, STD_RW, STD_STOP, STD_VOLDN, STD_VOLMUTE, STD_VOLUP, TYPE_DIRECT, TYPE_IR, TYPE_X10
 
Fields inherited from interface jreceiver.common.rec.Rec
HKEY_KEY, NO_LIMIT
 
Constructor Summary
CommandRec()
          ctor - for use as bean
CommandRec(java.util.Hashtable hash)
          ctor - construct from a hashtable, usually retrieved via XML-RPC
CommandRec(int command_id, java.lang.String cmd_code, int medium_id)
          ctor - default
 
Method Summary
 java.lang.String getCmdCode()
          This cmd_code is a the network cmd_code by which to identify the receiver.
 java.lang.String getDescription()
          a summary of the command for display
 int getId()
          The driver with which the command is associated
 java.lang.Object getKey()
          return the Integer object that serves as this Rec's key.
 int getMediumId()
          obtain the medium
static java.util.Vector reconstitute(java.util.Vector vector)
          Reconstitute each CommandRec object that appears as a hash in the list.
 void setCmdCode(java.lang.String cmd_code)
          assign the code
 void setKey(java.lang.Object new_key)
          assign the Number-derived, Key-derived or String that serves as this Rec's key.
 void setMediumId(int medium_id)
          assign the medium
 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 jreceiver.common.rec.BaseRec
dissolve, dissolveMap, find, find, find, find
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

command_id

protected int command_id

cmd_code

protected java.lang.String cmd_code

medium_id

protected int medium_id
Constructor Detail

CommandRec

public CommandRec()
ctor - for use as bean

CommandRec

public CommandRec(int command_id,
                  java.lang.String cmd_code,
                  int medium_id)
ctor - default

CommandRec

public CommandRec(java.util.Hashtable hash)
ctor - construct from a hashtable, usually retrieved via XML-RPC
Parameters:
hash -  
Method Detail

toHash

public java.util.Hashtable toHash()
Store the object as a hash suitable for transport over an XML-RPC connection or similar.

Use CommandRec(Hashtable) to transform the data back into an object of this type.

Specified by:
toHash in interface Hashable
Returns:
 

toString

public java.lang.String toString()
Returns a string representation of the event.

Specified by:
toString in interface Hashable
Overrides:
toString in class java.lang.Object
Returns:
a string representation of the object.

getKey

public java.lang.Object getKey()
return the Integer object that serves as this Rec's key.
Specified by:
getKey in interface Rec

setKey

public void setKey(java.lang.Object new_key)
assign the Number-derived, Key-derived or String that serves as this Rec's key.
Specified by:
setKey in interface Rec

getId

public int getId()
The driver with which the command is associated
Specified by:
getId in interface Command

getCmdCode

public java.lang.String getCmdCode()
This cmd_code is a the network cmd_code by which to identify the receiver. It can be a name or IP cmd_code.
Specified by:
getCmdCode in interface Command

setCmdCode

public void setCmdCode(java.lang.String cmd_code)
assign the code
Specified by:
setCmdCode in interface Command

getMediumId

public int getMediumId()
Description copied from interface: Command
obtain the medium
Specified by:
getMediumId in interface Command

setMediumId

public void setMediumId(int medium_id)
assign the medium
Specified by:
setMediumId in interface Command

getDescription

public java.lang.String getDescription()
a summary of the command for display
Specified by:
getDescription in interface Command

reconstitute

public static java.util.Vector reconstitute(java.util.Vector vector)
Reconstitute each CommandRec object that appears as a hash in the list.
Parameters:
vector -  
Returns:
 


Copyright © 2001-2002 Reed Esau, All Rights Reserved.