Top Description Methods
com.mysql.cj.protocol

public Interface MessageListener<M extends Message>

Known Direct Implementers
com.mysql.cj.protocol.x.ResultMessageListener
Type Parameters
<M>
Message type
Imports
com.mysql.cj.exceptions.CJOperationNotSupportedException, .ExceptionFactory

Sink for messages that are read asynchonously from the socket. Return whether the listener is done receiving messages.

Method Summary

Modifier and TypeMethod and Description
public void
error(Throwable
exception to pass to underlying Future.
ex
)

Exceptionally complete underlying Future.

public default boolean

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
processMessage
(M
Message instance
message
)

Process protocol message.

Method Detail

errorback to summary
public void error(Throwable ex)

Exceptionally complete underlying Future.

Parameters
ex:Throwable

exception to pass to underlying Future.

processMessageback to summary
public default boolean processMessage(M message)

Process protocol message.

Parameters
message:M

Message instance

Returns:boolean

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