KickJava   Java API By Example, From Geeks To Geeks.

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


1 /*
2  * Licensed to the Apache Software Foundation (ASF) under one or more
3  * contributor license agreements. The ASF licenses this file to You
4  * under the Apache License, Version 2.0 (the "License"); you may not
5  * use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License. For additional information regarding
15  * copyright in this work, please see the NOTICE file in the top level
16  * directory of this distribution.
17  */

18
19 package org.apache.roller.model;
20
21 import java.util.List JavaDoc;
22 import org.apache.roller.RollerException;
23 import org.apache.roller.pojos.AutoPingData;
24 import org.apache.roller.pojos.PingQueueEntryData;
25
26
27 /**
28  * PingQueueManager. This interface describes the manager for the weblog update ping request queue. The queue is
29  * processed by the <code>PingQueueProcesssor</code> and <code>PingQueueTask</code> components in the application
30  * layer.
31  */

32 public interface PingQueueManager {
33     
34     
35     /**
36      * Add a new persistent entry to the queue. If the queue already contains an entry for the ping target and website
37      * specified by this auto ping configuration, a new one will not be added.
38      *
39      * @param autoPing auto ping configuration for the ping request to be queued.
40      */

41     public void addQueueEntry(AutoPingData autoPing) throws RollerException;
42     
43     
44     /**
45      * Store the given queue entry.
46      *
47      * @param pingQueueEntry update the given queue entry
48      * @throws RollerException
49      */

50     public void saveQueueEntry(PingQueueEntryData pingQueueEntry) throws RollerException;
51     
52     
53     /**
54      * Remove a queue entry.
55      *
56      * @param pingQueueEntry the entry to be removed.
57      * @throws RollerException
58      */

59     public void removeQueueEntry(PingQueueEntryData pingQueueEntry) throws RollerException;
60     
61     
62     /**
63      * Retrieve an entry from the queue.
64      *
65      * @param id the unique id of the entry.
66      * @return the queue entry with the specified id.
67      * @throws RollerException
68      */

69     public PingQueueEntryData getQueueEntry(String JavaDoc id) throws RollerException;
70     
71     
72     /**
73      * Get all of the queue entries.
74      *
75      * @return the queue as a <code>List</code> of {@link PingQueueEntryData} objects.
76      * @throws RollerException
77      */

78     public List JavaDoc getAllQueueEntries() throws RollerException;
79     
80     
81     /**
82      * Release all resources associated with Roller session.
83      */

84     public void release();
85     
86 }
87
Popular Tags