Class NoopWriteEventsListener
- java.lang.Object
-
- io.servicetalk.transport.netty.internal.NoopWriteEventsListener
-
- All Implemented Interfaces:
FlushStrategy.WriteEventsListener
public abstract class NoopWriteEventsListener extends java.lang.Object implements FlushStrategy.WriteEventsListener
AFlushStrategy.WriteEventsListenerthat by default does nothing for all method. This can be used to selectively implement relevant methods.
-
-
Constructor Summary
Constructors Constructor Description NoopWriteEventsListener()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiditemWritten(java.lang.Object __)For each newFlushStrategy.WriteEventsListenerreturned fromFlushStrategy.apply(FlushSender), this method will be called once after any item is written to the connection.voidwriteCancelled()For each newFlushStrategy.WriteEventsListenerreturned fromFlushStrategy.apply(FlushSender), this method will be called at most once when writes are cancelled.voidwriteStarted()For each newFlushStrategy.WriteEventsListenerreturned fromFlushStrategy.apply(FlushSender), this method will be called at most once before any items are written to the connection.voidwriteTerminated()For each newFlushStrategy.WriteEventsListenerreturned fromFlushStrategy.apply(FlushSender), this method will be called at most once when all other items are written to the connection.
-
-
-
Method Detail
-
writeStarted
public void writeStarted()
Description copied from interface:FlushStrategy.WriteEventsListenerFor each newFlushStrategy.WriteEventsListenerreturned fromFlushStrategy.apply(FlushSender), this method will be called at most once before any items are written to the connection.This will be followed by zero or more calls to
FlushStrategy.WriteEventsListener.itemWritten(Object)and at most one call toFlushStrategy.WriteEventsListener.writeTerminated()andFlushStrategy.WriteEventsListener.writeCancelled()or both.- Specified by:
writeStartedin interfaceFlushStrategy.WriteEventsListener
-
itemWritten
public void itemWritten(java.lang.Object __)
Description copied from interface:FlushStrategy.WriteEventsListenerFor each newFlushStrategy.WriteEventsListenerreturned fromFlushStrategy.apply(FlushSender), this method will be called once after any item is written to the connection.This will be followed by zero or more calls to this method and at most one call to
FlushStrategy.WriteEventsListener.writeTerminated()andFlushStrategy.WriteEventsListener.writeCancelled()or both.FlushStrategy.WriteEventsListener.writeCancelled()can be called concurrently with this method.- Specified by:
itemWrittenin interfaceFlushStrategy.WriteEventsListener- Parameters:
__- Item that was written.
-
writeTerminated
public void writeTerminated()
Description copied from interface:FlushStrategy.WriteEventsListenerFor each newFlushStrategy.WriteEventsListenerreturned fromFlushStrategy.apply(FlushSender), this method will be called at most once when all other items are written to the connection.FlushStrategy.WriteEventsListener.writeCancelled()MAY be called concurrently or after this method.- Specified by:
writeTerminatedin interfaceFlushStrategy.WriteEventsListener
-
writeCancelled
public void writeCancelled()
Description copied from interface:FlushStrategy.WriteEventsListenerFor each newFlushStrategy.WriteEventsListenerreturned fromFlushStrategy.apply(FlushSender), this method will be called at most once when writes are cancelled.FlushStrategy.WriteEventsListener.itemWritten(Object)orFlushStrategy.WriteEventsListener.writeTerminated()MAY be called concurrently or after this method.- Specified by:
writeCancelledin interfaceFlushStrategy.WriteEventsListener
-
-