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

📄 messagecache.java

📁 一个java方面的消息订阅发送的源码
💻 JAVA
字号:
package org.exolab.jms.messagemgr;

import java.sql.Connection;
import javax.jms.JMSException;

import org.exolab.jms.message.MessageImpl;


/**
 * MessageCache is responsible for managing a collection of messages.
 * Messages in the cache are referenced via {@link MessageRef} instances
 *
 * @version     $Revision: 1.2 $ $Date: 2005/03/18 03:58:39 $
 * @author      <a href="mailto:tma@netspace.net.au">Tim Anderson</a>
 */
public interface MessageCache {

    /**
     * Add a reference and its corresponding message to the cache
     *
     * @param reference the reference to the message
     * @param message the message
     */
    void addMessage(MessageRef reference, MessageImpl message);

    /**
     * Adds a message reference to the cache
     *
     * @param reference the message reference to add
     */
    void addMessageRef(MessageRef reference);

    /**
     * Returns a message reference, given its identifier
     *
     * @param messageId the message identifier
     * @return the message reference associated with <code>messageId</code>,
     * or <code>null</code>  if none exists
     */
    MessageRef getMessageRef(String messageId);

    /**
     * Returns the message corresponding to the specified reference
     *
     * @param reference the message reference
     * @return the associated message, or <code>null</code> if none exists
     * @throws JMSException for any error
     */
    MessageImpl getMessage(MessageRef reference)
            throws JMSException;

    /**
     * Destroys the message corresponding to the reference
     *
     * @throws JMSException for any error
     */
    void destroy(MessageRef reference) throws JMSException;

    /**
     * Destroys the message corresponding to the reference
     *
     * @param connection the database connection to use
     * @throws JMSException for any error
     */
    void destroy(MessageRef reference, Connection connection)
            throws JMSException;

}

⌨️ 快捷键说明

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