Interface TransportSide

    • Method Detail

      • sendBatchTowardsTransport

        void sendBatchTowardsTransport​(java.util.List<Message> messages)
        Process or deliver a batch of messages heading towards a plug-in transport. Messages should be processed and passed to the next connectivity plug-in in the chain (for codecs) or delivered (for transports).

        The ability to handle messages in batches is provided to allow amortising the costs of delivering events.

        Threading: Plug-ins are required to ensure that they do not call into the next plug-in in their chain from more than one thread concurrently (although it does not have to be the same thread each time). Plug-ins may therefore assume that no additional locking is required in this method to protect access to the plug-in's state. The plug-in should be as responsive as possible to the ConnectivityPlugin.shutdown() method, which may be called at any time on any thread. If this method throws then the exception will be logged and the batch of messages dropped.