Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jboss.mq
Class SpyMessage

    java.lang.Object
      org.jboss.mq.SpyMessage

All Implemented Interfaces:
  Cloneable, Comparable, Externalizable, javax.jms.Message, Serializable

Direct Known Subclasses:
  SpyBytesMessage, SpyMapMessage, SpyObjectMessage, SpyStreamMessage, SpyTextMessage

public class SpyMessage
extends Object
implements Serializable, javax.jms.Message, Comparable, Cloneable, Externalizable

This class implements javax.jms.Message

Version:
  $Revision: 1.27.6.2 $
Author:
  Norbert Lataille (Norbert.Lataille@m4x.org), Hiram Chirino (Cojonudo14@hotmail.com), David Maplesden (David.Maplesden@orion.co.nz), Adrian Brock
See Also:
  Serialized Form

Nested Class Summary
`static class` | `SpyMessage.Header` The message headers

Field Summary
`AcknowledgementRequest` | `ack` The acknowledgement request for this message
`protected static int` | `BOOLEAN` A boolean property
`protected static int` | `BYTE` A byte property
`protected static byte` | `BYTES_MESS` An bytes message
`protected static int` | `DOUBLE` A double property
`protected static byte` | `ENCAP_MESS` An encapsulated message
`protected static int` | `FLOAT` A float property
`SpyMessage.Header` | `header` The message header
`protected static int` | `INT` An integer property
`protected static int` | `LONG` A long property
`protected static byte` | `MAP_MESS` A map message
`protected static int` | `NULL` A null property
`protected static int` | `OBJECT` An object property
`protected static byte` | `OBJECT_MESS` An object message
`static String` | `PROPERTY_REDELIVERY_COUNT` JBoss-vendor specific property for getting the count of redelivery attempts of a message.
`static String` | `PROPERTY_REDELIVERY_DELAY` JBoss-vendor specific property specifying redelivery delay of a message.
`static String` | `PROPERTY_REDELIVERY_LIMIT` JBoss-vendor specific property specifying the limit of redelivery attempts of a message.
`static String` | `PROPERTY_SCHEDULED_DELIVERY` JBoss-vendor specific property for scheduling a JMS message.
`SpySession` | `session` The session for this message
`protected static int` | `SHORT` A short property
`protected static byte` | `SPY_MESS` A plain message
`protected static byte` | `STREAM_MESS` A stream message
`protected static int` | `STRING` A string property
`protected static byte` | `TEXT_MESS` A text message

Fields inherited from interface javax.jms.Message
`DEFAULT_DELIVERY_MODE, DEFAULT_PRIORITY, DEFAULT_TIME_TO_LIVE`

Constructor Summary
`SpyMessage()`

Method Summary
`void` | `acknowledge()` Acknowledge a message
`void` | `clearBody()` Clear the message body
`void` | `clearProperties()`
`int` | `compareTo(Object o)`
`void` | `copyProps(SpyMessage original)` Copy the properties
`void` | `createAcknowledgementRequest(int subscriptionId)` Create an acknowledgement request for the message
`void` | `doAcknowledge()` Actually acknowledge a message
`void` | `doNegAcknowledge()` Actually nack a message
`AcknowledgementRequest` | `getAcknowledgementRequest(boolean isAck)` Get an acknowledgement request for the message
`boolean` | `getBooleanProperty(String name)`
`byte` | `getByteProperty(String name)`
`double` | `getDoubleProperty(String name)`
`float` | `getFloatProperty(String name)`
`int` | `getIntProperty(String name)`
`String` | `getJMSCorrelationID()`
`byte[]` | `getJMSCorrelationIDAsBytes()`
`int` | `getJMSDeliveryMode()`
`javax.jms.Destination` | `getJMSDestination()`
`long` | `getJMSExpiration()`
`String` | `getJMSMessageID()`
`int` | `getJMSPriority()`
`boolean` | `getJMSRedelivered()`
`javax.jms.Destination` | `getJMSReplyTo()`
`long` | `getJMSTimestamp()`
`String` | `getJMSType()`
`long` | `getLongProperty(String name)`
`Object` | `getObjectProperty(String name)`
`Enumeration` | `getPropertyNames()`
`short` | `getShortProperty(String name)`
`String` | `getStringProperty(String name)`
`boolean` | `isOutdated()` Test whether a message has expired
`SpyMessage` | `myClone()` Clone the message
`boolean` | `propertyExists(String name)`
`void` | `readExternal(ObjectInput in)`
`static SpyMessage` | `readMessage(ObjectInput in)` Read a message
`void` | `setBooleanProperty(String name, boolean value)`
`void` | `setByteProperty(String name, byte value)`
`void` | `setDoubleProperty(String name, double value)`
`void` | `setFloatProperty(String name, float value)`
`void` | `setIntProperty(String name, int value)`
`void` | `setJMSCorrelationID(String correlationID)`
`void` | `setJMSCorrelationIDAsBytes(byte[] correlationID)`
`void` | `setJMSDeliveryMode(int deliveryMode)`
`void` | `setJMSDestination(javax.jms.Destination destination)`
`void` | `setJMSExpiration(long expiration)`
`void` | `setJMSMessageID(String id)`
`void` | `setJMSPriority(int priority)`
`void` | `setJMSRedelivered(boolean redelivered)`
`void` | `setJMSReplyTo(javax.jms.Destination replyTo)`
`void` | `setJMSTimestamp(long timestamp)`
`void` | `setJMSType(String type)`
`void` | `setLongProperty(String name, long value)`
`void` | `setObjectProperty(String name, Object value)`
`void` | `setReadOnlyMode()` Set the message to read only
`void` | `setShortProperty(String name, short value)`
`void` | `setStringProperty(String name, String value)`
`String` | `toString()`
`void` | `writeExternal(ObjectOutput out)`
`static void` | `writeMessage(SpyMessage message, ObjectOutput out)` Write a message

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### PROPERTY_SCHEDULED_DELIVERY

    public static final String PROPERTY_SCHEDULED_DELIVERY

  JBoss-vendor specific property for scheduling a JMS message. In milliseconds since January 1, 1970.

  See Also:
    Constant Field Values

### PROPERTY_REDELIVERY_DELAY

    public static final String PROPERTY_REDELIVERY_DELAY

  JBoss-vendor specific property specifying redelivery delay of a message. The message will be rescheduled for delivery from the time at which it was unacknowledged, plus the given period.

  See Also:
    Constant Field Values

### PROPERTY_REDELIVERY_COUNT

    public static final String PROPERTY_REDELIVERY_COUNT

  JBoss-vendor specific property for getting the count of redelivery attempts of a message.

  See Also:
    Constant Field Values

### PROPERTY_REDELIVERY_LIMIT

    public static final String PROPERTY_REDELIVERY_LIMIT

  JBoss-vendor specific property specifying the limit of redelivery attempts of a message. The message will be redelivered a given number of times. If not set, the container default is used.

  See Also:
    Constant Field Values

### OBJECT_MESS

    protected static final byte OBJECT_MESS

  An object message

  See Also:
    Constant Field Values

### BYTES_MESS

    protected static final byte BYTES_MESS

  An bytes message

  See Also:
    Constant Field Values

### MAP_MESS

    protected static final byte MAP_MESS

  A map message

  See Also:
    Constant Field Values

### TEXT_MESS

    protected static final byte TEXT_MESS

  A text message

  See Also:
    Constant Field Values

### STREAM_MESS

    protected static final byte STREAM_MESS

  A stream message

  See Also:
    Constant Field Values

### ENCAP_MESS

    protected static final byte ENCAP_MESS

  An encapsulated message

  See Also:
    Constant Field Values

### SPY_MESS

    protected static final byte SPY_MESS

  A plain message

  See Also:
    Constant Field Values

### BYTE

    protected static final int BYTE

  A byte property

  See Also:
    Constant Field Values

### SHORT

    protected static final int SHORT

  A short property

  See Also:
    Constant Field Values

### INT

    protected static final int INT

  An integer property

  See Also:
    Constant Field Values

### LONG

    protected static final int LONG

  A long property

  See Also:
    Constant Field Values

### FLOAT

    protected static final int FLOAT

  A float property

  See Also:
    Constant Field Values

### DOUBLE

    protected static final int DOUBLE

  A double property

  See Also:
    Constant Field Values

### BOOLEAN

    protected static final int BOOLEAN

  A boolean property

  See Also:
    Constant Field Values

### STRING

    protected static final int STRING

  A string property

  See Also:
    Constant Field Values

### OBJECT

    protected static final int OBJECT

  An object property

  See Also:
    Constant Field Values

### NULL

    protected static final int NULL

  A null property

  See Also:
    Constant Field Values

### header

    public SpyMessage.Header header

  The message header

### ack

    public transient AcknowledgementRequest ack

  The acknowledgement request for this message

### session

    public transient SpySession session

  The session for this message

Constructor Detail

### SpyMessage

    public SpyMessage()

Method Detail

### writeMessage

    public static void writeMessage(SpyMessage message,
                                    ObjectOutput out)
                             throws IOException

  Write a message

  Parameters:
    `message` - the message
    `out` - the output
  Throws:
    `IOException` - for any error

### readMessage

    public static SpyMessage readMessage(ObjectInput in)
                                  throws IOException

  Read a message

  Parameters:
    `in` - the input
  Returns:
    the message
  Throws:
    `IOException` - for any error

### clearBody

    public void clearBody()
                   throws javax.jms.JMSException

  Clear the message body

  Specified by:
    `clearBody` in interface `javax.jms.Message`
  Throws:
    `javax.jms.JMSException` - for any error

### acknowledge

    public void acknowledge()
                     throws javax.jms.JMSException

  Acknowledge a message

  Specified by:
    `acknowledge` in interface `javax.jms.Message`
  Throws:
    `javax.jms.JMSException` - for any error

### setReadOnlyMode

    public void setReadOnlyMode()

  Set the message to read only

### myClone

    public SpyMessage myClone()
                       throws javax.jms.JMSException

  Clone the message

  Returns:
    the cloned message
  Throws:
    `javax.jms.JMSException` - for any error

### copyProps

    public void copyProps(SpyMessage original)
                   throws javax.jms.JMSException

  Copy the properties

  Parameters:
    `original` - the message with original properties
  Throws:
    `javax.jms.JMSException` - for any error

### isOutdated

    public boolean isOutdated()

  Test whether a message has expired

  Returns:
    true when expired false otherwise

### doAcknowledge

    public void doAcknowledge()
                       throws javax.jms.JMSException

  Actually acknowledge a message

  Throws:
    `javax.jms.JMSException` - for any error

### doNegAcknowledge

    public void doNegAcknowledge()
                          throws javax.jms.JMSException

  Actually nack a message

  Throws:
    `javax.jms.JMSException` - for any error

### createAcknowledgementRequest

    public void createAcknowledgementRequest(int subscriptionId)

  Create an acknowledgement request for the message

### getAcknowledgementRequest

    public AcknowledgementRequest getAcknowledgementRequest(boolean isAck)
                                                     throws javax.jms.JMSException

  Get an acknowledgement request for the message

  Parameters:
    `isAck` - true for an ack, false for a nack
  Throws:
    `javax.jms.JMSException` - for any error

### compareTo

    public int compareTo(Object o)

  Specified by:
    `compareTo` in interface `Comparable`

### getJMSMessageID

    public String getJMSMessageID()

  Specified by:
    `getJMSMessageID` in interface `javax.jms.Message`

### setJMSMessageID

    public void setJMSMessageID(String id)
                         throws javax.jms.JMSException

  Specified by:
    `setJMSMessageID` in interface `javax.jms.Message`
  Throws:
    `javax.jms.JMSException`

### getJMSTimestamp

    public long getJMSTimestamp()

  Specified by:
    `getJMSTimestamp` in interface `javax.jms.Message`

### setJMSTimestamp

    public void setJMSTimestamp(long timestamp)
                         throws javax.jms.JMSException

  Specified by:
    `setJMSTimestamp` in interface `javax.jms.Message`
  Throws:
    `javax.jms.JMSException`

### getJMSCorrelationIDAsBytes

    public byte[] getJMSCorrelationIDAsBytes()
                                      throws javax.jms.JMSException

  Specified by:
    `getJMSCorrelationIDAsBytes` in interface `javax.jms.Message`
  Throws:
    `javax.jms.JMSException`

### setJMSCorrelationIDAsBytes

    public void setJMSCorrelationIDAsBytes(byte[] correlationID)
                                    throws javax.jms.JMSException

  Specified by:
    `setJMSCorrelationIDAsBytes` in interface `javax.jms.Message`
  Throws:
    `javax.jms.JMSException`

### setJMSCorrelationID

    public void setJMSCorrelationID(String correlationID)
                             throws javax.jms.JMSException

  Specified by:
    `setJMSCorrelationID` in interface `javax.jms.Message`
  Throws:
    `javax.jms.JMSException`

### getJMSCorrelationID

    public String getJMSCorrelationID()
                               throws javax.jms.JMSException

  Specified by:
    `getJMSCorrelationID` in interface `javax.jms.Message`
  Throws:
    `javax.jms.JMSException`

### getJMSReplyTo

    public javax.jms.Destination getJMSReplyTo()

  Specified by:
    `getJMSReplyTo` in interface `javax.jms.Message`

### setJMSReplyTo

    public void setJMSReplyTo(javax.jms.Destination replyTo)
                       throws javax.jms.JMSException

  Specified by:
    `setJMSReplyTo` in interface `javax.jms.Message`
  Throws:
    `javax.jms.JMSException`

### getJMSDestination

    public javax.jms.Destination getJMSDestination()

  Specified by:
    `getJMSDestination` in interface `javax.jms.Message`

### setJMSDestination

    public void setJMSDestination(javax.jms.Destination destination)
                           throws javax.jms.JMSException

  Specified by:
    `setJMSDestination` in interface `javax.jms.Message`
  Throws:
    `javax.jms.JMSException`

### getJMSDeliveryMode

    public int getJMSDeliveryMode()

  Specified by:
    `getJMSDeliveryMode` in interface `javax.jms.Message`

### setJMSDeliveryMode

    public void setJMSDeliveryMode(int deliveryMode)
                            throws javax.jms.JMSException

  Specified by:
    `setJMSDeliveryMode` in interface `javax.jms.Message`
  Throws:
    `javax.jms.JMSException`

### getJMSRedelivered

    public boolean getJMSRedelivered()

  Specified by:
    `getJMSRedelivered` in interface `javax.jms.Message`

### setJMSRedelivered

    public void setJMSRedelivered(boolean redelivered)
                           throws javax.jms.JMSException

  Specified by:
    `setJMSRedelivered` in interface `javax.jms.Message`
  Throws:
    `javax.jms.JMSException`

### getJMSType

    public String getJMSType()

  Specified by:
    `getJMSType` in interface `javax.jms.Message`

### setJMSType

    public void setJMSType(String type)
                    throws javax.jms.JMSException

  Specified by:
    `setJMSType` in interface `javax.jms.Message`
  Throws:
    `javax.jms.JMSException`

### getJMSExpiration

    public long getJMSExpiration()

  Specified by:
    `getJMSExpiration` in interface `javax.jms.Message`

### setJMSExpiration

    public void setJMSExpiration(long expiration)
                          throws javax.jms.JMSException

  Specified by:
    `setJMSExpiration` in interface `javax.jms.Message`
  Throws:
    `javax.jms.JMSException`

### getJMSPriority

    public int getJMSPriority()

  Specified by:
    `getJMSPriority` in interface `javax.jms.Message`

### setJMSPriority

    public void setJMSPriority(int priority)
                        throws javax.jms.JMSException

  Specified by:
    `setJMSPriority` in interface `javax.jms.Message`
  Throws:
    `javax.jms.JMSException`

### clearProperties

    public void clearProperties()
                         throws javax.jms.JMSException

  Specified by:
    `clearProperties` in interface `javax.jms.Message`
  Throws:
    `javax.jms.JMSException`

### propertyExists

    public boolean propertyExists(String name)
                           throws javax.jms.JMSException

  Specified by:
    `propertyExists` in interface `javax.jms.Message`
  Throws:
    `javax.jms.JMSException`

### getBooleanProperty

    public boolean getBooleanProperty(String name)
                               throws javax.jms.JMSException

  Specified by:
    `getBooleanProperty` in interface `javax.jms.Message`
  Throws:
    `javax.jms.JMSException`

### getByteProperty

    public byte getByteProperty(String name)
                         throws javax.jms.JMSException

  Specified by:
    `getByteProperty` in interface `javax.jms.Message`
  Throws:
    `javax.jms.JMSException`

### getShortProperty

    public short getShortProperty(String name)
                           throws javax.jms.JMSException

  Specified by:
    `getShortProperty` in interface `javax.jms.Message`
  Throws:
    `javax.jms.JMSException`

### getIntProperty

    public int getIntProperty(String name)
                       throws javax.jms.JMSException

  Specified by:
    `getIntProperty` in interface `javax.jms.Message`
  Throws:
    `javax.jms.JMSException`

### getLongProperty

    public long getLongProperty(String name)
                         throws javax.jms.JMSException

  Specified by:
    `getLongProperty` in interface `javax.jms.Message`
  Throws:
    `javax.jms.JMSException`

### getFloatProperty

    public float getFloatProperty(String name)
                           throws javax.jms.JMSException

  Specified by:
    `getFloatProperty` in interface `javax.jms.Message`
  Throws:
    `javax.jms.JMSException`

### getDoubleProperty

    public double getDoubleProperty(String name)
                             throws javax.jms.JMSException

  Specified by:
    `getDoubleProperty` in interface `javax.jms.Message`
  Throws:
    `javax.jms.JMSException`

### getStringProperty

    public String getStringProperty(String name)
                             throws javax.jms.JMSException

  Specified by:
    `getStringProperty` in interface `javax.jms.Message`
  Throws:
    `javax.jms.JMSException`

### getObjectProperty

    public Object getObjectProperty(String name)
                             throws javax.jms.JMSException

  Specified by:
    `getObjectProperty` in interface `javax.jms.Message`
  Throws:
    `javax.jms.JMSException`

### getPropertyNames

    public Enumeration getPropertyNames()
                                 throws javax.jms.JMSException

  Specified by:
    `getPropertyNames` in interface `javax.jms.Message`
  Throws:
    `javax.jms.JMSException`

### setBooleanProperty

    public void setBooleanProperty(String name,
                                   boolean value)
                            throws javax.jms.JMSException

  Specified by:
    `setBooleanProperty` in interface `javax.jms.Message`
  Throws:
    `javax.jms.JMSException`

### setByteProperty

    public void setByteProperty(String name,
                                byte value)
                         throws javax.jms.JMSException

  Specified by:
    `setByteProperty` in interface `javax.jms.Message`
  Throws:
    `javax.jms.JMSException`

### setShortProperty

    public void setShortProperty(String name,
                                 short value)
                          throws javax.jms.JMSException

  Specified by:
    `setShortProperty` in interface `javax.jms.Message`
  Throws:
    `javax.jms.JMSException`

### setIntProperty

    public void setIntProperty(String name,
                               int value)
                        throws javax.jms.JMSException

  Specified by:
    `setIntProperty` in interface `javax.jms.Message`
  Throws:
    `javax.jms.JMSException`

### setLongProperty

    public void setLongProperty(String name,
                                long value)
                         throws javax.jms.JMSException

  Specified by:
    `setLongProperty` in interface `javax.jms.Message`
  Throws:
    `javax.jms.JMSException`

### setFloatProperty

    public void setFloatProperty(String name,
                                 float value)
                          throws javax.jms.JMSException

  Specified by:
    `setFloatProperty` in interface `javax.jms.Message`
  Throws:
    `javax.jms.JMSException`

### setDoubleProperty

    public void setDoubleProperty(String name,
                                  double value)
                           throws javax.jms.JMSException

  Specified by:
    `setDoubleProperty` in interface `javax.jms.Message`
  Throws:
    `javax.jms.JMSException`

### setStringProperty

    public void setStringProperty(String name,
                                  String value)
                           throws javax.jms.JMSException

  Specified by:
    `setStringProperty` in interface `javax.jms.Message`
  Throws:
    `javax.jms.JMSException`

### setObjectProperty

    public void setObjectProperty(String name,
                                  Object value)
                           throws javax.jms.JMSException

  Specified by:
    `setObjectProperty` in interface `javax.jms.Message`
  Throws:
    `javax.jms.JMSException`

### writeExternal

    public void writeExternal(ObjectOutput out)
                       throws IOException

  Specified by:
    `writeExternal` in interface `Externalizable`
  Throws:
    `IOException`

### readExternal

    public void readExternal(ObjectInput in)
                      throws IOException,
                             ClassNotFoundException

  Specified by:
    `readExternal` in interface `Externalizable`
  Throws:
    `IOException`
    `ClassNotFoundException`

### toString

    public String toString()

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2002 JBoss Group, LLC. All Rights Reserved.