jetty-9 WriteFlusher cleanup

This commit is contained in:
Greg Wilkins 2012-06-06 16:49:27 +02:00
parent 903e4cd0f2
commit f6643ccbe7
1 changed files with 3 additions and 1 deletions

View File

@ -36,8 +36,10 @@ abstract public class WriteFlusher
}
/* ------------------------------------------------------------ */
public void write(Object context, Callback callback, ByteBuffer... buffers)
public <C> void write(C context, Callback<C> callback, ByteBuffer... buffers)
{
if (callback==null)
throw new IllegalArgumentException();
if (!_writing.compareAndSet(false,true))
throw new WritePendingException();
try