1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.apache.oodt.cas.protocol;
18
19
20 import org.apache.oodt.cas.protocol.auth.Authentication;
21 import org.apache.oodt.cas.protocol.exceptions.ProtocolException;
22 import org.apache.oodt.cas.protocol.util.ProtocolFileFilter;
23
24
25 import java.io.File;
26 import java.util.List;
27
28
29
30
31
32
33
34 public interface Protocol {
35
36 public void connect(String host, Authentication authentication) throws ProtocolException;
37
38 public void close() throws ProtocolException;
39
40 public boolean connected();
41
42 public void cd(ProtocolFile file) throws ProtocolException;
43
44 public void cdRoot() throws ProtocolException;
45
46 public void cdHome() throws ProtocolException;
47
48 public void get(ProtocolFile fromFile, File toFile) throws ProtocolException;
49
50 public void put(File fromFile, ProtocolFile toFile) throws ProtocolException;
51
52 public ProtocolFile pwd() throws ProtocolException;
53
54 public List<ProtocolFile> ls() throws ProtocolException;
55
56 public List<ProtocolFile> ls(ProtocolFileFilter filter) throws ProtocolException;
57
58 public void delete(ProtocolFile file) throws ProtocolException;
59
60 }