Sunday, 5 August 2018

JMS: Message interface

It is the root interface for all the JMS messages.

Message interface provide methods to
a. Get and set the message id
b. Get and set correlation id
c. Get and set the destination where this message should go
d. Get and set the priority of jms message
e. Get and set the properties
f. Clear the properties
g. Clear the body of the message etc.,


public interface Message {

    static final int DEFAULT_DELIVERY_MODE = DeliveryMode.PERSISTENT;

    static final int DEFAULT_PRIORITY = 4;

    static final long DEFAULT_TIME_TO_LIVE = 0;

    String getJMSMessageID() throws JMSException;

    void setJMSMessageID(String id) throws JMSException;

    long getJMSTimestamp() throws JMSException;

    void setJMSTimestamp(long timestamp) throws JMSException;

    byte[] getJMSCorrelationIDAsBytes() throws JMSException;

    void setJMSCorrelationIDAsBytes(byte[] correlationID) throws JMSException;

    void setJMSCorrelationID(String correlationID) throws JMSException;

    String getJMSCorrelationID() throws JMSException;

    Destination getJMSReplyTo() throws JMSException;

    void setJMSReplyTo(Destination replyTo) throws JMSException;

    Destination getJMSDestination() throws JMSException;

    void setJMSDestination(Destination destination) throws JMSException;

    int getJMSDeliveryMode() throws JMSException;

    void setJMSDeliveryMode(int deliveryMode) throws JMSException;

    boolean getJMSRedelivered() throws JMSException;

    void setJMSRedelivered(boolean redelivered) throws JMSException;

    String getJMSType() throws JMSException;

    void setJMSType(String type) throws JMSException;

    long getJMSExpiration() throws JMSException;

    void setJMSExpiration(long expiration) throws JMSException;

    int getJMSPriority() throws JMSException;

    void setJMSPriority(int priority) throws JMSException;

    void clearProperties() throws JMSException;

    boolean propertyExists(String name) throws JMSException;

    boolean getBooleanProperty(String name) throws JMSException;

    byte getByteProperty(String name) throws JMSException;

    short getShortProperty(String name) throws JMSException;

    int getIntProperty(String name) throws JMSException;

    long getLongProperty(String name) throws JMSException;

    float getFloatProperty(String name) throws JMSException;

    double getDoubleProperty(String name) throws JMSException;

    String getStringProperty(String name) throws JMSException;

    Object getObjectProperty(String name) throws JMSException;

    Enumeration getPropertyNames() throws JMSException;

    void setBooleanProperty(String name, boolean value) throws JMSException;

    void setByteProperty(String name, byte value) throws JMSException;

    void setShortProperty(String name, short value) throws JMSException;

    void setIntProperty(String name, int value) throws JMSException;

    void setLongProperty(String name, long value) throws JMSException;

    void setFloatProperty(String name, float value) throws JMSException;

    void setDoubleProperty(String name, double value) throws JMSException;

    void setStringProperty(String name, String value) throws JMSException;

    void setObjectProperty(String name, Object value) throws JMSException;

    void acknowledge() throws JMSException;

    void clearBody() throws JMSException;
}



Previous                                                 Next                                                 Home

No comments:

Post a Comment