KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > presumo > jms > plugin > MessageQueue


1 /**
2  * This file is part of Presumo.
3  *
4  * Presumo is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * (at your option) any later version.
8  *
9  * Presumo is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with Presumo; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  *
18  *
19  * Copyright 2001 Dan Greff
20  */

21 package com.presumo.jms.plugin;
22
23 import com.presumo.jms.message.JmsMessage;
24 import java.io.IOException JavaDoc;
25
26 /**
27  * @author Dan Greff
28  */

29 public interface MessageQueue
30 {
31   /**
32    * Implementations must implement this method in order to indicate if
33    * the given message queue stores persistent message in non-volatile
34    * storage.
35    */

36   public boolean isPersistent();
37   
38   public int size();
39   
40   public void push(JmsMessage msg) throws IOException JavaDoc;
41   
42   public void push(JmsMessage [] msgs) throws IOException JavaDoc;
43   
44   public JmsMessage getNext() throws IOException JavaDoc;
45   
46   public JmsMessage [] getNext(int batchsize) throws IOException JavaDoc;
47   
48   public void delete(String JavaDoc key) throws IOException JavaDoc;
49   
50   public void delete(String JavaDoc [] keys) throws IOException JavaDoc;
51   
52   public void close() throws IOException JavaDoc;
53 }
Popular Tags