private void readFailed(final IOException e) { try { source.suspendReads(); sink.suspendWrites(); invokeChannelExceptionHandler(source, readExceptionHandler, e); } finally { pooledBuffer.free(); } }
private void writeFailed(final IOException e) { try { source.suspendReads(); sink.suspendWrites(); invokeChannelExceptionHandler(sink, writeExceptionHandler, e); } finally { pooledBuffer.free(); } }
result = channel.transferTo(p, cnt, target); } catch (IOException e) { invokeChannelExceptionHandler(channel, exceptionHandler, e); return;
result = channel.transferFrom(source, p, cnt); } catch (IOException e) { invokeChannelExceptionHandler(channel, exceptionHandler, e); return;
public void handleEvent(final T channel) { try { long count = this.count; try { long res; for (;;) { res = Channels.drain(channel, count); if (res == -1 || res == count) { this.count = 0L; invokeChannelListener(channel, finishListener); return; } else if (res == 0) { return; } else if (count < Long.MAX_VALUE) { // MAX_VALUE means drain to EOF count -= res; } } } finally { this.count = count; } } catch (IOException e) { this.count = 0L; if (exceptionHandler != null) { invokeChannelExceptionHandler(channel, exceptionHandler, e); } else { IoUtils.safeShutdownReads(channel); } } }
channel.suspendWrites(); pooled.free(); invokeChannelExceptionHandler(channel, exceptionHandler, e); return; } finally {
pooledBuffer = null; done = true; ChannelListeners.invokeChannelExceptionHandler(sink, writeExceptionHandler, e); return; pooledBuffer = null; done = true; ChannelListeners.invokeChannelExceptionHandler(source, readExceptionHandler, e); return;
buffer.flip(); } catch (IOException e) { ChannelListeners.invokeChannelExceptionHandler(source, readExceptionHandler, e); return; res = sink.write(buffer); } catch (IOException e) { ChannelListeners.invokeChannelExceptionHandler(sink, writeExceptionHandler, e); return;
transferred = source.transferTo(count, buffer, sink); } catch (IOException e) { invokeChannelExceptionHandler(source, readExceptionHandler, e); return; source.suspendReads(); sink.suspendWrites(); invokeChannelExceptionHandler(source, readExceptionHandler, new EOFException()); res = sink.write(buffer); } catch (IOException e) { invokeChannelExceptionHandler(sink, writeExceptionHandler, e); return;
private void writeFailed(final IOException e) { try { source.suspendReads(); sink.suspendWrites(); ChannelListeners.invokeChannelExceptionHandler(sink, writeExceptionHandler, e); } finally { pooledBuffer.free(); } }
private void readFailed(final IOException e) { try { source.suspendReads(); sink.suspendWrites(); ChannelListeners.invokeChannelExceptionHandler(source, readExceptionHandler, e); } finally { pooledBuffer.free(); } }
private void readFailed(final IOException e) { try { source.suspendReads(); sink.suspendWrites(); invokeChannelExceptionHandler(source, readExceptionHandler, e); } finally { pooledBuffer.free(); } }
private void writeFailed(final IOException e) { try { source.suspendReads(); sink.suspendWrites(); invokeChannelExceptionHandler(sink, writeExceptionHandler, e); } finally { pooledBuffer.free(); } }
private void writeFailed(final IOException e) { try { source.suspendReads(); sink.suspendWrites(); ChannelListeners.invokeChannelExceptionHandler(sink, writeExceptionHandler, e); } finally { pooledBuffer.free(); } }
private void readFailed(final IOException e) { try { source.suspendReads(); sink.suspendWrites(); ChannelListeners.invokeChannelExceptionHandler(source, readExceptionHandler, e); } finally { pooledBuffer.free(); } }
result = channel.transferFrom(source, p, cnt); } catch (IOException e) { invokeChannelExceptionHandler(channel, exceptionHandler, e); return;
result = channel.transferTo(p, cnt, target); } catch (IOException e) { invokeChannelExceptionHandler(channel, exceptionHandler, e); return;
public void handleEvent(final T channel) { try { long count = this.count; try { long res; for (;;) { res = Channels.drain(channel, count); if (res == -1 || res == count) { this.count = 0L; invokeChannelListener(channel, finishListener); return; } else if (res == 0) { return; } else if (count < Long.MAX_VALUE) { // MAX_VALUE means drain to EOF count -= res; } } } finally { this.count = count; } } catch (IOException e) { this.count = 0L; if (exceptionHandler != null) { invokeChannelExceptionHandler(channel, exceptionHandler, e); } else { IoUtils.safeShutdownReads(channel); } } }
channel.suspendWrites(); pooled.free(); invokeChannelExceptionHandler(channel, exceptionHandler, e); return; } finally {
buffer.flip(); } catch (IOException e) { ChannelListeners.invokeChannelExceptionHandler(source, readExceptionHandler, e); return; res = sink.write(buffer); } catch (IOException e) { ChannelListeners.invokeChannelExceptionHandler(sink, writeExceptionHandler, e); return;