Кто-нибудь знает почему это или как это исправить?
Я использую андроид для подключения через httpclient - простой соединитель возобновляет соединение просто отлично, но Jetty каждый раз выполняет новое рукопожатие! Код такой же, только тот, который у меня есть на пути сборки. Постоянное повторение рукопожатия расходует смешное количество данных и батареи - проблема в том, что мне требуется проверка подлинности клиента, которая, как я обнаружил, не работает должным образом с Простым соединителем. Есть что-то, чего я здесь не хватает? Я использую стандартное соединение, настроенное как показано ниже.
component = new Component();
component.getClients().add(Protocol.FILE);
Server httpsServer = component.getServers().add(Protocol.HTTPS, 444);
Series<Parameter> parameters = httpsServer.getContext().getParameters();
File pwd = new File(".");
String path = pwd.getCanonicalPath();
String keystorePath = path + "/keystore/keypair.jks";
parameters.add("SSLContextFactory", "org.restlet.ext.ssl.PkixSslContextFactory");
parameters.add("keystorePath", keystorePath);
parameters.add("keystorePassword", "xxx");
parameters.add("keyPassword", "xxx");
parameters.add("keystoreType", "JKS");
parameters.add("threadMaxIdleTimeMs", "60000"); //default idle time
parameters.add("needClientAuthentication", "true");
// Guard the restlet with BASIC authentication (encrypted under SSL).
ChallengeAuthenticator guard = new ChallengeAuthenticator(null, ChallengeScheme.HTTP_BASIC, "xxx");
//new pagerreceiver
Restlet resty = new PagerReceiverApplication();
LoginChecker loginVerifier = new LoginChecker();
guard.setVerifier(loginVerifier);
guard.setNext(resty);
component.getDefaultHost().attachDefault(guard);
overrideStatus statusService = new overrideStatus();
component.setStatusService(statusService);
component.start();