1 package fr.in2p3.jsaga.adaptor.data;
2
3 import org.globus.ftp.DataChannelAuthentication;
4 import org.globus.ftp.exception.ServerException;
5 import org.ogf.saga.error.*;
6
7 import fr.in2p3.jsaga.adaptor.security.GlobusSecurityCredential;
8 import fr.in2p3.jsaga.adaptor.security.MyProxySecurityCredential;
9
10 import java.io.IOException;
11 import java.util.Map;
12
13
14
15
16
17
18
19
20
21
22
23
24
25 public class GsiftpWinDataAdaptor extends Gsiftp2DataAdaptor {
26
27 public String getType() {
28 return "gsiftp-win";
29 }
30
31
32 public Class[] getSupportedSecurityCredentialClasses() {
33 return new Class[]{GlobusSecurityCredential.class, MyProxySecurityCredential.class};
34 }
35
36
37 public void connect(String userInfo, String host, int port, String basePath, Map attributes) throws AuthenticationFailedException, AuthorizationFailedException, BadParameterException, TimeoutException, NoSuccessException {
38
39 super.connect(userInfo, host, port, basePath, attributes);
40
41
42 try {
43 m_client.setDataChannelAuthentication(DataChannelAuthentication.NONE);
44 } catch (IOException e) {
45 throw new TimeoutException(e);
46 } catch (ServerException e) {
47 throw new AuthenticationFailedException(e);
48 }
49 }
50 }