Class ResultMessageListener<R>

java.lang.Object
com.mysql.cj.protocol.x.ResultMessageListener<R>
All Implemented Interfaces:
MessageListener<XMessage>

public class ResultMessageListener<R>
extends java.lang.Object
implements MessageListener<XMessage>
A MessageListener to handle result data and propagate it to a ResultBuilder.
  • Constructor Summary

    Constructors 
    Constructor Description
    ResultMessageListener​(java.util.Map<java.lang.Class<? extends com.google.protobuf.GeneratedMessageV3>,​ProtocolEntityFactory<? extends ProtocolEntity,​XMessage>> messageToProtocolEntityFactory, ResultBuilder<R> resultBuilder, java.util.concurrent.CompletableFuture<R> future)  
  • Method Summary

    Modifier and Type Method Description
    void error​(java.lang.Throwable ex)
    Exceptionally complete underlying Future.
    boolean processMessage​(XMessage message)
    Process protocol message.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • processMessage

      public boolean processMessage​(XMessage message)
      Description copied from interface: MessageListener
      Process protocol message.
      Specified by:
      processMessage in interface MessageListener<R>
      Parameters:
      message - Message instance
      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

      public void error​(java.lang.Throwable ex)
      Description copied from interface: MessageListener
      Exceptionally complete underlying Future.
      Specified by:
      error in interface MessageListener<R>
      Parameters:
      ex - exception to pass to underlying Future.