@Test public void testConnect() throws Exception { final ProtocolFactory factory = new ProtocolFactory(new HashSet<>(Collections.singleton(new IRODSProtocol()))); final Profile profile = new ProfilePlistReader(factory).read( new Local("../profiles/iRODS (iPlant Collaborative).cyberduckprofile")); final Host host = new Host(profile, profile.getDefaultHostname(), new Credentials( System.getProperties().getProperty("irods.key"), System.getProperties().getProperty("irods.secret") )); final IRODSSession session = new IRODSSession(host); assertNotNull(session.open(Proxy.DIRECT, new DisabledHostKeyCallback(), new DisabledLoginCallback())); assertTrue(session.isConnected()); assertNotNull(session.getClient()); session.close(); assertFalse(session.isConnected()); }
@Override protected IRODSFileSystemAO connect(final Proxy proxy, final HostKeyCallback key, final LoginCallback prompt) throws BackgroundException { try { final IRODSFileSystem fs = this.configure(IRODSFileSystem.instance()); final IRODSAccessObjectFactory factory = fs.getIRODSAccessObjectFactory(); final String region = this.getRegion(); final String resource = this.getResource(); final Credentials credentials = host.getCredentials(); try { return factory.getIRODSFileSystemAO(new URIEncodingIRODSAccount(credentials.getUsername(), credentials.getPassword(), new IRODSHomeFinderService(IRODSSession.this).find().getAbsolute(), region, resource)); } catch(IllegalArgumentException e) { throw new LoginFailureException(e.getMessage(), e); } } catch(JargonException e) { throw new IRODSExceptionMappingService().map(e); } }
IRODSSession extends SSLSession<IRODSFileSystemAO> { @Override protected IRODSFileSystemAO connect(final Proxy proxy, final HostKeyCallback key, final LoginCallback prompt) throws BackgroundException { try { final IRODSFileSystem fs = this.configure(IRODSFileSystem.instance()); final IRODSAccessObjectFactory factory = fs.getIRODSAccessObjectFactory(); final String region = this.getRegion(); final String resource = this.getResource(); final Credentials credentials = host.getCredentials(); try { return factory.getIRODSFileSystemAO(new URIEncodingIRODSAccount(credentials.getUsername(), credentials.getPassword(), new IRODSHomeFinderService(IRODSSession.this).find().getAbsolute(), region, resource)); } catch(IllegalArgumentException e) { throw new LoginFailureException(e.getMessage(), e); } } catch(JargonException e) { throw new IRODSExceptionMappingService().map(e); } } }
IRODSSession extends SSLSession<IRODSFileSystemAO> { @Override protected IRODSFileSystemAO connect(final Proxy proxy, final HostKeyCallback key, final LoginCallback prompt) throws BackgroundException { try { final IRODSFileSystem fs = this.configure(IRODSFileSystem.instance()); final IRODSAccessObjectFactory factory = fs.getIRODSAccessObjectFactory(); final String region = this.getRegion(); final String resource = this.getResource(); final Credentials credentials = host.getCredentials(); try { return factory.getIRODSFileSystemAO(new URIEncodingIRODSAccount(credentials.getUsername(), credentials.getPassword(), new IRODSHomeFinderService(IRODSSession.this).find().getAbsolute(), region, resource)); } catch(IllegalArgumentException e) { throw new LoginFailureException(e.getMessage(), e); } } catch(JargonException e) { throw new IRODSExceptionMappingService().map(e); } } IRODSSession(final Host h);  IRODSSession(final Host h, final X509TrustManager trust, final X509KeyManager key); }
IRODSSession extends SSLSession<IRODSFileSystemAO> { @Override protected IRODSFileSystemAO connect(final Proxy proxy, final HostKeyCallback key, final LoginCallback prompt) throws BackgroundException { try { final IRODSFileSystem fs = this.configure(IRODSFileSystem.instance()); final IRODSAccessObjectFactory factory = fs.getIRODSAccessObjectFactory(); final String region = this.getRegion(); final String resource = this.getResource(); final Credentials credentials = host.getCredentials(); try { return factory.getIRODSFileSystemAO(new URIEncodingIRODSAccount(credentials.getUsername(), credentials.getPassword(), new IRODSHomeFinderService(IRODSSession.this).find().getAbsolute(), region, resource)); } catch(IllegalArgumentException e) { throw new LoginFailureException(e.getMessage(), e); } } catch(JargonException e) { throw new IRODSExceptionMappingService().map(e); } } IRODSSession(final Host h);  IRODSSession(final Host h, final X509TrustManager trust, final X509KeyManager key); @Override void login(final Proxy proxy, final LoginCallback prompt, final CancelCallback cancel); @Override @SuppressWarnings("unchecked") T _getFeature(final Class<T> type); }
IRODSSession extends SSLSession<IRODSFileSystemAO> { @Override protected IRODSFileSystemAO connect(final Proxy proxy, final HostKeyCallback key, final LoginCallback prompt) throws BackgroundException { try { final IRODSFileSystem fs = this.configure(IRODSFileSystem.instance()); final IRODSAccessObjectFactory factory = fs.getIRODSAccessObjectFactory(); final String region = this.getRegion(); final String resource = this.getResource(); final Credentials credentials = host.getCredentials(); try { return factory.getIRODSFileSystemAO(new URIEncodingIRODSAccount(credentials.getUsername(), credentials.getPassword(), new IRODSHomeFinderService(IRODSSession.this).find().getAbsolute(), region, resource)); } catch(IllegalArgumentException e) { throw new LoginFailureException(e.getMessage(), e); } } catch(JargonException e) { throw new IRODSExceptionMappingService().map(e); } } IRODSSession(final Host h);  IRODSSession(final Host h, final X509TrustManager trust, final X509KeyManager key); @Override void login(final Proxy proxy, final LoginCallback prompt, final CancelCallback cancel); @Override @SuppressWarnings("unchecked") T _getFeature(final Class<T> type);  }