1 package fr.in2p3.jsaga.adaptor.data.impl;
2
3 import fr.in2p3.jsaga.adaptor.schema.data.emulator.SecureServer;
4 import fr.in2p3.jsaga.adaptor.schema.data.emulator.ServerType;
5 import fr.in2p3.jsaga.adaptor.security.impl.UserPassSecurityCredential;
6 import org.ogf.saga.error.*;
7
8
9
10
11
12
13
14
15
16
17
18
19
20 public class DataEmulatorConnectionSecure extends DataEmulatorConnectionAbstract {
21 private SecureServer m_serverRoot;
22
23 public DataEmulatorConnectionSecure(String protocol, String host, int port, UserPassSecurityCredential security) throws AuthenticationFailedException, AuthorizationFailedException, TimeoutException, NoSuccessException {
24 super();
25 m_serverRoot = m_grid.connect(protocol, host, port, security);
26 if (m_serverRoot == null) {
27 throw new TimeoutException("Failed to connect to host: "+host);
28 }
29 }
30
31 public void destroy() {
32 m_grid.disconnect(m_serverRoot);
33 }
34
35 protected ServerType getServerRoot() {
36 return m_serverRoot;
37 }
38 }