KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > rift > coad > daemon > messageservice > MessageService


1 /*
2  * MessageQueueClient: The message queue client library
3  * Copyright (C) 2006 Rift IT Contracting
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18  *
19  * MessageService.java
20  */

21
22 // package path
23
package com.rift.coad.daemon.messageservice;
24
25
26 // java imports
27
import java.rmi.Remote JavaDoc;
28 import java.rmi.RemoteException JavaDoc;
29 import java.util.List JavaDoc;
30
31
32 /**
33  * The management interface for the message service.
34  *
35  * @author Brett Chaldecott
36  */

37 public interface MessageService extends Remote JavaDoc{
38     
39     /**
40      * The jndi of the message service.
41      */

42     public final static String JavaDoc JNDI_URL = "message/MessageService";
43     
44     /**
45      * This method returns the thread pool size.
46      *
47      * @return The size of the thread pool.
48      * @exception RemoteException
49      * @exception MessageServiceException
50      */

51     public int getThreadPoolSize() throws RemoteException JavaDoc,
52             MessageServiceException;
53     
54     
55     /**
56      * This method sets the size of the thread pool.
57      *
58      * @param size The new size of the thread pool.
59      * @exception RemoteException
60      * @exception MessageServiceException
61      */

62     public void setThreadPoolSize(int size) throws RemoteException JavaDoc,
63             MessageServiceException;
64     
65     
66     /**
67      * This method lists the named queues.
68      *
69      * @return The list of named queues.
70      * @exception RemoteException
71      * @exception MessageServiceException
72      */

73     public List JavaDoc listNamedQueues() throws RemoteException JavaDoc,
74             MessageServiceException;
75     
76     
77     /**
78      * This method returns the list of messages in the named queue.
79      *
80      * @return The list of messages for this queue.
81      * @param queueName The name of the queue to list messages for.
82      * @exception RemoteException
83      * @exception MessageServiceException
84      */

85     public List JavaDoc listMessagesForNamedQueue(String JavaDoc queueName) throws
86             RemoteException JavaDoc, MessageServiceException;
87     
88     
89     /**
90      * This purges the messages from the named queue
91      *
92      * @param queueName The name of the queue to purge.
93      * @exception RemoteException
94      * @exception MessageServiceException
95      */

96     public void purgeNamedQueue(String JavaDoc queueName) throws RemoteException JavaDoc,
97             MessageServiceException;
98 }
99
Popular Tags