public abstract class NAMessage extends Object
Modifier | Constructor and Description |
---|---|
protected |
NAMessage()
Only subclass construction.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(com.newaer.sdk.proximity.NAObject another) |
boolean |
equals(Object another) |
abstract void |
finish()
Blocks until the sending of the message is complete.
|
abstract byte[] |
getData() |
abstract String |
getDestinationDeviceId() |
abstract String |
getId()
Returns the identifier for this object within the platform.
|
abstract String |
getName()
Returns the name for this object within the platform.
|
abstract NAMessage |
getReply() |
abstract String |
getSenderDeviceId() |
int |
hashCode() |
abstract boolean |
isFinished()
Returns true if finish() would not block.
|
abstract void |
send()
Queues the message for sending.
|
abstract void |
setData(byte[] data)
Sets the data for this message.
|
abstract void |
setName(Context context,
String name)
Change the name for this object.
|
public abstract String getDestinationDeviceId()
public abstract String getSenderDeviceId()
public abstract void setData(byte[] data)
data
- the data to sendMessage.IllegalStateException
- if sendMessage() has already been called.IllegalArgumentException
- if data.length > 256public abstract byte[] getData()
public abstract void send()
UnsupportedOperationException
- if the device type doesn't support messaging.public abstract void finish()
public abstract boolean isFinished()
public abstract NAMessage getReply()
public abstract String getId()
Returns the identifier for this object within the platform.
This identifier is unique on a per object type basis.
public abstract String getName()
public abstract void setName(Context context, String name)
context
- the context to work inname
- the new name for this object.public int compareTo(com.newaer.sdk.proximity.NAObject another)
compareTo
in interface Comparable<T extends com.newaer.sdk.proximity.NAObject>