01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. The ASF licenses this file to You
04: * under the Apache License, Version 2.0 (the "License"); you may not
05: * use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
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.business.pings;
20:
21: import java.util.List;
22: import org.apache.roller.RollerException;
23: import org.apache.roller.pojos.AutoPingData;
24: import org.apache.roller.pojos.PingQueueEntryData;
25:
26: /**
27: * PingQueueManager. This interface describes the manager for the weblog update ping request queue. The queue is
28: * processed by the <code>PingQueueProcesssor</code> and <code>PingQueueTask</code> components in the application
29: * layer.
30: */
31: public interface PingQueueManager {
32:
33: /**
34: * Add a new persistent entry to the queue. If the queue already contains an entry for the ping target and website
35: * specified by this auto ping configuration, a new one will not be added.
36: *
37: * @param autoPing auto ping configuration for the ping request to be queued.
38: */
39: public void addQueueEntry(AutoPingData autoPing)
40: throws RollerException;
41:
42: /**
43: * Store the given queue entry.
44: *
45: * @param pingQueueEntry update the given queue entry
46: * @throws RollerException
47: */
48: public void saveQueueEntry(PingQueueEntryData pingQueueEntry)
49: throws RollerException;
50:
51: /**
52: * Remove a queue entry.
53: *
54: * @param pingQueueEntry the entry to be removed.
55: * @throws RollerException
56: */
57: public void removeQueueEntry(PingQueueEntryData pingQueueEntry)
58: throws RollerException;
59:
60: /**
61: * Retrieve an entry from the queue.
62: *
63: * @param id the unique id of the entry.
64: * @return the queue entry with the specified id.
65: * @throws RollerException
66: */
67: public PingQueueEntryData getQueueEntry(String id)
68: throws RollerException;
69:
70: /**
71: * Get all of the queue entries.
72: *
73: * @return the queue as a <code>List</code> of {@link PingQueueEntryData} objects.
74: * @throws RollerException
75: */
76: public List getAllQueueEntries() throws RollerException;
77:
78: /**
79: * Release all resources associated with Roller session.
80: */
81: public void release();
82:
83: }
|