org.usergrid.mq
Class Message

java.lang.Object
  extended by org.usergrid.mq.Message

public class Message
extends Object


Field Summary
static String MESSAGE_CATEGORY
           
static String MESSAGE_CORRELATION_ID
           
static String MESSAGE_DESTINATION
           
static String MESSAGE_ID
           
static String MESSAGE_INDEXED
           
static String MESSAGE_PERSISTENT
           
static Map<String,Class> MESSAGE_PROPERTIES
           
static String MESSAGE_REPLY_TO
           
static String MESSAGE_TIMESTAMP
           
static String MESSAGE_TYPE
           
protected  Map<String,Object> properties
           
 
Constructor Summary
Message()
           
Message(Map<String,Object> properties)
           
 
Method Summary
 void acknowledge()
           
 void addCounter(String name, int value)
           
 void clearBody()
           
 void clearProperties()
           
static int compare(Message m1, Message m2)
           
static List<Message> fromList(List<Map<String,Object>> l)
           
 boolean getBooleanProperty(String name)
           
 byte getByteProperty(String name)
           
 String getCategory()
           
 String getCorrelationID()
           
 byte[] getCorrelationIDAsBytes()
           
 Map<String,Integer> getCounters()
           
 int getDeliveryMode()
           
 Queue getDestination()
           
 double getDoubleProperty(String name)
           
 long getExpiration()
           
 float getFloatProperty(String name)
           
 int getIntProperty(String name)
           
 long getLongProperty(String name)
           
 String getMessageID()
           
 Object getObjectProperty(String name)
           
 int getPriority()
           
 Map<String,Object> getProperties()
           
 Enumeration<String> getPropertyNames()
           
 boolean getRedelivered()
           
 Queue getReplyTo()
           
 short getShortProperty(String name)
           
 String getStringProperty(String name)
           
 long getTimestamp()
           
 String getType()
           
 UUID getUuid()
           
 boolean isIndexed()
           
 boolean isPersistent()
           
 boolean propertyExists(String name)
           
 void setBooleanProperty(String name, boolean value)
           
 void setByteProperty(String name, byte value)
           
 void setCategory(String category)
           
 void setCorrelationID(String correlationId)
           
 void setCorrelationIDAsBytes(byte[] correlationId)
           
 void setCounters(Map<String,Integer> counters)
           
 void setDeliveryMode(int arg0)
           
 void setDestination(Queue destination)
           
 void setDoubleProperty(String name, double value)
           
 void setExpiration(long expiration)
           
 void setFloatProperty(String name, float value)
           
 void setIndexed(boolean indexed)
           
 void setIntProperty(String name, int value)
           
 void setLongProperty(String name, long value)
           
 void setMessageID(String id)
           
 void setObjectProperty(String name, Object value)
           
 void setPersistent(boolean persistent)
           
 void setPriority(int priority)
           
 void setProperty(String key, Object value)
           
 void setRedelivered(boolean redelivered)
           
 void setReplyTo(Queue destination)
           
 void setShortProperty(String name, short value)
           
 void setStringProperty(String name, String value)
           
 void setTimestamp(long timestamp)
           
 void setType(String type)
           
 void setUuid(UUID uuid)
           
static List<Message> sort(List<Message> messages)
           
static List<Message> sortReversed(List<Message> messages)
           
 void sync()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MESSAGE_CORRELATION_ID

public static final String MESSAGE_CORRELATION_ID
See Also:
Constant Field Values

MESSAGE_DESTINATION

public static final String MESSAGE_DESTINATION
See Also:
Constant Field Values

MESSAGE_ID

public static final String MESSAGE_ID
See Also:
Constant Field Values

MESSAGE_REPLY_TO

public static final String MESSAGE_REPLY_TO
See Also:
Constant Field Values

MESSAGE_TIMESTAMP

public static final String MESSAGE_TIMESTAMP
See Also:
Constant Field Values

MESSAGE_TYPE

public static final String MESSAGE_TYPE
See Also:
Constant Field Values

MESSAGE_CATEGORY

public static final String MESSAGE_CATEGORY
See Also:
Constant Field Values

MESSAGE_INDEXED

public static final String MESSAGE_INDEXED
See Also:
Constant Field Values

MESSAGE_PERSISTENT

public static final String MESSAGE_PERSISTENT
See Also:
Constant Field Values

MESSAGE_PROPERTIES

public static final Map<String,Class> MESSAGE_PROPERTIES

properties

protected Map<String,Object> properties
Constructor Detail

Message

public Message()

Message

public Message(Map<String,Object> properties)
Method Detail

compare

public static int compare(Message m1,
                          Message m2)

fromList

public static List<Message> fromList(List<Map<String,Object>> l)

sort

public static List<Message> sort(List<Message> messages)

sortReversed

public static List<Message> sortReversed(List<Message> messages)

acknowledge

public void acknowledge()

addCounter

public void addCounter(String name,
                       int value)

clearBody

public void clearBody()

clearProperties

public void clearProperties()

getBooleanProperty

public boolean getBooleanProperty(String name)

getByteProperty

public byte getByteProperty(String name)

getCategory

public String getCategory()

getCorrelationID

public String getCorrelationID()

getCorrelationIDAsBytes

public byte[] getCorrelationIDAsBytes()

getCounters

public Map<String,Integer> getCounters()

getDeliveryMode

public int getDeliveryMode()

getDestination

public Queue getDestination()

getDoubleProperty

public double getDoubleProperty(String name)

getExpiration

public long getExpiration()

getFloatProperty

public float getFloatProperty(String name)

getIntProperty

public int getIntProperty(String name)

getLongProperty

public long getLongProperty(String name)

getMessageID

public String getMessageID()

getObjectProperty

public Object getObjectProperty(String name)

getPriority

public int getPriority()

getProperties

public Map<String,Object> getProperties()

getPropertyNames

public Enumeration<String> getPropertyNames()

getRedelivered

public boolean getRedelivered()

getReplyTo

public Queue getReplyTo()

getShortProperty

public short getShortProperty(String name)

getStringProperty

public String getStringProperty(String name)

getTimestamp

public long getTimestamp()

getType

public String getType()

getUuid

public UUID getUuid()

isIndexed

public boolean isIndexed()

isPersistent

public boolean isPersistent()

propertyExists

public boolean propertyExists(String name)

setBooleanProperty

public void setBooleanProperty(String name,
                               boolean value)

setByteProperty

public void setByteProperty(String name,
                            byte value)

setCategory

public void setCategory(String category)

setCorrelationID

public void setCorrelationID(String correlationId)

setCorrelationIDAsBytes

public void setCorrelationIDAsBytes(byte[] correlationId)

setCounters

public void setCounters(Map<String,Integer> counters)

setDeliveryMode

public void setDeliveryMode(int arg0)

setDestination

public void setDestination(Queue destination)

setDoubleProperty

public void setDoubleProperty(String name,
                              double value)

setExpiration

public void setExpiration(long expiration)

setFloatProperty

public void setFloatProperty(String name,
                             float value)

setIndexed

public void setIndexed(boolean indexed)

setIntProperty

public void setIntProperty(String name,
                           int value)

setLongProperty

public void setLongProperty(String name,
                            long value)

setMessageID

public void setMessageID(String id)

setObjectProperty

public void setObjectProperty(String name,
                              Object value)

setPersistent

public void setPersistent(boolean persistent)

setPriority

public void setPriority(int priority)

setProperty

public void setProperty(String key,
                        Object value)

setRedelivered

public void setRedelivered(boolean redelivered)

setReplyTo

public void setReplyTo(Queue destination)

setShortProperty

public void setShortProperty(String name,
                             short value)

setStringProperty

public void setStringProperty(String name,
                              String value)

setTimestamp

public void setTimestamp(long timestamp)

setType

public void setType(String type)

setUuid

public void setUuid(UUID uuid)

sync

public void sync()


Copyright © 2013. All Rights Reserved.