public class DeviceCommand extends Resource
Modifier and Type | Field and Description |
---|---|
static int |
HIGH_PRIORITY |
static int |
LOW_PRIORITY
Command priorities.
|
static int |
MEDIUM_PRIORITY |
static java.lang.String |
SELECT |
AUTH_TYPE, CONN_MAX_EXCEEDED, DEVICE_DELETE, DEVICE_REGISTER, EMPTY_STR, INVALID_ADDRESS, INVALID_DEVICE, INVALID_DIR, INVALID_ID, INVALID_INF, INVALID_NAME, INVALID_PARAM, INVALID_PLATFORM, INVALID_PROVIDER, INVALID_RESOURCE, INVALID_TYPE, INVALID_URL, NOT_FOUND, NOT_INITIALIZED, NOTIFY_CLASS, NOTIFY_ON_STATUS, NOTIFY_ON_VERIFY, RESOURCE_ENABLED, RESOURCE_VALID, SEP, STR_ANY, STR_BASE_NAME, STR_DMC, STR_EMPTY, STR_FALSE, STR_INF, STR_INF_EXT, STR_ONE, STR_TRUE, STR_WILD, STR_ZERO, SYSTEM_ID, TIME, UPDATE_MAJOR, UPDATE_MINOR, UPDATE_SOFTWARE, UPDATE_SOFTWARE_APPS, UPDATE_SOFTWARE_DMC
Constructor and Description |
---|
DeviceCommand(Command cmd,
Device dev)
Construct a new DeviceCommand object from a Command object.
|
DeviceCommand(java.sql.ResultSet rs,
Device device)
Construct a DeviceCommand object from a ResultSet.
|
Modifier and Type | Method and Description |
---|---|
Command |
getCommand()
Get the command object referenced by this DeviceCommand object
|
java.lang.String |
getCommandId()
Get the command id
|
java.lang.String |
getCommandString()
Get command string of the command object.
|
java.lang.String |
getParams()
Get the params
|
java.sql.Timestamp |
getSendTime()
Get date & time when the request was sent to the client.
|
java.lang.String |
getStatusMessage()
Get client status message of the request.
|
java.sql.Timestamp |
getStatusTime()
Get date & time when the request status was updated.
|
java.sql.Timestamp |
getVerificationTime()
Get date & time when the request was verified
|
void |
queue()
Queue this command in the device queue
|
void |
send(int priority,
Address address)
Send this command to the device.
|
void |
setAddress(java.lang.String address)
Set address
|
void |
setAlwaysAccept(boolean accept) |
void |
setIOSParams(java.lang.String value)
set iOS device command parameters
current iOS commands take at most 1 parameter, if they take more than 1
parameter, the function needs to be modified.
|
void |
setParameter(java.lang.String name,
java.lang.String value)
Set parameter - Name/Value pair
|
void |
setParameters(java.lang.String param)
Set device command parameters
|
void |
setPriority(int priority)
Set a new request priority.
|
void |
setPseudo(boolean pseudo) |
void |
setStatus(java.lang.String time,
java.lang.String msg)
Update the status time of the DeviceCommand object
|
void |
setUdid(java.lang.String udid) |
void |
setUuid(java.lang.String uuid) |
void |
setVerify()
Set verification status of DeviceCommand object
|
delete, equals, getAttribute, getId, getKey, hashCode, isEnabled, isSystemResource, isValid, removeAttribute, save, setAttribute, setEnabled, setNew, validateAttribute
public static final int HIGH_PRIORITY
public static final int LOW_PRIORITY
public static final int MEDIUM_PRIORITY
public static final java.lang.String SELECT
public DeviceCommand(Command cmd, Device dev) throws ResourceException
cmd
- oracle.lite.resource.dm.Command
objectdev
- Device objectoracle.lite.resource.ResourceException
ResourceException
public DeviceCommand(java.sql.ResultSet rs, Device device) throws java.sql.SQLException
rs
- java.sql.ResultSet
objectdevice
- oracle.lite.resource.Device
objectjava.sql.SQLException
java.sql.SQLException
public Command getCommand()
oracle.lite.resource.dm.Command
objectpublic java.lang.String getCommandId()
public java.lang.String getCommandString()
public java.lang.String getParams()
public java.sql.Timestamp getSendTime()
public java.lang.String getStatusMessage()
public java.sql.Timestamp getStatusTime()
public java.sql.Timestamp getVerificationTime()
public void queue() throws ResourceException
oracle.lite.resource.ResourceException
ResourceException
public void send(int priority, Address address) throws ResourceException
priority
- Command priorityaddress
- Device addressoracle.lite.resource.ResourceException
ResourceException
public void setAddress(java.lang.String address)
address
- Device addresspublic void setAlwaysAccept(boolean accept)
public void setIOSParams(java.lang.String value)
value
- public void setParameter(java.lang.String name, java.lang.String value)
name
- Parameter namevalue
- Parameter valuepublic void setParameters(java.lang.String param)
param
- Parameter string (must be in the format NAME1=VALUE1&NAME2=VALUE2)public void setPriority(int priority)
priority
- Request priority.public void setPseudo(boolean pseudo)
public void setStatus(java.lang.String time, java.lang.String msg) throws ResourceException
time
- Status time (must be in 'mm-dd-yyyy hh24:mi:ss' format)msg
- Status message.oracle.lite.resource.ResourceException
ResourceException
public void setUdid(java.lang.String udid)
public void setUuid(java.lang.String uuid)
public void setVerify() throws ResourceException
oracle.lite.resource.ResourceException
ResourceException