KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > avalon > excalibur > source > Source


1 /*
2  * Copyright (C) The Apache Software Foundation. All rights reserved.
3  *
4  * This software is published under the terms of the Apache Software License
5  * version 1.1, a copy of which has been included with this distribution in
6  * the LICENSE.txt file.
7  */

8 package org.apache.avalon.excalibur.source;
9
10 import java.io.IOException JavaDoc;
11 import java.io.InputStream JavaDoc;
12
13 /**
14  * Description of a source. This interface provides a simple interface
15  * for accessing a source of data. The source of data is assumed to
16  * <b>not change</b> during the lifetime of the Source object. If you
17  * have a data source that can change its content and you want it to
18  * reflect it, use a {@link ModifiableSource} object instead.
19  *
20  * When the <code>Source</code> object is no longer needed
21  * it must be released using the resolver. This is very similar like
22  * looking up components from a <code>ComponentManager</code>.
23  * In fact a source object can implement most lifecycle interfaces
24  * like Composable, Initializable, Disposable etc.
25  *
26  * @author <a HREF="mailto:cziegeler@apache.org">Carsten Ziegeler</a>
27  * @author <a HREF="mailto:ovidiu@cup.hp.com">Ovidiu Predescu</a>
28  * @version CVS $Revision: 1.10 $ $Date: 2002/01/08 13:43:48 $
29  */

30 public interface Source {
31
32     /**
33      * Return an <code>InputStream</code> object to read from the source.
34      * This is the data at the point of invocation of this method,
35      * so if this is an {@link ModifiableSource} object, you might get
36      * different content from two invocations.
37      */

38     InputStream JavaDoc getInputStream()
39     throws IOException JavaDoc;
40
41     /**
42      * Return the unique identifer for this source
43      */

44     String JavaDoc getSystemId();
45
46 }
47
Popular Tags