InMemoryMessagingNetwork.MockMessagingService
Keywords: net.corda.testing.node.InMemoryMessagingNetwork.MockMessagingService class
Date: 2023-09-18

net.corda.testing.node

## Class InMemoryMessagingNetwork.MockMessagingService

- net.corda.testing.node.InMemoryMessagingNetwork.MockMessagingService

- Enclosing class:
    InMemoryMessagingNetwork

      public static class InMemoryMessagingNetwork.MockMessagingService

  A class that provides an abstraction over the nodes' messaging service that also contains the ability to receive messages from the queue for testing purposes.

- - ### Field Detail

    - #### Companion

          public static net.corda.testing.node.InMemoryMessagingNetwork.MockMessagingService.Companion Companion

  - ### Method Detail

    - #### pumpReceive

          @Nullable
          public net.corda.testing.node.InMemoryMessagingNetwork.MessageTransfer pumpReceive(boolean block)

      Delivers a single message from the internal queue. If there are no messages waiting to be delivered and block is true, waits until one has been provided on a different thread via send. If block is false, the return result indicates whether a message was delivered or not.

      Returns:
        the message that was processed, if any in this round.