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
UnsupportedEncodingException
public static NAMessageImpl buildMessageForLocalReceipt(NADeviceImpl sender, String message) throws UnsupportedEncodingException
UnsupportedEncodingException
public static NAMessageImpl buildMessageForDelivery(NADeviceImpl destination, byte[] message)
public static NAMessageImpl buildMessageForLocalReceipt(NADeviceImpl sender, byte[] message)
public void setData(byte[] data)
NAMessage
public void send()
NAMessage
public String getDestinationDeviceId()
getDestinationDeviceId
in class NAMessage
public String getSenderDeviceId()
getSenderDeviceId
in class NAMessage
public byte[] getData()
public void finish()
NAMessage
public boolean isFinished()
NAMessage
isFinished
in class NAMessage
public 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>