Hubiquitus Android  0.6.1
Android client for hubiquitus protocol
org.hubiquitus.hapi.hStructures.HMessage Class Reference

Inherits JSONObject.

List of all members.

Public Member Functions

 HMessage (JSONObject jsonObj) throws JSONException
String getMsgid ()
void setMsgid (String msgid)
String getActor ()
void setActor (String actor) throws MissingAttrException
String getConvid ()
void setConvid (String convid)
String getRef ()
void setRef (String ref)
String getType ()
void setType (String type)
HMessagePriority getPriority ()
void setPriority (HMessagePriority priority)
Date getRelevanceAsDate ()
long getRelevance ()
void setRelevance (Date relevance)
void setRelevance (long relevance)
Boolean getPersistent ()
void setPersistent (Boolean persistent)
HLocation getLocation ()
void setLocation (HLocation location)
String getAuthor ()
void setAuthor (String author)
String getPublisher ()
void setPublisher (String publisher)
Date getPublishedAsDate ()
long getPublished ()
void setPublished (Date published)
void setPublished (long published)
JSONObject getHeaders ()
void setHeaders (JSONObject headers)
Object getPayload ()
JSONObject getPayloadAsJSONObject ()
JSONArray getPayloadAsJSONArray ()
String getPayloadAsString ()
Boolean getPayloadAsBoolean ()
Integer getPayloadAsInt ()
Double getPayloadAsDouble ()
HAlert getPayloadAsHAlert ()
HAck getPayloadAsHAck ()
HMeasure getPayloadAsHmeasure ()
HConvState getPayloadAsHConvState ()
HResult getPayloadAsHResult ()
HCommand getPayloadAsHCommand ()
void setPayload (Object payload)
void setPayload (JSONObject payload)
void setPayload (JSONArray payload)
void setPayload (String payload)
void setPayload (Boolean payload)
void setPayload (Integer payload)
void setPayload (Double payload)
void setPayload (HAlert payload)
void setPayload (HAck payload)
void setPayload (HMeasure payload)
void setPayload (HConvState payload)
void setPayload (HResult payload)
void setPayload (HCommand payload)
long getTimeout ()
void setTimeout (long timeout)
Date getSentAsDate ()
long getSent ()
void setSent (Date sent)
void setSent (long sent)

Package Attributes

final Logger logger = LoggerFactory.getLogger(HMessage.class)

Detailed Description

Version:
0.6 hAPI Command. For more info, see Hubiquitus reference

Member Function Documentation

Mandatory The unique ID of the channel through which the message is published. The JID through which the message is published. The JID can be that of a channel (beginning with #) or a user. A special actor called ‘session’ indicates that the HServer should handle the hMessage.

Returns:
actor. NULL if undefined
Returns:
author of this message. NULL if undefined

Mandatory. Filled by the hApi if empty.

Returns:
conversation id. NULL if undefined

The list of headers attached to this message.

Returns:
Headers. NULL if undefined

The geographical location to which the message refer.

Returns:
location. NULL if undefined

Mandatory. Filled by the hApi.

Returns:
message id. NULL if undefined

When we don't know the type of payload. It will return an object.

Returns:
payload reference. NULL if undefined

if payload type is Boolean

Returns:
payload reference. Null if undefined

if payload type is Double

Returns:
payload reference, Null if undefined.

if payload type is HAck, if not return null.

Returns:
HAck copy. Null if undefined.

if payload type is HAlert. if not return null.

Returns:
HAlert copy. NULL if undefined

if payload is HCommand, if not return null.

Returns:
HCommand copy. Null if undefined.

if payload is HConvState, if not return null.

Returns:
HConvState copy. Null if undefined.

if payload is HMeasure, if not return null.

Returns:
HMeasure copy. Null if undefined.

if payload is HResult, if not return null.

Returns:
HResult copy. Null if undefined.

if payload type is Integer

Returns:
payload reference. Null if undefined.

if payload type is JSONArray

Returns:
payload reference. NULL if undefined

if payload type is JSONObject

Returns:
payload reference. NULL if undefined

if payload type is String

Returns:
payload reference. NULL if undefined
Returns:
persist message or not. NULL if undefined
Returns:
Priority.If UNDEFINED, priority lower to 0.
Returns:
published. NULL if undefined
Returns:
publisher of this message. NULL if undefined
Returns:
reference to another hMessage msgid. NULL if undefined.

Date until which the message is considered as relevant.

Returns:
relevance. NULL if undefined
Returns:
sent. Null if undefined.
Returns:
timeout. 0 if undefined.
Returns:
type of the message payload. NULL if undefined

Payload type could be instance of JSONObject(HAlert, HAck ...), JSONArray, String, Boolean, Number

Parameters:
payload

The documentation for this class was generated from the following file:
 All Classes Functions Variables