本文整理了Java中ch.cyberduck.core.Protocol.isStateful()
方法的一些代码示例,展示了Protocol.isStateful()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Protocol.isStateful()
方法的具体详情如下:
包路径:ch.cyberduck.core.Protocol
类名称:Protocol
方法名:isStateful
暂无
代码示例来源:origin: iterate-ch/cyberduck
@Override
public boolean isStateful() {
return parent.isStateful();
}
代码示例来源:origin: iterate-ch/cyberduck
public static SessionPool create(final ConnectionService connect, final TranscriptListener transcript,
final Cache<Path> cache, final Host bookmark,
final X509TrustManager x509TrustManager, final X509KeyManager x509KeyManager,
final VaultRegistry registry,
final Usage... usage) {
if(bookmark.getProtocol().isStateful()) {
// Stateful
if(Arrays.asList(usage).contains(Usage.browser)) {
return stateful(connect, transcript, cache, bookmark, x509TrustManager, x509KeyManager, registry);
}
// Break through to default pool
if(log.isInfoEnabled()) {
log.info(String.format("Create new pooled connection pool for %s", bookmark));
}
return new DefaultSessionPool(connect, x509TrustManager, x509KeyManager, registry, cache, transcript, bookmark)
.withMinIdle(PreferencesFactory.get().getInteger("connection.pool.minidle"))
.withMaxIdle(PreferencesFactory.get().getInteger("connection.pool.maxidle"))
.withMaxTotal(PreferencesFactory.get().getInteger("connection.pool.maxtotal"));
}
// Stateless protocol
return stateless(connect, transcript, cache, bookmark, x509TrustManager, x509KeyManager, registry);
}
代码示例来源:origin: iterate-ch/cyberduck
@Override
public void run() {
final SessionPool pool = parent.getSession();
final MoveWorker move = new MoveWorker(selected, pool.getHost().getProtocol().isStateful() ? SessionPoolFactory.create(parent, cache, pool.getHost()) : pool, cache, parent, LoginCallbackFactory.get(parent)) {
@Override
public void cleanup(final Map<Path, Path> result) {
final List<Path> changed = new ArrayList<>();
changed.addAll(result.keySet());
changed.addAll(result.values());
parent.reload(parent.workdir(), changed, new ArrayList<Path>(selected.values()));
}
};
parent.background(new WorkerBackgroundAction<Map<Path, Path>>(parent, parent.getSession(), move));
}
};
代码示例来源:origin: iterate-ch/cyberduck
@Override
public void run() {
final SessionPool pool = parent.getSession();
parent.background(new WorkerBackgroundAction<Map<Path, Path>>(parent, parent.getSession(),
new CopyWorker(selected, pool.getHost().getProtocol().isStateful() ? SessionPoolFactory.create(parent, cache, pool.getHost()) : pool, cache, parent, LoginCallbackFactory.get(parent)) {
@Override
public void cleanup(final Map<Path, Path> result) {
final List<Path> changed = new ArrayList<>();
changed.addAll(result.keySet());
changed.addAll(result.values());
parent.reload(parent.workdir(), changed, new ArrayList<Path>(selected.values()));
}
}
)
);
}
};
内容来源于网络,如有侵权,请联系作者删除!