|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.caucho.jms.message.MessageImpl
public class MessageImpl
A basic message.
| Field Summary | |
|---|---|
protected static L10N |
L
|
protected static java.util.logging.Logger |
log
|
| Fields inherited from interface javax.jms.Message |
|---|
DEFAULT_DELIVERY_MODE, DEFAULT_PRIORITY, DEFAULT_TIME_TO_LIVE |
| Constructor Summary | |
|---|---|
MessageImpl()
|
|
MessageImpl(Message msg)
Create a message, copying the properties |
|
MessageImpl(MessageImpl msg)
|
|
| Method Summary | |
|---|---|
void |
acknowledge()
Acknowledge receipt of this message. |
java.io.InputStream |
bodyToInputStream()
Serialize the body to an input stream. |
protected void |
checkBodyReadable()
|
protected void |
checkBodyWriteable()
|
protected void |
checkHeaderWriteable()
|
protected void |
checkPropertyWriteable()
|
void |
clearBody()
Clears the body, setting write mode. |
void |
clearProperties()
Clears the message properties, making them writeable. |
MessageImpl |
copy()
|
protected void |
copy(MessageImpl newMsg)
|
boolean |
getBooleanProperty(java.lang.String name)
Returns a boolean property with the given name. |
byte |
getByteProperty(java.lang.String name)
Returns a property as a byte |
double |
getDoubleProperty(java.lang.String name)
Returns a property as a double |
float |
getFloatProperty(java.lang.String name)
Returns a property as a float |
int |
getIntProperty(java.lang.String name)
Returns a property as an integer |
java.lang.String |
getJMSCorrelationID()
Returns the correlation id. |
byte[] |
getJMSCorrelationIDAsBytes()
Returns the correlation id. |
int |
getJMSDeliveryMode()
Gets the delivery model |
Destination |
getJMSDestination()
Gets the destination |
long |
getJMSExpiration()
Returns the message expiration time. |
java.lang.String |
getJMSMessageID()
Returns the message id. |
int |
getJMSPriority()
Returns the message priority. |
boolean |
getJMSRedelivered()
Returns if the message is being redelivered. |
Destination |
getJMSReplyTo()
Gets the reply-to destination |
long |
getJMSTimestamp()
Returns the time the message was sent. |
java.lang.String |
getJMSType()
Returns the message type |
long |
getLongProperty(java.lang.String name)
Returns a property as a long |
java.lang.Object |
getObjectProperty(java.lang.String name)
Returns a string property. |
java.util.HashMap<java.lang.String,java.lang.Object> |
getProperties()
Returns the properties. |
java.util.Enumeration |
getPropertyNames()
Returns an enumeration of the message's properties. |
long |
getSequence()
|
short |
getShortProperty(java.lang.String name)
Returns a property as a short |
java.lang.String |
getStringProperty(java.lang.String name)
Returns a string property. |
MessageType |
getType()
Returns the type enumeration. |
static boolean |
isReserved(java.lang.String name)
|
java.io.InputStream |
propertiesToInputStream()
Serialize the properties to an input stream. |
boolean |
propertyExists(java.lang.String name)
Returns true if the property exists. |
void |
readBody(java.io.InputStream is)
Read the body from an input stream. |
void |
readProperties(java.io.InputStream is)
Read the properties from an input stream. |
protected void |
setBodyReadOnly()
Sets the body for reading. |
void |
setBooleanProperty(java.lang.String name,
boolean value)
Sets a boolean property. |
void |
setByteProperty(java.lang.String name,
byte value)
Sets a byte property. |
void |
setDoubleProperty(java.lang.String name,
double value)
Sets a double property. |
void |
setFloatProperty(java.lang.String name,
float value)
Sets a float property. |
void |
setIntProperty(java.lang.String name,
int value)
Sets an integer property. |
void |
setJMSCorrelationID(java.lang.String id)
Sets the correlation id. |
void |
setJMSCorrelationIDAsBytes(byte[] id)
Sets the correlation id. |
void |
setJMSDeliveryMode(int deliveryMode)
Sets the delivery mode |
void |
setJMSDestination(Destination destination)
Sets the reply-to destination |
void |
setJMSExpiration(long time)
Sets the message expiration type. |
void |
setJMSMessageID(java.lang.String id)
Sets the message id. |
void |
setJMSPriority(int priority)
Sets the message priority. |
void |
setJMSRedelivered(boolean isRedelivered)
Sets if the message is being redelivered. |
void |
setJMSReplyTo(Destination replyTo)
Sets the reply-to destination |
void |
setJMSTimestamp(long time)
Sets the time the message was sent. |
void |
setJMSType(java.lang.String type)
Sets the message type. |
void |
setLongProperty(java.lang.String name,
long value)
Sets a long property. |
void |
setObjectProperty(java.lang.String name,
java.lang.Object value)
Sets an object property. |
void |
setReceive()
Sets the body for reading. |
void |
setSequence(long seq)
|
void |
setSession(JmsSession session)
Sets the session. |
void |
setShortProperty(java.lang.String name,
short value)
Sets a short property. |
void |
setStringProperty(java.lang.String name,
java.lang.String value)
Sets a string property. |
java.lang.String |
toString()
|
void |
writeBody(java.io.OutputStream os)
Serialize the body to an output stream. |
void |
writeProperties(java.io.OutputStream os)
Serialize the properties to an input stream. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected static final java.util.logging.Logger log
protected static final L10N L
| Constructor Detail |
|---|
public MessageImpl()
public MessageImpl(Message msg)
throws JMSException
JMSExceptionpublic MessageImpl(MessageImpl msg)
| Method Detail |
|---|
public void setSession(JmsSession session)
public MessageType getType()
public java.lang.String getJMSMessageID()
getJMSMessageID in interface Messagepublic void setJMSMessageID(java.lang.String id)
setJMSMessageID in interface Messageid - the new message id
public long getJMSTimestamp()
throws JMSException
getJMSTimestamp in interface MessageJMSException
public void setJMSTimestamp(long time)
throws JMSException
setJMSTimestamp in interface Messagetime - the message timestamp
JMSException
public byte[] getJMSCorrelationIDAsBytes()
throws JMSException
getJMSCorrelationIDAsBytes in interface MessageJMSException
public void setJMSCorrelationIDAsBytes(byte[] id)
throws JMSException
setJMSCorrelationIDAsBytes in interface Messageid - the correlation id
JMSException
public java.lang.String getJMSCorrelationID()
throws JMSException
getJMSCorrelationID in interface MessageJMSException
public void setJMSCorrelationID(java.lang.String id)
throws JMSException
setJMSCorrelationID in interface Messageid - the correlation id
JMSException
public Destination getJMSReplyTo()
throws JMSException
getJMSReplyTo in interface MessageJMSException
public void setJMSReplyTo(Destination replyTo)
throws JMSException
setJMSReplyTo in interface MessagereplyTo - the destination
JMSException
public Destination getJMSDestination()
throws JMSException
getJMSDestination in interface MessageJMSException
public void setJMSDestination(Destination destination)
throws JMSException
setJMSDestination in interface Messagedestination - the destination
JMSException
public int getJMSDeliveryMode()
throws JMSException
getJMSDeliveryMode in interface MessageJMSException
public void setJMSDeliveryMode(int deliveryMode)
throws JMSException
setJMSDeliveryMode in interface MessagedeliveryMode - the delivery mode
JMSExceptionpublic boolean getJMSRedelivered()
getJMSRedelivered in interface Messagepublic void setJMSRedelivered(boolean isRedelivered)
setJMSRedelivered in interface MessagedeliveryMode - the delivery mode
public java.lang.String getJMSType()
throws JMSException
getJMSType in interface MessageJMSException
public void setJMSType(java.lang.String type)
throws JMSException
setJMSType in interface Messagetype - the delivery mode
JMSException
public long getJMSExpiration()
throws JMSException
getJMSExpiration in interface MessageJMSException
public void setJMSExpiration(long time)
throws JMSException
setJMSExpiration in interface Messagetime - the expiration time
JMSExceptionpublic int getJMSPriority()
getJMSPriority in interface Messagepublic void setJMSPriority(int priority)
setJMSPriority in interface Messagepriority - the priority
public void clearProperties()
throws JMSException
clearProperties in interface MessageJMSException
public boolean propertyExists(java.lang.String name)
throws JMSException
propertyExists in interface MessageJMSException
public boolean getBooleanProperty(java.lang.String name)
throws JMSException
getBooleanProperty in interface MessageJMSException
public byte getByteProperty(java.lang.String name)
throws JMSException
getByteProperty in interface MessageJMSException
public short getShortProperty(java.lang.String name)
throws JMSException
getShortProperty in interface MessageJMSException
public int getIntProperty(java.lang.String name)
throws JMSException
getIntProperty in interface MessageJMSException
public long getLongProperty(java.lang.String name)
throws JMSException
getLongProperty in interface MessageJMSException
public float getFloatProperty(java.lang.String name)
throws JMSException
getFloatProperty in interface MessageJMSException
public double getDoubleProperty(java.lang.String name)
throws JMSException
getDoubleProperty in interface MessageJMSException
public java.lang.String getStringProperty(java.lang.String name)
throws JMSException
getStringProperty in interface MessageJMSException
public java.lang.Object getObjectProperty(java.lang.String name)
throws JMSException
getObjectProperty in interface MessageJMSException
public java.util.Enumeration getPropertyNames()
throws JMSException
getPropertyNames in interface MessageJMSException
public void setBooleanProperty(java.lang.String name,
boolean value)
throws JMSException
setBooleanProperty in interface Messagename - the property namevalue - the property's value
JMSException
public void setByteProperty(java.lang.String name,
byte value)
throws JMSException
setByteProperty in interface Messagename - the property namevalue - the property's value
JMSException
public void setShortProperty(java.lang.String name,
short value)
throws JMSException
setShortProperty in interface Messagename - the property namevalue - the property's value
JMSException
public void setIntProperty(java.lang.String name,
int value)
throws JMSException
setIntProperty in interface Messagename - the property namevalue - the property's value
JMSException
public void setLongProperty(java.lang.String name,
long value)
throws JMSException
setLongProperty in interface Messagename - the property namevalue - the property's value
JMSException
public void setFloatProperty(java.lang.String name,
float value)
throws JMSException
setFloatProperty in interface Messagename - the property namevalue - the property's value
JMSException
public void setDoubleProperty(java.lang.String name,
double value)
throws JMSException
setDoubleProperty in interface Messagename - the property namevalue - the property's value
JMSException
public void setStringProperty(java.lang.String name,
java.lang.String value)
throws JMSException
setStringProperty in interface Messagename - the property namevalue - the property's value
JMSException
public void setObjectProperty(java.lang.String name,
java.lang.Object value)
throws JMSException
setObjectProperty in interface Messagename - the property namevalue - the property's value
JMSException
public void acknowledge()
throws JMSException
acknowledge in interface MessageJMSException
public void clearBody()
throws JMSException
clearBody in interface MessageJMSException
public void setReceive()
throws JMSException
JMSExceptionprotected void setBodyReadOnly()
public java.util.HashMap<java.lang.String,java.lang.Object> getProperties()
public long getSequence()
public void setSequence(long seq)
public MessageImpl copy()
public java.io.InputStream propertiesToInputStream()
throws java.io.IOException
java.io.IOException
public void writeProperties(java.io.OutputStream os)
throws java.io.IOException
java.io.IOException
public void readProperties(java.io.InputStream is)
throws java.io.IOException,
JMSException
java.io.IOException
JMSException
public java.io.InputStream bodyToInputStream()
throws java.io.IOException
java.io.IOException
public void writeBody(java.io.OutputStream os)
throws java.io.IOException
java.io.IOException
public void readBody(java.io.InputStream is)
throws java.io.IOException,
JMSException
java.io.IOException
JMSException
protected void checkHeaderWriteable()
throws JMSException
JMSException
protected void checkPropertyWriteable()
throws JMSException
JMSException
protected void checkBodyWriteable()
throws JMSException
JMSException
protected void checkBodyReadable()
throws JMSException
JMSExceptionprotected void copy(MessageImpl newMsg)
public java.lang.String toString()
toString in class java.lang.Objectpublic static boolean isReserved(java.lang.String name)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||