KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > excalibur > source > impl > FTPSourceFactory


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

17 package org.apache.excalibur.source.impl;
18
19 import java.io.IOException JavaDoc;
20 import java.net.MalformedURLException JavaDoc;
21 import java.net.URL JavaDoc;
22 import java.util.Map JavaDoc;
23
24 import org.apache.avalon.framework.thread.ThreadSafe;
25 import org.apache.excalibur.source.Source;
26 import org.apache.excalibur.source.SourceFactory;
27
28 /**
29  * A factory for an @link FTPSource.
30  *
31  * @avalon.component
32  * @avalon.service type=SourceFactory
33  * @x-avalon.info name=ftp-source
34  * @x-avalon.lifestyle type=singleton
35  *
36  * @author <a HREF="mailto:dev@avalon.apache.org">Avalon Development Team</a>
37  */

38 public final class FTPSourceFactory extends URLSourceFactory implements SourceFactory, ThreadSafe
39 {
40
41     public FTPSourceFactory()
42     {
43         super();
44     }
45
46     /**
47      * Creates an FTPSource.
48      */

49     protected Source createURLSource( final URL JavaDoc url, final Map JavaDoc parameters )
50         throws MalformedURLException JavaDoc, IOException JavaDoc
51     {
52         URLSource result = new FTPSource();
53         result.init(url, parameters);
54         return result;
55     }
56     
57 }
58
Popular Tags