Package com.mysql.cj.protocol
Interface MessageListener<M extends Message>
- Type Parameters:
M- Message type
- All Known Implementing Classes:
ResultMessageListener
public interface MessageListener<M extends Message>
Sink for messages that are read asynchonously from the socket.
Return whether the listener is done receiving messages.
-
Method Summary
Modifier and Type Method Description voiderror(java.lang.Throwable ex)Exceptionally complete underlying Future.default booleanprocessMessage(M message)Process protocol message.
-
Method Details
-
processMessage
Process protocol message.- Parameters:
message-Messageinstance- Returns:
- true - if this listener is done with processing the messages sequence and may be discarded; false - if the next message must be dispatched to the same listener
-
error
void error(java.lang.Throwable ex)Exceptionally complete underlying Future.- Parameters:
ex- exception to pass to underlying Future.
-