Class NoopWriteEventsListener
- All Implemented Interfaces:
FlushStrategy.WriteEventsListener
FlushStrategy.WriteEventsListener that by default does nothing for all method. This can be used to selectively implement
relevant methods.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiditemWritten(Object __) For each newFlushStrategy.WriteEventsListenerreturned fromFlushStrategy.apply(FlushSender), this method will be called once after any item is written to the connection.voidFor each newFlushStrategy.WriteEventsListenerreturned fromFlushStrategy.apply(FlushSender), this method will be called at most once when writes are cancelled.voidFor each newFlushStrategy.WriteEventsListenerreturned fromFlushStrategy.apply(FlushSender), this method will be called at most once before any items are written to the connection.voidFor each newFlushStrategy.WriteEventsListenerreturned fromFlushStrategy.apply(FlushSender), this method will be called at most once when all other items are written to the connection.
-
Constructor Details
-
NoopWriteEventsListener
public NoopWriteEventsListener()
-
-
Method Details
-
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
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
-