public HiddenServiceCircuit call() throws Exception {
logger.fine("Opening rendezvous circuit for "+ logServiceName());
final InternalCircuit rendezvous = circuitManager.getCleanInternalCircuit();
logger.fine("Establishing rendezvous for "+ logServiceName());
RendezvousProcessor rp = new RendezvousProcessor(rendezvous);
if(!rp.establishRendezvous()) {
rendezvous.markForClose();
return null;
}
logger.fine("Opening introduction circuit for "+ logServiceName());
final IntroductionProcessor introductionProcessor = openIntroduction();
if(introductionProcessor == null) {
logger.info("Failed to open connection to any introduction point");
rendezvous.markForClose();
return null;
}
logger.fine("Sending introduce cell for "+ logServiceName());
final TorTapKeyAgreement kex = new TorTapKeyAgreement();
final boolean icResult = introductionProcessor.sendIntroduce(introductionProcessor.getServiceKey(), kex.getPublicKeyBytes(), rp.getCookie(), rp.getRendezvousRouter());
introductionProcessor.markCircuitForClose();
if(!icResult) {
rendezvous.markForClose();
return null;
}
logger.fine("Processing RV2 for "+ logServiceName());
HiddenServiceCircuit hsc = rp.processRendezvous2(kex);
if(hsc == null) {
rendezvous.markForClose();
}
logger.fine("Rendezvous circuit opened for "+ logServiceName());
return hsc;