Package com.qfs.msg
Interface IMessageHandler<I>
-
- Type Parameters:
I- The indentifier of the handled messages.
- All Known Implementing Classes:
AFeedLoadingHandler,FileInfoLogMessageHandler,LogExternalFeedLoadingHandler,LogMessageHandler
public interface IMessageHandler<I>Callback when there is an event on the message.- Author:
- ActiveViam
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidonError(I key, Throwable ex)The method that is called when there is an error.voidonMessagePublished(I key, IPublicationInfo info)Called after the message has been successfully published.voidonMessageStarted(I key)Called when the message starts.
-
-
-
Method Detail
-
onMessageStarted
void onMessageStarted(I key)
Called when the message starts.- Parameters:
key- the key of the message
-
onMessagePublished
void onMessagePublished(I key, IPublicationInfo info)
Called after the message has been successfully published.- Parameters:
key- the key of the messageinfo- information about the publication of the message (optional, may be null if the data source does not support this feature)
-
onError
void onError(I key, Throwable ex)
The method that is called when there is an error.This method is supposed to gracefully handle the error without failure. Particularly, throwing in this method results in an undefined behaviour, including the unexpected stoppage of the channel processing.
- Parameters:
key- the key of the messageex- the exception
-
-