@Override protected HandshakeProperties doHandshake(Peer peer) throws IOException, HandshakeException { HandshakeProperties confirmed = new HandshakeProperties();
@Override protected HandshakeProperties doHandshake(Peer peer) throws IOException, HandshakeException { HttpServerCommunicationsSession commsSession = (HttpServerCommunicationsSession) peer.getCommunicationsSession(); final String transactionId = commsSession.getTransactionId(); HandshakeProperties confirmed = null; if (!StringUtils.isEmpty(transactionId)) { // If handshake is already done, use it. confirmed = transactionManager.getHandshakenProperties(transactionId); } if (confirmed == null) { // If it's not, then do handshake. confirmed = new HandshakeProperties(); confirmed.setCommsIdentifier(transactionId); validateHandshakeRequest(confirmed, peer, commsSession.getHandshakeParams()); } logger.debug("{} Done handshake, confirmed={}", this, confirmed); return confirmed; }
@Override protected HandshakeProperties doHandshake(Peer peer) throws IOException, HandshakeException { HandshakeProperties confirmed = new HandshakeProperties();
@Override protected HandshakeProperties doHandshake(Peer peer) throws IOException, HandshakeException { HttpServerCommunicationsSession commsSession = (HttpServerCommunicationsSession) peer.getCommunicationsSession(); final String transactionId = commsSession.getTransactionId(); HandshakeProperties confirmed = null; if (!StringUtils.isEmpty(transactionId)) { // If handshake is already done, use it. confirmed = transactionManager.getHandshakenProperties(transactionId); } if (confirmed == null) { // If it's not, then do handshake. confirmed = new HandshakeProperties(); confirmed.setCommsIdentifier(transactionId); validateHandshakeRequest(confirmed, peer, commsSession.getHandshakeParams()); } logger.debug("{} Done handshake, confirmed={}", this, confirmed); return confirmed; }