/** * @see org.eclipse.jetty.io.nio.ChannelEndPoint#flush(org.eclipse.jetty.io.Buffer, org.eclipse.jetty.io.Buffer, org.eclipse.jetty.io.Buffer) */ @Override public int flush(Buffer header, Buffer buffer, Buffer trailer) throws IOException { _idleTimestamp=System.currentTimeMillis(); return super.flush(header,buffer,trailer); }
/** * @see org.eclipse.jetty.io.nio.ChannelEndPoint#flush(org.eclipse.jetty.io.Buffer) */ @Override public int flush(Buffer buffer) throws IOException { _idleTimestamp=System.currentTimeMillis(); return super.flush(buffer); }
/** * @see org.eclipse.jetty.io.nio.ChannelEndPoint#flush(org.eclipse.jetty.io.Buffer) */ @Override public int flush(Buffer buffer) throws IOException { _idleTimestamp=System.currentTimeMillis(); return super.flush(buffer); }
/** * @see org.eclipse.jetty.io.nio.ChannelEndPoint#flush(org.eclipse.jetty.io.Buffer, org.eclipse.jetty.io.Buffer, org.eclipse.jetty.io.Buffer) */ @Override public int flush(Buffer header, Buffer buffer, Buffer trailer) throws IOException { _idleTimestamp=System.currentTimeMillis(); return super.flush(header,buffer,trailer); }
/** * @see org.eclipse.jetty.io.nio.ChannelEndPoint#flush(org.eclipse.jetty.io.Buffer) */ @Override public int flush(Buffer buffer) throws IOException { _idleTimestamp=System.currentTimeMillis(); return super.flush(buffer); }
/** * @see org.eclipse.jetty.io.nio.ChannelEndPoint#flush(org.eclipse.jetty.io.Buffer, org.eclipse.jetty.io.Buffer, org.eclipse.jetty.io.Buffer) */ @Override public int flush(Buffer header, Buffer buffer, Buffer trailer) throws IOException { _idleTimestamp=System.currentTimeMillis(); return super.flush(header,buffer,trailer); }
/** * @see org.eclipse.jetty.io.nio.ChannelEndPoint#flush(org.eclipse.jetty.io.Buffer, org.eclipse.jetty.io.Buffer, org.eclipse.jetty.io.Buffer) */ @Override public int flush(Buffer header, Buffer buffer, Buffer trailer) throws IOException { _idleTimestamp=System.currentTimeMillis(); return super.flush(header,buffer,trailer); }
/** * @see org.eclipse.jetty.io.nio.ChannelEndPoint#flush(org.eclipse.jetty.io.Buffer) */ @Override public int flush(Buffer buffer) throws IOException { _idleTimestamp=System.currentTimeMillis(); return super.flush(buffer); }
/** * @see org.eclipse.jetty.io.nio.ChannelEndPoint#flush(org.eclipse.jetty.io.Buffer) */ @Override public int flush(Buffer buffer) throws IOException { _idleTimestamp=System.currentTimeMillis(); return super.flush(buffer); }
/** * @see org.eclipse.jetty.io.nio.ChannelEndPoint#flush(org.eclipse.jetty.io.Buffer, org.eclipse.jetty.io.Buffer, org.eclipse.jetty.io.Buffer) */ @Override public int flush(Buffer header, Buffer buffer, Buffer trailer) throws IOException { _idleTimestamp=System.currentTimeMillis(); return super.flush(header,buffer,trailer); }
@Override public int flush(Buffer buffer) throws IOException { int l = super.flush(buffer); // If there was something to write and it wasn't written, then we are not writable. if (l==0 && buffer!=null && buffer.hasContent()) { synchronized (this) { _writable=false; if (_state<STATE_DISPATCHED) updateKey(); } } else if (l>0) { _writable=true; notIdle(); } return l; }
@Override public int flush(Buffer buffer) throws IOException { int l = super.flush(buffer); // If there was something to write and it wasn't written, then we are not writable. if (l==0 && buffer!=null && buffer.hasContent()) { synchronized (this) { _writable=false; if (_state<STATE_DISPATCHED) updateKey(); } } else if (l>0) { _writable=true; notIdle(); } return l; }
@Override public int flush(Buffer buffer) throws IOException { int l = super.flush(buffer); // If there was something to write and it wasn't written, then we are not writable. if (l==0 && buffer!=null && buffer.hasContent()) { synchronized (this) { _writable=false; if (_state<STATE_DISPATCHED) updateKey(); } } else if (l>0) { _writable=true; notIdle(); } return l; }
@Override public int flush(Buffer buffer) throws IOException { int l = super.flush(buffer); // If there was something to write and it wasn't written, then we are not writable. if (l==0 && buffer!=null && buffer.hasContent()) { synchronized (this) { _writable=false; if (_state<STATE_DISPATCHED) updateKey(); } } else if (l>0) { _writable=true; notIdle(); } return l; }
public int flush(Buffer header, Buffer buffer, Buffer trailer) throws IOException { int length=0; Buffer buf0 = header==null?null:header.buffer(); Buffer buf1 = buffer==null?null:buffer.buffer(); if (_channel instanceof GatheringByteChannel && header!=null && header.length()!=0 && buf0 instanceof NIOBuffer && buffer!=null && buffer.length()!=0 && buf1 instanceof NIOBuffer) { length = gatheringFlush(header,((NIOBuffer)buf0).getByteBuffer(),buffer,((NIOBuffer)buf1).getByteBuffer()); } else { // flush header if (header!=null && header.length()>0) length=flush(header); // flush buffer if ((header==null || header.length()==0) && buffer!=null && buffer.length()>0) length+=flush(buffer); // flush trailer if ((header==null || header.length()==0) && (buffer==null || buffer.length()==0) && trailer!=null && trailer.length()>0) length+=flush(trailer); } return length; }
public int flush(Buffer header, Buffer buffer, Buffer trailer) throws IOException { int length=0; Buffer buf0 = header==null?null:header.buffer(); Buffer buf1 = buffer==null?null:buffer.buffer(); if (_channel instanceof GatheringByteChannel && header!=null && header.length()!=0 && buf0 instanceof NIOBuffer && buffer!=null && buffer.length()!=0 && buf1 instanceof NIOBuffer) { length = gatheringFlush(header,((NIOBuffer)buf0).getByteBuffer(),buffer,((NIOBuffer)buf1).getByteBuffer()); } else { // flush header if (header!=null && header.length()>0) length=flush(header); // flush buffer if ((header==null || header.length()==0) && buffer!=null && buffer.length()>0) length+=flush(buffer); // flush trailer if ((header==null || header.length()==0) && (buffer==null || buffer.length()==0) && trailer!=null && trailer.length()>0) length+=flush(trailer); } return length; }
@Override public int flush(Buffer header, Buffer buffer, Buffer trailer) throws IOException { int l = super.flush(header, buffer, trailer); // If there was something to write and it wasn't written, then we are not writable. if (l==0 && ( header!=null && header.hasContent() || buffer!=null && buffer.hasContent() || trailer!=null && trailer.hasContent())) { synchronized (this) { _writable=false; if (_state<STATE_DISPATCHED) updateKey(); } } else if (l>0) { _writable=true; notIdle(); } return l; }
@Override public int flush(Buffer header, Buffer buffer, Buffer trailer) throws IOException { int l = super.flush(header, buffer, trailer); // If there was something to write and it wasn't written, then we are not writable. if (l==0 && ( header!=null && header.hasContent() || buffer!=null && buffer.hasContent() || trailer!=null && trailer.hasContent())) { synchronized (this) { _writable=false; if (_state<STATE_DISPATCHED) updateKey(); } } else if (l>0) { _writable=true; notIdle(); } return l; }
@Override public int flush(Buffer header, Buffer buffer, Buffer trailer) throws IOException { int l = super.flush(header, buffer, trailer); // If there was something to write and it wasn't written, then we are not writable. if (l==0 && ( header!=null && header.hasContent() || buffer!=null && buffer.hasContent() || trailer!=null && trailer.hasContent())) { synchronized (this) { _writable=false; if (_state<STATE_DISPATCHED) updateKey(); } } else if (l>0) { _writable=true; notIdle(); } return l; }
@Override public int flush(Buffer header, Buffer buffer, Buffer trailer) throws IOException { int l = super.flush(header, buffer, trailer); // If there was something to write and it wasn't written, then we are not writable. if (l==0 && ( header!=null && header.hasContent() || buffer!=null && buffer.hasContent() || trailer!=null && trailer.hasContent())) { synchronized (this) { _writable=false; if (_state<STATE_DISPATCHED) updateKey(); } } else if (l>0) { _writable=true; notIdle(); } return l; }