⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 message.java

📁 JAVA 消息服务(JMS)定义了Java 中访问消息中间件的接口,里边有实现消息服务的基础源码,可以开发高级应用
💻 JAVA
📖 第 1 页 / 共 5 页
字号:
      *        * @exception JMSException if the JMS provider fails to set the       *                         delivery mode due to some internal error.      *        * @see javax.jms.Message#getJMSDeliveryMode()      * @see javax.jms.DeliveryMode      */      void     setJMSDeliveryMode(int deliveryMode) throws JMSException;    /** Gets an indication of whether this message is being redelivered.      *      * <P>If a client receives a message with the <CODE>JMSRedelivered</CODE>       * field set,      * it is likely, but not guaranteed, that this message was delivered      * earlier but that its receipt was not acknowledged      * at that time.      *      * @return true if this message is being redelivered      *        * @exception JMSException if the JMS provider fails to get the redelivered      *                         state due to some internal error.      *      * @see javax.jms.Message#setJMSRedelivered(boolean)      */      boolean    getJMSRedelivered() throws JMSException;      /** Specifies whether this message is being redelivered.      *        * <P>This field is set at the time the message is delivered. This      * method can be used to change the value for a message that has      * been received.      *      * @param redelivered an indication of whether this message is being      * redelivered      *        * @exception JMSException if the JMS provider fails to set the redelivered      *                         state due to some internal error.      *      * @see javax.jms.Message#getJMSRedelivered()      */      void    setJMSRedelivered(boolean redelivered) throws JMSException;    /** Gets the message type identifier supplied by the client when the      * message was sent.      *      * @return the message type      *        * @exception JMSException if the JMS provider fails to get the message       *                         type due to some internal error.      *      * @see javax.jms.Message#setJMSType(String)      */           String    getJMSType() throws JMSException;    /** Sets the message type.      *      * <P>Some JMS providers use a message repository that contains the       * definitions of messages sent by applications. The <CODE>JMSType</CODE>       * header field may reference a message's definition in the provider's      * repository.      *      * <P>The JMS API does not define a standard message definition repository,      * nor does it define a naming policy for the definitions it contains.       *      * <P>Some messaging systems require that a message type definition for       * each application message be created and that each message specify its       * type. In order to work with such JMS providers, JMS clients should       * assign a value to <CODE>JMSType</CODE>, whether the application makes       * use of it or not. This ensures that the field is properly set for those       * providers that require it.      *      * <P>To ensure portability, JMS clients should use symbolic values for       * <CODE>JMSType</CODE> that can be configured at installation time to the       * values defined in the current provider's message repository. If string       * literals are used, they may not be valid type names for some JMS       * providers.      *      * @param type the message type      *        * @exception JMSException if the JMS provider fails to set the message       *                         type due to some internal error.      *      * @see javax.jms.Message#getJMSType()      */    void     setJMSType(String type) throws JMSException;    /** Gets the message's expiration value.      *        * <P>When a message is sent, the <CODE>JMSExpiration</CODE> header field       * is left unassigned. After completion of the <CODE>send</CODE> or       * <CODE>publish</CODE> method, it holds the expiration time of the      * message. This is the sum of the time-to-live value specified by the      * client and the GMT at the time of the <CODE>send</CODE> or       * <CODE>publish</CODE>.      *      * <P>If the time-to-live is specified as zero, <CODE>JMSExpiration</CODE>       * is set to zero to indicate that the message does not expire.      *      * <P>When a message's expiration time is reached, a provider should      * discard it. The JMS API does not define any form of notification of       * message expiration.      *      * <P>Clients should not receive messages that have expired; however,      * the JMS API does not guarantee that this will not happen.      *      * @return the time the message expires, which is the sum of the      * time-to-live value specified by the client and the GMT at the      * time of the send      *        * @exception JMSException if the JMS provider fails to get the message       *                         expiration due to some internal error.      *      * @see javax.jms.Message#setJMSExpiration(long)      */      long    getJMSExpiration() throws JMSException;      /** Sets the message's expiration value.      *      * <P>JMS providers set this field when a message is sent. This method       * can be used to change the value for a message that has been received.      *        * @param expiration the message's expiration time      *        * @exception JMSException if the JMS provider fails to set the message       *                         expiration due to some internal error.      *      * @see javax.jms.Message#getJMSExpiration()       */     void    setJMSExpiration(long expiration) throws JMSException;    /** Gets the message priority level.      *        * <P>The JMS API defines ten levels of priority value, with 0 as the       * lowest      * priority and 9 as the highest. In addition, clients should consider      * priorities 0-4 as gradations of normal priority and priorities 5-9      * as gradations of expedited priority.      *        * <P>The JMS API does not require that a provider strictly implement       * priority       * ordering of messages; however, it should do its best to deliver       * expedited messages ahead of normal messages.      *        * @return the default message priority      *        * @exception JMSException if the JMS provider fails to get the message       *                         priority due to some internal error.      *      * @see javax.jms.Message#setJMSPriority(int)       */     int    getJMSPriority() throws JMSException;    /** Sets the priority level for this message.      *        * <P>JMS providers set this field when a message is sent. This method       * can be used to change the value for a message that has been received.      *      * @param priority the priority of this message      *        * @exception JMSException if the JMS provider fails to set the message       *                         priority due to some internal error.      *      * @see javax.jms.Message#getJMSPriority()       */     void    setJMSPriority(int priority) throws JMSException;    /** Clears a message's properties.      *      * <P>The message's header fields and body are not cleared.      *      * @exception JMSException if the JMS provider fails to clear the message       *                         properties due to some internal error.      */     void    clearProperties() throws JMSException;    /** Indicates whether a property value exists.      *      * @param name the name of the property to test      *      * @return true if the property exists      *        * @exception JMSException if the JMS provider fails to determine if the       *                         property exists due to some internal error.      */    boolean    propertyExists(String name) throws JMSException;    /** Returns the value of the <CODE>boolean</CODE> property with the        * specified name.      *        * @param name the name of the <CODE>boolean</CODE> property      *        * @return the <CODE>boolean</CODE> property value for the specified name      *        * @exception JMSException if the JMS provider fails to get the property      *                         value due to some internal error.      * @exception MessageFormatException if this type conversion is invalid.       */     boolean    getBooleanProperty(String name) throws JMSException;    /** Returns the value of the <CODE>byte</CODE> property with the specified       * name.      *        * @param name the name of the <CODE>byte</CODE> property      *        * @return the <CODE>byte</CODE> property value for the specified name      *        * @exception JMSException if the JMS provider fails to get the property      *                         value due to some internal error.      * @exception MessageFormatException if this type conversion is invalid.       */     byte    getByteProperty(String name) throws JMSException;    /** Returns the value of the <CODE>short</CODE> property with the specified       * name.      *      * @param name the name of the <CODE>short</CODE> property      *      * @return the <CODE>short</CODE> property value for the specified name      *      * @exception JMSException if the JMS provider fails to get the property      *                         value due to some internal error.      * @exception MessageFormatException if this type conversion is invalid.      */       short    getShortProperty(String name) throws JMSException;      /** Returns the value of the <CODE>int</CODE> property with the specified       * name.      *        * @param name the name of the <CODE>int</CODE> property      *        * @return the <CODE>int</CODE> property value for the specified name      *        * @exception JMSException if the JMS provider fails to get the property      *                         value due to some internal error.      * @exception MessageFormatException if this type conversion is invalid.      */     int    getIntProperty(String name) throws JMSException;    /** Returns the value of the <CODE>long</CODE> property with the specified       * name.      *        * @param name the name of the <CODE>long</CODE> property      *        * @return the <CODE>long</CODE> property value for the specified name      *        * @exception JMSException if the JMS provider fails to get the property      *                         value due to some internal error.      * @exception MessageFormatException if this type conversion is invalid.      */     long    getLongProperty(String name) throws JMSException;    /** Returns the value of the <CODE>float</CODE> property with the specified 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -