Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
FeedLifecycleListener |
|
| 1.0;1 |
1 | /* | |
2 | * Copyright 1999,2004 The Apache Software Foundation. | |
3 | * | |
4 | * Licensed under the Apache License, Version 2.0 (the "License"); | |
5 | * you may not 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. | |
15 | */ | |
16 | ||
17 | package org.apache.commons.feedparser; | |
18 | ||
19 | ||
20 | /** | |
21 | * | |
22 | * @author <a href="mailto:burton@apache.org">Kevin A. Burton (burtonator)</a> | |
23 | * @version $Id: FeedLifecycleListener.java 373614 2006-01-30 22:31:21Z mvdb $ | |
24 | */ | |
25 | public interface FeedLifecycleListener { | |
26 | ||
27 | /** | |
28 | * Called prior to event parsing to signal the parsing of a new feed. | |
29 | * | |
30 | * @throws FeedParserListener Possibly wraping another exception | |
31 | * | |
32 | */ | |
33 | public void init() throws FeedParserException; | |
34 | ||
35 | /** | |
36 | * Set this context that this FeedParserListener is executing within. This | |
37 | * can be used with anonymous listeners to pass contextual information about | |
38 | * threads they are working within, etc. | |
39 | * | |
40 | * | |
41 | */ | |
42 | public void setContext( Object context ) throws FeedParserException; | |
43 | public Object getContext() throws FeedParserException; | |
44 | ||
45 | /** | |
46 | * Called when the feed has finished parsing. | |
47 | * | |
48 | * | |
49 | */ | |
50 | public void finished() throws FeedParserException; | |
51 | ||
52 | } |