@Override protected Response readTransactionResponse() throws IOException { return Response.read(dis); }
protected Response readTransactionResponse(boolean isTransfer, CommunicationsSession commsSession) throws IOException { final DataInputStream dis = new DataInputStream(commsSession.getInput().getInputStream()); return Response.read(dis); }
private void initialize() throws IOException { try { if (direction == TransferDirection.RECEIVE) { // Indicate that we would like to have some data RequestType.RECEIVE_FLOWFILES.writeRequestType(dos); dos.flush(); final Response dataAvailableCode = Response.read(dis); switch (dataAvailableCode.getCode()) { case MORE_DATA: logger.debug("{} {} Indicates that data is available", this, peer); this.dataAvailable = true; break; case NO_MORE_DATA: logger.debug("{} No data available from {}", peer); this.dataAvailable = false; return; default: throw new ProtocolException("Got unexpected response when asking for data: " + dataAvailableCode); } } else { // Indicate that we would like to have some data RequestType.SEND_FLOWFILES.writeRequestType(dos); dos.flush(); } } catch (final Exception e) { error(); throw e; } }
handshakeResponse = Response.read(dis); } catch (final ProtocolException e) { throw new HandshakeException(e);
return Response.read(new DataInputStream(bis));
return Response.read(new DataInputStream(bis));
protected Response readTransactionResponse(boolean isTransfer, CommunicationsSession commsSession) throws IOException { final DataInputStream dis = new DataInputStream(commsSession.getInput().getInputStream()); return Response.read(dis); }
return Response.read(new DataInputStream(bis));