TibrvMsg()
Constructor
Declaration
TibrvMsg
()TibrvMsg
(TibrvMsg msg) throws TibrvExceptionTibrvMsg
(byte[] bytes) throws TibrvException
Purpose
Remarks
None of these constructors place address information on the new message object.
This class has no destroy()
method. Instead, the Java garbage collector reclaims storage automatically. To actively manage message storage, see TibrvMsg.dispose().
To use an inbound message outside of its callback, you can use the copy constructor to detach (that is, copy) a message—for example, to process a message in a different thread. (If your program detaches a message, then you must also ensure that no references to the copy remain; such references could interfere with garbage collection. Furthermore, when using the TIBCO Rendezvous JNI preferred library, we recommend that programs call TibrvMsg.dispose() to explicitly release the copy’s storage within the native C environment.)
Parameter |
Description |
|
Create an independent copy of this message. |
|
Create a message with fields populated from this byte array. For example, programs can create such byte arrays from messages using the method TibrvMsg.getAsBytes(), and store them in files; after reading them from such files, programs can reconstruct a message from its byte array. |
Method Forms
With no argument, create an empty message (with no fields).
With a TibrvMsg argument, create an independent copy of that message, copying all its fields (field values are also independent copies).
With a byte array argument, create a message with fields populated from the byte array.