Package com.sun.ts.tests.jms.common
Class MessageTestImpl
java.lang.Object
com.sun.ts.tests.jms.common.MessageTestImpl
- All Implemented Interfaces:
jakarta.jms.Message
- Direct Known Subclasses:
BytesMessageTestImpl
,InvalidTextMessageTestImpl
,MapMessageTestImpl
,ObjectMessageTestImpl
,StreamMessageTestImpl
,TextMessageTestImpl
Class Declaration.
- Version:
- 1.2, 09/26/00
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected boolean
boolean
protected boolean
Fields inherited from interface jakarta.jms.Message
DEFAULT_DELIVERY_DELAY, DEFAULT_DELIVERY_MODE, DEFAULT_PRIORITY, DEFAULT_TIME_TO_LIVE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Dummy method for acknowledgeprotected void
void
Dummy method for clearvoid
Method Declaration.<T> T
Returns the message body as an object of the specified type.boolean
getBooleanProperty
(String name) Method Declaration.byte
getByteProperty
(String name) Method Declaration.double
getDoubleProperty
(String name) Method Declaration.float
getFloatProperty
(String name) Method Declaration.int
getIntProperty
(String name) Method Declaration.Method Declaration.byte[]
Method Declaration.int
Method Declaration.long
Method Declaration.jakarta.jms.Destination
Method Declaration.long
Method Declaration.Method Declaration.int
Method Declaration.boolean
Method Declaration.jakarta.jms.Destination
Method Declaration.long
Method Declaration.Method Declaration.long
getLongProperty
(String name) Method Declaration.getObjectProperty
(String name) Method Declaration.Method Declaration.short
getShortProperty
(String name) Method Declaration.getStringProperty
(String name) Method Declaration.boolean
Returns whether the message body is capable of being assigned to the specified type.boolean
propertyExists
(String name) Method Declaration.void
setBooleanProperty
(String name, boolean value) Method Declaration.protected void
setBufferIsDirty
(boolean state) void
setByteProperty
(String name, byte value) Method Declaration.void
setDoubleProperty
(String name, double value) Method Declaration.void
setFloatProperty
(String name, float value) Method Declaration.void
setIntProperty
(String name, int value) Method Declaration.void
setJMSCorrelationID
(String correlationID) Method Declaration.void
setJMSCorrelationIDAsBytes
(byte[] correlationID) Method Declaration.void
setJMSDeliveryMode
(int deliveryMode) Method Declaration.void
setJMSDeliveryTime
(long deliveryTime) Method Declaration.void
setJMSDestination
(jakarta.jms.Destination destination) Method Declaration.void
setJMSExpiration
(long expiration) Method Declaration.void
Method Declaration.void
setJMSPriority
(int priority) Method Declaration.void
setJMSRedelivered
(boolean redelivered) Method Declaration.void
setJMSReplyTo
(jakarta.jms.Destination replyTo) Method Declaration.void
setJMSTimestamp
(long timestamp) Method Declaration.void
setJMSType
(String type) Method Declaration.void
setLongProperty
(String name, long value) Method Declaration.void
setObjectProperty
(String name, Object value) Method Declaration.void
setShortProperty
(String name, short value) Method Declaration.void
setStringProperty
(String name, String value) Method Declaration.
-
Field Details
-
dummy
public boolean dummy -
bufferIsDirty
protected boolean bufferIsDirty -
readMode
protected boolean readMode
-
-
Constructor Details
-
MessageTestImpl
public MessageTestImpl()Constructor
-
-
Method Details
-
getJMSMessageID
Method Declaration.- Specified by:
getJMSMessageID
in interfacejakarta.jms.Message
- Returns:
- Throws:
jakarta.jms.JMSException
-
setJMSMessageID
Method Declaration.- Specified by:
setJMSMessageID
in interfacejakarta.jms.Message
- Parameters:
id
-- Throws:
jakarta.jms.JMSException
-
getJMSTimestamp
public long getJMSTimestamp() throws jakarta.jms.JMSExceptionMethod Declaration.- Specified by:
getJMSTimestamp
in interfacejakarta.jms.Message
- Returns:
- Throws:
jakarta.jms.JMSException
-
setJMSTimestamp
public void setJMSTimestamp(long timestamp) throws jakarta.jms.JMSException Method Declaration.- Specified by:
setJMSTimestamp
in interfacejakarta.jms.Message
- Parameters:
timestamp
-- Throws:
jakarta.jms.JMSException
-
getJMSCorrelationIDAsBytes
public byte[] getJMSCorrelationIDAsBytes() throws jakarta.jms.JMSExceptionMethod Declaration.- Specified by:
getJMSCorrelationIDAsBytes
in interfacejakarta.jms.Message
- Returns:
- Throws:
jakarta.jms.JMSException
-
setJMSCorrelationIDAsBytes
public void setJMSCorrelationIDAsBytes(byte[] correlationID) throws jakarta.jms.JMSException Method Declaration.- Specified by:
setJMSCorrelationIDAsBytes
in interfacejakarta.jms.Message
- Parameters:
correlationID
-- Throws:
jakarta.jms.JMSException
-
setJMSCorrelationID
Method Declaration.- Specified by:
setJMSCorrelationID
in interfacejakarta.jms.Message
- Parameters:
correlationID
-- Throws:
jakarta.jms.JMSException
-
getJMSCorrelationID
Method Declaration.- Specified by:
getJMSCorrelationID
in interfacejakarta.jms.Message
- Returns:
- Throws:
jakarta.jms.JMSException
-
getJMSReplyTo
public jakarta.jms.Destination getJMSReplyTo() throws jakarta.jms.JMSExceptionMethod Declaration.- Specified by:
getJMSReplyTo
in interfacejakarta.jms.Message
- Returns:
- Throws:
jakarta.jms.JMSException
-
setJMSReplyTo
public void setJMSReplyTo(jakarta.jms.Destination replyTo) throws jakarta.jms.JMSException Method Declaration.- Specified by:
setJMSReplyTo
in interfacejakarta.jms.Message
- Parameters:
replyTo
-- Throws:
jakarta.jms.JMSException
-
getJMSDestination
public jakarta.jms.Destination getJMSDestination() throws jakarta.jms.JMSExceptionMethod Declaration.- Specified by:
getJMSDestination
in interfacejakarta.jms.Message
- Returns:
- Throws:
jakarta.jms.JMSException
-
setJMSDestination
public void setJMSDestination(jakarta.jms.Destination destination) throws jakarta.jms.JMSException Method Declaration.- Specified by:
setJMSDestination
in interfacejakarta.jms.Message
- Parameters:
destination
-- Throws:
jakarta.jms.JMSException
-
getJMSDeliveryMode
public int getJMSDeliveryMode() throws jakarta.jms.JMSExceptionMethod Declaration.- Specified by:
getJMSDeliveryMode
in interfacejakarta.jms.Message
- Returns:
- Throws:
jakarta.jms.JMSException
-
setJMSDeliveryTime
public void setJMSDeliveryTime(long deliveryTime) throws jakarta.jms.JMSException Method Declaration.- Specified by:
setJMSDeliveryTime
in interfacejakarta.jms.Message
- Parameters:
deliveryTime
-- Throws:
jakarta.jms.JMSException
-
getJMSDeliveryTime
public long getJMSDeliveryTime() throws jakarta.jms.JMSExceptionMethod Declaration.- Specified by:
getJMSDeliveryTime
in interfacejakarta.jms.Message
- Returns:
- Throws:
jakarta.jms.JMSException
-
setJMSDeliveryMode
public void setJMSDeliveryMode(int deliveryMode) throws jakarta.jms.JMSException Method Declaration.- Specified by:
setJMSDeliveryMode
in interfacejakarta.jms.Message
- Parameters:
deliveryMode
-- Throws:
jakarta.jms.JMSException
-
getJMSRedelivered
public boolean getJMSRedelivered() throws jakarta.jms.JMSExceptionMethod Declaration.- Specified by:
getJMSRedelivered
in interfacejakarta.jms.Message
- Returns:
- Throws:
jakarta.jms.JMSException
-
setJMSRedelivered
public void setJMSRedelivered(boolean redelivered) throws jakarta.jms.JMSException Method Declaration.- Specified by:
setJMSRedelivered
in interfacejakarta.jms.Message
- Parameters:
redelivered
-- Throws:
jakarta.jms.JMSException
-
getJMSType
Method Declaration.- Specified by:
getJMSType
in interfacejakarta.jms.Message
- Returns:
- Throws:
jakarta.jms.JMSException
-
setJMSType
Method Declaration.- Specified by:
setJMSType
in interfacejakarta.jms.Message
- Parameters:
type
-- Throws:
jakarta.jms.JMSException
-
getJMSExpiration
public long getJMSExpiration() throws jakarta.jms.JMSExceptionMethod Declaration.- Specified by:
getJMSExpiration
in interfacejakarta.jms.Message
- Returns:
- Throws:
jakarta.jms.JMSException
-
setJMSExpiration
public void setJMSExpiration(long expiration) throws jakarta.jms.JMSException Method Declaration.- Specified by:
setJMSExpiration
in interfacejakarta.jms.Message
- Parameters:
expiration
-- Throws:
jakarta.jms.JMSException
-
getJMSPriority
public int getJMSPriority() throws jakarta.jms.JMSExceptionMethod Declaration.- Specified by:
getJMSPriority
in interfacejakarta.jms.Message
- Returns:
- Throws:
jakarta.jms.JMSException
-
setJMSPriority
public void setJMSPriority(int priority) throws jakarta.jms.JMSException Method Declaration.- Specified by:
setJMSPriority
in interfacejakarta.jms.Message
- Parameters:
priority
-- Throws:
jakarta.jms.JMSException
-
clearProperties
public void clearProperties() throws jakarta.jms.JMSExceptionMethod Declaration.- Specified by:
clearProperties
in interfacejakarta.jms.Message
- Throws:
jakarta.jms.JMSException
-
propertyExists
Method Declaration.- Specified by:
propertyExists
in interfacejakarta.jms.Message
- Parameters:
name
-- Returns:
- Throws:
jakarta.jms.JMSException
-
getBooleanProperty
Method Declaration.- Specified by:
getBooleanProperty
in interfacejakarta.jms.Message
- Parameters:
name
-- Returns:
- Throws:
jakarta.jms.JMSException
-
getByteProperty
Method Declaration.- Specified by:
getByteProperty
in interfacejakarta.jms.Message
- Parameters:
name
-- Returns:
- Throws:
jakarta.jms.JMSException
-
getShortProperty
Method Declaration.- Specified by:
getShortProperty
in interfacejakarta.jms.Message
- Parameters:
name
-- Returns:
- Throws:
jakarta.jms.JMSException
-
getIntProperty
Method Declaration.- Specified by:
getIntProperty
in interfacejakarta.jms.Message
- Parameters:
name
-- Returns:
- Throws:
jakarta.jms.JMSException
-
getLongProperty
Method Declaration.- Specified by:
getLongProperty
in interfacejakarta.jms.Message
- Parameters:
name
-- Returns:
- Throws:
jakarta.jms.JMSException
-
getFloatProperty
Method Declaration.- Specified by:
getFloatProperty
in interfacejakarta.jms.Message
- Parameters:
name
-- Returns:
- Throws:
jakarta.jms.JMSException
-
getDoubleProperty
Method Declaration.- Specified by:
getDoubleProperty
in interfacejakarta.jms.Message
- Parameters:
name
-- Returns:
- Throws:
jakarta.jms.JMSException
-
getStringProperty
Method Declaration.- Specified by:
getStringProperty
in interfacejakarta.jms.Message
- Parameters:
name
-- Returns:
- Throws:
jakarta.jms.JMSException
-
getObjectProperty
Method Declaration.- Specified by:
getObjectProperty
in interfacejakarta.jms.Message
- Parameters:
name
-- Returns:
- Throws:
jakarta.jms.JMSException
-
getPropertyNames
Method Declaration.- Specified by:
getPropertyNames
in interfacejakarta.jms.Message
- Returns:
- Throws:
jakarta.jms.JMSException
-
setBooleanProperty
Method Declaration.- Specified by:
setBooleanProperty
in interfacejakarta.jms.Message
- Parameters:
name
-value
-- Throws:
jakarta.jms.JMSException
-
setByteProperty
Method Declaration.- Specified by:
setByteProperty
in interfacejakarta.jms.Message
- Parameters:
name
-value
-- Throws:
jakarta.jms.JMSException
-
setShortProperty
Method Declaration.- Specified by:
setShortProperty
in interfacejakarta.jms.Message
- Parameters:
name
-value
-- Throws:
jakarta.jms.JMSException
-
setIntProperty
Method Declaration.- Specified by:
setIntProperty
in interfacejakarta.jms.Message
- Parameters:
name
-value
-- Throws:
jakarta.jms.JMSException
-
setLongProperty
Method Declaration.- Specified by:
setLongProperty
in interfacejakarta.jms.Message
- Parameters:
name
-value
-- Throws:
jakarta.jms.JMSException
-
setFloatProperty
Method Declaration.- Specified by:
setFloatProperty
in interfacejakarta.jms.Message
- Parameters:
name
-value
-- Throws:
jakarta.jms.JMSException
-
setDoubleProperty
Method Declaration.- Specified by:
setDoubleProperty
in interfacejakarta.jms.Message
- Parameters:
name
-value
-- Throws:
jakarta.jms.JMSException
-
setStringProperty
Method Declaration.- Specified by:
setStringProperty
in interfacejakarta.jms.Message
- Parameters:
name
-value
-- Throws:
jakarta.jms.JMSException
-
setObjectProperty
Method Declaration.- Specified by:
setObjectProperty
in interfacejakarta.jms.Message
- Parameters:
name
-value
-- Throws:
jakarta.jms.JMSException
-
acknowledge
public void acknowledge() throws jakarta.jms.JMSExceptionDummy method for acknowledge- Specified by:
acknowledge
in interfacejakarta.jms.Message
- Throws:
jakarta.jms.JMSException
-
clearBody
public void clearBody() throws jakarta.jms.JMSExceptionDummy method for clear- Specified by:
clearBody
in interfacejakarta.jms.Message
- Throws:
jakarta.jms.JMSException
-
setBufferIsDirty
protected void setBufferIsDirty(boolean state) -
checkReadAccess
protected void checkReadAccess() throws jakarta.jms.JMSException- Throws:
jakarta.jms.JMSException
-
getBody
Returns the message body as an object of the specified type.- Specified by:
getBody
in interfacejakarta.jms.Message
- Parameters:
c
- - The type to which the message body will be assigned.- Returns:
- the message body
- Throws:
jakarta.jms.JMSException
- if JMS fails to read message due to some internal JMS error.jakarta.jms.MessageFormatException
- if this type conversion is invalid.
-
isBodyAssignableTo
Returns whether the message body is capable of being assigned to the specified type.- Specified by:
isBodyAssignableTo
in interfacejakarta.jms.Message
- Parameters:
c
- - The specified type.- Returns:
- whether the message body is capable of being assigned to the specified type
- Throws:
jakarta.jms.JMSException
- if a JMS error occurs.
-