Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved


Chapter 4 Sending and Receiving Data : How Adapters Receive Data

How Adapters Receive Data
This section discusses receiving data. For simplicity, the discussion uses a subscriber as an example. The same concepts apply if data is received as part of a client/server interaction.
When custom adapters receive data, the data always arrives in MTree format. The message format of the subscriber determines how data is handled. The following rules apply:
If the incoming message format matches the message format with which the subscriber was configured, an instance of the MDataEvent results. The custom adapter can then deserialize the MTree that contains the data, and use the resulting MInstance.
For example, the custom adapter application code could enter the data into a database or enterprise application, depending on the task the adapter has been set up to perform.
If the protocol is the same, but the wire format is not matched, the subscriber usually sends an MExceptionEvent that includes the message data. That way, the receiving custom adapter knows that something unusual has happened but still gets the data.
If the protocol is the same, and the wire format expected by the subscriber is rvMsg, the subscriber passes on the data that arrived, regardless of the content of the message, in an MDataEvent.

Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved