Moved method onFlushed() to ISession.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
This commit is contained in:
parent
d64d0348b7
commit
c4e1e8f454
|
@ -199,8 +199,7 @@ public class HTTP2Connection extends AbstractConnection implements WriteFlusher.
|
|||
@Override
|
||||
public void onFlushed(long bytes) throws IOException
|
||||
{
|
||||
// TODO: add method to ISession ?
|
||||
((HTTP2Session)session).onFlushed(bytes);
|
||||
session.onFlushed(bytes);
|
||||
}
|
||||
|
||||
protected class HTTP2Producer implements ExecutionStrategy.Producer
|
||||
|
|
|
@ -975,7 +975,8 @@ public abstract class HTTP2Session extends ContainerLifeCycle implements ISessio
|
|||
{
|
||||
}
|
||||
|
||||
void onFlushed(long bytes) throws IOException
|
||||
@Override
|
||||
public void onFlushed(long bytes) throws IOException
|
||||
{
|
||||
flusher.onFlushed(bytes);
|
||||
}
|
||||
|
|
|
@ -18,6 +18,8 @@
|
|||
|
||||
package org.eclipse.jetty.http2;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import org.eclipse.jetty.http2.api.Session;
|
||||
import org.eclipse.jetty.http2.api.Stream;
|
||||
import org.eclipse.jetty.http2.frames.DataFrame;
|
||||
|
@ -129,6 +131,14 @@ public interface ISession extends Session
|
|||
*/
|
||||
public void onFrame(Frame frame);
|
||||
|
||||
/**
|
||||
* <p>Callback method invoked when bytes are flushed to the network.</p>
|
||||
*
|
||||
* @param bytes the number of bytes flushed to the network
|
||||
* @throws IOException if the flush should fail
|
||||
*/
|
||||
public void onFlushed(long bytes) throws IOException;
|
||||
|
||||
/**
|
||||
* @return the number of bytes written by this session
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue