com.tibco.ftl

## Interface SubscriberListener

-     public interface SubscriberListener

  Message event handler.

  Customer programs implement this interface to process inbound messages.

  Programs instantiate their listener implementation classes, and may store closure data in fields of the instances. Programs then call `EventQueue.addSubscriber` to associate a subscriber listener object with a subscriber object.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `messagesReceived(java.util.List<Message> messages, EventQueue eventQueue)` Process inbound messages.

- - ### Method Detail

    - #### messagesReceived

          void messagesReceived(java.util.List<Message> messages,
                                EventQueue eventQueue)

      Process inbound messages.

      Programs define this callback method to process inbound messages. `EventQueue.dispatch` invokes this callback method, passing a list of messages and the event queue.

      The messages can arrive through different subscribers. The only aspect they necessarily share is that they require the same subscriber listener to process them.

      Inbound messages in callback methods belong to the FTL library; programs must not destroy them.

      The message objects are valid only until the callback method returns. To extend the lifetime of a message, make a copy using `Message.mutableCopy`.

      Programs must not dispatch any event queue from within any callback.

      Parameters:
        `eventQueue` - The callback method is processing messages from this queue.
        `messages` - The list of messages to process.