TIBCO FTL®
Public Member Functions | List of all members
TIBCO.FTL.ISubscriberListener Interface Reference

Message event handler. More...

Public Member Functions

void MessagesReceived (IMessage[] messages, ref int count, IEventQueue eventQueue)
 Process inbound messages. More...
 

Detailed Description

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 IEventQueue.AddSubscriber to associate a subscriber listener object with a subscriber object.

Member Function Documentation

void TIBCO.FTL.ISubscriberListener.MessagesReceived ( IMessage[]  messages,
ref int  count,
IEventQueue  eventQueue 
)

Process inbound messages.

Programs define this callback method to process inbound messages. IEventQueue.Dispatch() invokes this callback method.

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 Dispose them.

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

Programs must not access the messages array beyond the count argument, which determines the number of valid messages in the array. (Array elements beyond count can contain invalid objects, which remain from previous invocations.)

Do not access array elements beyond count , which could be less than the length of the array.

Even though count has type ref, do not modify its value.

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

Parameters
messagesThe array of messages to process.
countThe number of valid message objects in the messages array.
eventQueueThe callback method is processing messages from this queue.