TibrvMsgView

Class

Declaration

class com.tibco.tibrv.TibrvMsgView
  extends java.lang.Object

Purpose

View the fields of Rendezvous messages.

Remarks

A message view is a snapshot copy of a TIBCO Rendezvous message. All the data resides within the Java environment (not in the C environment). A view provides read-only access to field data of an inbound message.

To create a new view, see TibrvMsgView.extract().

Efficiency

When a callback method gets 10 or more fields, then a message view is usually more efficient than accessing the fields of the C message. Extracting a message view accesses the native C message only once, instead of repeatedly (with every get call).

When a callback method gets fewer than 10 fields, then getting fields from the native C message is usually more efficient.

Restrictions

TibrvMsgView and its methods are available only in the JNI preferred implementation. They are not available in the JNI backward compatibility implementation, nor in the pure Java implementation.

Method

Description

Message View Life Cycle and Properties

TibrvMsgView.extract()

Extract a snapshot view of a TIBCO Rendezvous message.

Fields

TibrvMsgView.get()

Get the value of a specified field from a message view snapshot.

Get Scalar from TibrvMsgView

Get the value of a field from a message view snapshot as a scalar value.

TibrvMsgView.getField()

Get a specified field from a snapshot message view.

TibrvMsgView.getFieldByIndex()

Get a field from a snapshot message view by an index.

TibrvMsgView.getFieldInstance()

Get a specific instance of a field from a message.

TibrvMsgView.getNumFields()

Extract the number of fields in a snapshot message view.

Inherited Methods

java.lang.Object.equals

java.lang.Object.getClass

java.lang.Object.hashCode

java.lang.Object.notify

java.lang.Object.notifyAll

java.lang.Object.wait

Using a Message View

try {
TibrvMsgView view = TibrvMsgView.extract(message);
for (int i = 1; i <= this.fieldCount; i++) {
view.get(i);
...
}
} catch (final TibrvException e) {
e.printStackTrace();
System.exit(0);
}

See Also

Strings and Character Encodings

TibrvMsg

TibrvMsgField

Custom Datatypes