public void run() { while (true) { try { transceiver.writeBuffers(responder.respond(transceiver.readBuffers())); } catch (ClosedChannelException e) { return; } catch (IOException e) { LOG.warn("unexpected error", e); throw new RuntimeException(e); } } }
/** Called by {@link Requestor#request(String,Object)} for two-way messages. * By default calls {@link #writeBuffers(List)} followed by * {@link #readBuffers()}. */ public List<ByteBuffer> transceive(List<ByteBuffer> request) throws IOException { lockChannel(); try { writeBuffers(request); return readBuffers(); } finally { unlockChannel(); } }
public void run() { try { try { this.xc = getTransceiver(channel); while (true) { xc.writeBuffers(responder.respond(xc.readBuffers(), xc)); } } catch (EOFException e) { return; } catch (ClosedChannelException e) { return; } finally { xc.close(); } } catch (IOException e) { LOG.warn("unexpected error", e); } }
public synchronized List<ByteBuffer> transceive(List<ByteBuffer> request) throws IOException { writeBuffers(request); return readBuffers(); }
/** Called by {@link Requestor#request(String,Object)} for two-way messages. * By default calls {@link #writeBuffers(List)} followed by * {@link #readBuffers()}. */ public synchronized List<ByteBuffer> transceive(List<ByteBuffer> request) throws IOException { writeBuffers(request); return readBuffers(); }
public void run() { while (true) { try { transceiver.writeBuffers(responder.respond(transceiver.readBuffers())); } catch (ClosedChannelException e) { return; } catch (IOException e) { LOG.warn("unexpected error", e); throw new RuntimeException(e); } } }
public void run() { while (true) { try { transceiver.writeBuffers(responder.respond(transceiver.readBuffers())); } catch (ClosedChannelException e) { return; } catch (IOException e) { LOG.warn("unexpected error", e); throw new RuntimeException(e); } } }
public void run() { while (true) { try { transceiver.writeBuffers(responder.respond(transceiver.readBuffers())); } catch (ClosedChannelException e) { return; } catch (IOException e) { LOG.warn("unexpected error", e); throw new RuntimeException(e); } } }
/** Called by {@link Requestor#request(String,Object)} for two-way messages. * By default calls {@link #writeBuffers(List)} followed by * {@link #readBuffers()}. */ public List<ByteBuffer> transceive(List<ByteBuffer> request) throws IOException { lockChannel(); try { writeBuffers(request); return readBuffers(); } finally { unlockChannel(); } }
public void run() { try { try { this.xc = getTransceiver(channel); while (true) { xc.writeBuffers(responder.respond(xc.readBuffers(), xc)); } } catch (EOFException e) { return; } catch (ClosedChannelException e) { return; } finally { xc.close(); } } catch (IOException e) { LOG.warn("unexpected error", e); } }