KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > roller > model > PingQueueManager


1 /*
2  * Copyright (c) 2005
3  * Anil R. Gangolli. All rights reserved.
4  *
5  * Distributed with the Roller Weblogger Project under the terms of the Roller Software
6  * License
7  */

8
9 package org.roller.model;
10
11 import org.roller.RollerException;
12 import org.roller.pojos.AutoPingData;
13 import org.roller.pojos.PingQueueEntryData;
14 import org.roller.pojos.WebsiteData;
15 import org.roller.pojos.PingTargetData;
16
17 import java.io.Serializable JavaDoc;
18 import java.util.List JavaDoc;
19
20 /**
21  * PingQueueManager. This interface describes the manager for the weblog update ping request queue. The queue is
22  * processed by the <code>PingQueueProcesssor</code> and <code>PingQueueTask</code> components in the application
23  * layer.
24  */

25 public interface PingQueueManager extends Serializable JavaDoc
26 {
27     /**
28      * Release all resources associated with Roller session.
29      */

30     public void release();
31
32     /**
33      * Add a new persistent entry to the queue. If the queue already contains an entry for the ping target and website
34      * specified by this auto ping configuration, a new one will not be added.
35      *
36      * @param autoPing auto ping configuration for the ping request to be queued.
37      */

38     public void addQueueEntry(AutoPingData autoPing) throws RollerException;
39
40     /**
41      * Retrieve an entry from the queue.
42      *
43      * @param id the unique id of the entry.
44      * @return the queue entry with the specified id.
45      * @throws RollerException
46      */

47     public PingQueueEntryData retrieveQueueEntry(String JavaDoc id) throws RollerException;
48
49     /**
50      * Store the given queue entry.
51      *
52      * @param pingQueueEntry update the given queue entry
53      * @throws RollerException
54      */

55     public void storeQueueEntry(PingQueueEntryData pingQueueEntry) throws RollerException;
56
57     /**
58      * Remove a queue entry by id.
59      *
60      * @param id the unique id of the entry to be removed.
61      * @throws RollerException
62      */

63     public void removeQueueEntry(String JavaDoc id) throws RollerException;
64
65     /**
66      * Remove a queue entry.
67      *
68      * @param pingQueueEntry the entry to be removed.
69      * @throws RollerException
70      */

71     public void removeQueueEntry(PingQueueEntryData pingQueueEntry) throws RollerException;
72
73     /**
74      * Drop the queue. Removes all elements from the queue.
75      *
76      * @throws RollerException
77      */

78     public void dropQueue() throws RollerException;
79
80     /**
81      * Get all of the queue entries.
82      *
83      * @return the queue as a <code>List</code> of {@link PingQueueEntryData} objects.
84      * @throws RollerException
85      */

86     public List JavaDoc getAllQueueEntries() throws RollerException;
87
88     /**
89      * Remove all of the queue entries that reference the given ping target. This is used when the ping target is being
90      * deleted (application-level cascading).
91      *
92      * @param pingTarget the ping target for which queue entries are to be removed
93      */

94     public void removeQueueEntriesByPingTarget(PingTargetData pingTarget) throws RollerException;
95
96     /**
97      * Remove all of the queue entries that reference the given website. This is used when the website is being deleted
98      * (application-level cascading).
99      *
100      * @param website the website for which queue entreis are to be removed
101      */

102     public void removeQueueEntriesByWebsite(WebsiteData website) throws RollerException;
103 }
104
Popular Tags