1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 package org.backsource.amsterdam.plugins.file;
21
22 import org.backsource.amsterdam.service.ServiceException;
23 import org.backsource.amsterdam.service.protocol.ProtocolHandler;
24 import org.backsource.amsterdam.service.protocol.ProtocolConfigure;
25 import org.backsource.amsterdam.service.protocol.ProtocolHandlerFactorySupport;
26
27 /***
28 * A factory to get DIR protocol handlers from, that is: protocol handlers that fetched data from a directory..
29 *
30 * @author Peter Antman
31 * @version $version$
32 */
33
34 public class DirProtocolHandlerFactory extends ProtocolHandlerFactorySupport {
35 private ProtocolConfigure conf;
36 public static final String PROTOCOL = "DIR";
37
38 public DirProtocolHandlerFactory() {
39
40 }
41 public String getSupportedProtocol() {
42 return PROTOCOL;
43 }
44 public void initialize(ProtocolConfigure config) {
45 conf = config;
46 }
47 public ProtocolHandler getProtocolHandler() throws ServiceException {
48 DirProtocolHandler d = new DirProtocolHandler(conf);
49 d.setServiceInvoker( invoker);
50 return d;
51 }
52 }