public class NAMessageImpl extends NAMessage
| Modifier and Type | Method and Description |
|---|---|
void |
addedToQueue() |
static NAMessageImpl |
buildMessageForDelivery(NADeviceImpl destination,
byte[] message) |
static NAMessageImpl |
buildMessageForDelivery(NADeviceImpl destination,
String message) |
static NAMessageImpl |
buildMessageForLocalReceipt(NADeviceImpl sender,
byte[] message) |
static NAMessageImpl |
buildMessageForLocalReceipt(NADeviceImpl sender,
String message) |
int |
compareTo(NAMessage another) |
int |
compareTo(com.newaer.sdk.proximity.NAObject another) |
boolean |
equals(Object another) |
void |
finish()
Blocks until the sending of the message is complete.
|
long |
getAddedToQueueTime() |
byte[] |
getData() |
NADeviceImpl |
getDestinationDevice() |
String |
getDestinationDeviceId() |
String |
getId()
Returns the identifier for this object within the platform.
|
String |
getName()
Returns the name for this object within the platform.
|
NAMessage |
getReply() |
String |
getSenderDeviceId() |
int |
hashCode() |
boolean |
isFinished()
Returns true if finish() would not block.
|
void |
send()
Queues the message for sending.
|
void |
setData(byte[] data)
Sets the data for this message.
|
void |
setFinished() |
void |
setName(Context context,
String name)
Change the name for this object.
|
public static final Logger LOG
public static NAMessageImpl buildMessageForDelivery(NADeviceImpl destination, String message) throws UnsupportedEncodingException
UnsupportedEncodingExceptionpublic static NAMessageImpl buildMessageForLocalReceipt(NADeviceImpl sender, String message) throws UnsupportedEncodingException
UnsupportedEncodingExceptionpublic static NAMessageImpl buildMessageForDelivery(NADeviceImpl destination, byte[] message)
public static NAMessageImpl buildMessageForLocalReceipt(NADeviceImpl sender, byte[] message)
public void setData(byte[] data)
NAMessagepublic void send()
NAMessagepublic String getDestinationDeviceId()
getDestinationDeviceId in class NAMessagepublic String getSenderDeviceId()
getSenderDeviceId in class NAMessagepublic byte[] getData()
public void finish()
NAMessagepublic boolean isFinished()
NAMessageisFinished in class NAMessagepublic NAMessage getReply()
public NADeviceImpl getDestinationDevice()
public void setFinished()
public void addedToQueue()
public long getAddedToQueueTime()
public String getId()
Returns the identifier for this object within the platform.
This identifier is unique on a per object type basis.
public String getName()
public void setName(Context context, String name)
context - the context to work inname - the new name for this object.public int compareTo(NAMessage another)
public int compareTo(com.newaer.sdk.proximity.NAObject another)
compareTo in interface Comparable<T extends com.newaer.sdk.proximity.NAObject>