Tibco Rendezvous 8.1 Java Reference
Tibco Rendezvous 8.1 Java Reference
Tibco Rendezvous 8.1 Java Reference
Java Reference
Software Release 8.1
April 2008
Important Information
SOME TIBCO SOFTWARE EMBEDS OR BUNDLES OTHER TIBCO SOFTWARE. USE OF SUCH EMBEDDED
OR BUNDLED TIBCO SOFTWARE IS SOLELY TO ENABLE THE FUNCTIONALITY (OR PROVIDE LIMITED
ADD-ON FUNCTIONALITY) OF THE LICENSED TIBCO SOFTWARE. THE EMBEDDED OR BUNDLED
SOFTWARE IS NOT LICENSED TO BE USED OR ACCESSED BY ANY OTHER TIBCO SOFTWARE OR FOR
ANY OTHER PURPOSE.
USE OF TIBCO SOFTWARE AND THIS DOCUMENT IS SUBJECT TO THE TERMS AND CONDITIONS OF A
LICENSE AGREEMENT FOUND IN EITHER A SEPARATELY EXECUTED SOFTWARE LICENSE
AGREEMENT, OR, IF THERE IS NO SUCH SEPARATE AGREEMENT, THE CLICKWRAP END USER
LICENSE AGREEMENT WHICH IS DISPLAYED DURING DOWNLOAD OR INSTALLATION OF THE
SOFTWARE (AND WHICH IS DUPLICATED IN TIBCO Rendezvous Installation) OR IF THERE IS NO SUCH
SOFTWARE LICENSE AGREEMENT OR CLICKWRAP END USER LICENSE AGREEMENT, THE LICENSE(S)
LOCATED IN THE “LICENSE” FILE(S) OF THE SOFTWARE. USE OF THIS DOCUMENT IS SUBJECT TO
THOSE TERMS AND CONDITIONS, AND YOUR USE HEREOF SHALL CONSTITUTE ACCEPTANCE OF
AND AN AGREEMENT TO BE BOUND BY THE SAME.
This document contains confidential information that is subject to U.S. and international copyright laws and
treaties. No part of this document may be reproduced in any form without the written authorization of TIBCO
Software Inc.
TIB, TIBCO, TIBCO Adapter, Predictive Business, Information Bus, The Power of Now, Rendezvous and TIBCO
Rendezvous are either registered trademarks or trademarks of TIBCO Software Inc. in the United States and/or
other countries.
EJB, Java EE, J2EE, and all Java-based trademarks and logos are trademarks or registered trademarks of Sun
Microsystems, Inc. in the U.S. and other countries.
All other product and company names and marks mentioned in this document are the property of their
respective owners and are mentioned for identification purposes only.
THIS SOFTWARE MAY BE AVAILABLE ON MULTIPLE OPERATING SYSTEMS. HOWEVER, NOT ALL
OPERATING SYSTEM PLATFORMS FOR A SPECIFIC SOFTWARE VERSION ARE RELEASED AT THE SAME
TIME. SEE THE README.TXT FILE FOR THE AVAILABILITY OF THIS SOFTWARE VERSION ON A
SPECIFIC OPERATING SYSTEM PLATFORM.
THIS DOCUMENT IS PROVIDED “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR
IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT.
THIS DOCUMENT COULD INCLUDE TECHNICAL INACCURACIES OR TYPOGRAPHICAL ERRORS.
CHANGES ARE PERIODICALLY ADDED TO THE INFORMATION HEREIN; THESE CHANGES WILL BE
INCORPORATED IN NEW EDITIONS OF THIS DOCUMENT. TIBCO SOFTWARE INC. MAY MAKE
IMPROVEMENTS AND/OR CHANGES IN THE PRODUCT(S) AND/OR THE PROGRAM(S) DESCRIBED IN
THIS DOCUMENT AT ANY TIME.
THE CONTENTS OF THIS DOCUMENT MAY BE MODIFIED AND/OR QUALIFIED, DIRECTLY OR
INDIRECTLY, BY OTHER DOCUMENTATION WHICH ACCOMPANIES THIS SOFTWARE, INCLUDING
BUT NOT LIMITED TO ANY RELEASE NOTES AND "READ ME" FILES.
Copyright © 1997–2008 TIBCO Software Inc. ALL RIGHTS RESERVED.
TIBCO Software Inc. Confidential Information
| iii
Contents
Figures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xi
Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiii
Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xv
Manual Organization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvi
Related Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvii
TIBCO Product Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvii
How to Contact TIBCO Customer Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xix
Chapter 1 Concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Implementations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Strings and Character Encodings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Interrupting Event Dispatch Threads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Rendezvous Daemon and Agent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Java Applications and Applets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Security versus Efficiency. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Starting rvd Automatically . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Starting rva . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Browser Security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Network Overview—rvd Transports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Network Overview—rva Transports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Internet Web Site Considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Rendezvous Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Home Computer and Port. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
HTTP Tunneling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Isolate External from Internal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Intranet Web Site Considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Rendezvous Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
JNI Shared Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
rvd. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Install . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Compile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Run . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Archive Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Shared Library Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Chapter 4 Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
Field Names and Field Identifiers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
Finding a Field Instance. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
TibrvMsg . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
TibrvMsg() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
TibrvMsg.add(). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
Add Scalar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
TibrvMsg.addField() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
TibrvMsg.get() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
Get Scalar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
TibrvMsg.getAsBytes(). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
TibrvMsg.getByteSize() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
TibrvMsg.getField() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
TibrvMsg.getFieldByIndex() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
TibrvMsg.getFieldInstance() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
TibrvMsg.getNumFields(). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
TibrvMsg.getReplySubject(). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
TibrvMsg.getSendSubject() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
TibrvMsg.getStringEncoding() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
TibrvMsgCallback . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124
TibrvMsgCallback.onMsg() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
TibrvTimer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
TibrvTimer() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
TibrvTimer.getInterval() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130
TibrvTimer.resetInterval() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
TibrvTimerCallback . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
TibrvTimerCallback.onTimer() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133
TibrvDispatchable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
TibrvDispatchable.dispatch() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135
TibrvDispatchable.poll() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136
TibrvDispatchable.timedDispatch() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
TibrvQueue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138
TibrvQueue() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141
TibrvQueue.destroy() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142
TibrvQueue.dispatch() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143
TibrvQueue.getCount() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144
TibrvQueue.getDiscardAmount() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145
TibrvQueue.getLimitPolicy(). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146
TibrvQueue.getMaxEvents() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147
TibrvQueue.getName() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148
TibrvQueue.getPriority(). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149
TibrvQueue.isDefault(). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150
TibrvQueue.isValid(). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151
TibrvQueue.poll() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152
TibrvQueue.setName() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153
TibrvQueue.setLimitPolicy(). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154
TibrvQueue.setPriority(). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155
TibrvQueue.timedDispatch() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156
TibrvQueueGroup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157
TibrvQueueGroup() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159
TibrvQueueGroup.add(). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160
TibrvQueueGroup.contains() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161
TibrvQueueGroup.destroy() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162
TibrvQueueGroup.dispatch() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163
TibrvQueueGroup.elements() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164
TibrvQueueGroup.getCount() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165
TibrvQueueGroup.isValid(). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166
TibrvQueueGroup.poll() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167
TibrvQueueGroup.remove(). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168
TibrvQueueGroup.timedDispatch() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169
TibrvDispatcher . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170
TibrvDispatcher() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172
TibrvFtMember.getPreparationInterval() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 230
TibrvFtMember.getQueue() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231
TibrvFtMember.getTransport() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232
TibrvFtMember.getWeight() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233
TibrvFtMember.isValid() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234
TibrvFtMember.setWeight() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235
TibrvFtMemberCallback . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236
TibrvFtMemberCallback.onFtAction() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237
TibrvFtMonitor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239
TibrvFtMonitor() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241
TibrvFtMonitor.destroy(). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243
TibrvFtMonitor.getGroupName() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244
TibrvFtMonitor.getTransport() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245
TibrvFtMonitorCallback . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246
TibrvFtMonitorCallback.onFtMonitor() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 341
Figures
Tables
Table 1 Implementations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Table 2 Archive Files. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Table 3 Environment Variables for Shared Library Files. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Table 4 Datatype Constants . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
Table 5 Date and Time Representations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
Preface
This manual describes the TIBCO Rendezvous® API for Java programmers. It is
part of the documentation set for Rendezvous Software Release 8.1.
Topics
Manual Organization
The organization of this book mirrors the underlying object structure of the
Rendezvous Java API. Each chapter describes a group of closely related objects
and their methods.
Within each chapter, methods are grouped with their objects.
Related Documentation
For comments or problems with this manual or the software it addresses, please
contact TIBCO Support as follows.
• For an overview of TIBCO Support, and information about getting started
with TIBCO Product Support, visit this site:
http://www.tibco.com/services/support
• If you already have a valid maintenance or support contract, visit this site:
http://support.tibco.com
Entry to this site requires a username and password. If you do not have a
username, you can request one.
Chapter 1 Concepts
This chapter presents concepts specific to the TIBCO Rendezvous® Java language
interface. For concepts that pertain to Rendezvous software in general, see the
book TIBCO Rendezvous Concepts.
Topics
• Implementations, page 2
• Strings and Character Encodings, page 3
• Interrupting Event Dispatch Threads, page 5
• Rendezvous Daemon and Agent, page 6
• Network Overview—rvd Transports, page 9
• Network Overview—rva Transports, page 11
• Internet Web Site Considerations, page 13
• Intranet Web Site Considerations, page 16
Implementations
Table 1 Implementations
Speed Faster for receiving Faster for receiving Generally not as fast as
applications that access a applications that access either native C
small subset of fields all fields of inbound implementation.
from inbound messages. messages.
Transport rvd and intra-process rvd, rva, and rva and intra-process
Support transports intra-process transports transports
Library Must load the Rendezvous JNI library Does not require the
Requirements Rendezvous JNI library
Encodings and Java programs represent all these strings in the Unicode 2-byte character set.
Translation
• Before sending an outbound message, Rendezvous software translates these
strings into the character encoding appropriate to the ISO locale.
• Conversely, when extracting a string from an inbound message, Rendezvous
software translates it to Unicode according to the encoding tag of the message.
If a message has no tag, Rendezvous translates its strings as if the message
used the default encoding (see Default Encoding, below). This assumption is
not always correct (see Inbound Translation, below).
Default Encoding The default encoding depends on the locale where Java is running. That is, the
locale determines the value of the Java system property file.encoding, which in
turn determines the translation scheme.
For example, the United States is locale en_US, and uses the Latin-1 character
encoding (also called ISO 8859-1); Japan is locale ja_JP, and uses the Shift-JIS
character encoding.
When the system property file.encoding is inaccessible, the default encoding is
8859-1 (Latin-1). Programs can override this system property; for details, see
TibrvMsg.setStringEncoding() on page 79.
Outbound Translation
Outbound translation from Unicode to a specified encoding usually occurs when
adding a string to a message. However, in an rva environment (using
tibrvjweb.jar) translation occurs later—when sending the message, or when
explicitly converting the message to a byte array.
Exotic Characters A wire-format string can contain only characters that are valid in the encoding of
the surrounding message. The translation procedure detects exotic characters,
and throws an exception with TibrvStatus.INVALID_ENCODING.
Inbound Translation
Inbound translation occurs before the program receives the data.
Automatic inbound translation is correct when two programs exchange messages
within the same locale.
In contrast, the automatic translation might be incorrect when the sender and
receiver use different character encodings.
In this situation, the receiver must explicitly retranslate to the local encoding.
To effectively interrupt such a thread, a program can destroy the queue or queue
group. In this situation, the dispatch method throws an exception; the thread can
use that exception as an occasion to exit.
Rendezvous Java programs can connect to the network in either of two ways:
• An rvd transport connects to a Rendezvous daemon process (rvd).
• An rva transport connects to a Rendezvous agent process (rva), which in turn
connects to a Rendezvous daemon process.
This section describes the two kinds of transports, the processes to which they
connect, and the reasons for choosing each one.
Figure 2 on page 12 depicts rva (center) in this intermediary role between Java
applets and rvd. On the left side of Figure 2, a user downloads a Java applet from
a remote server; the applet connects back to that home server to gain access to the
home network, so the applet can exchange data with programs on that network.
Remote Java applets cannot spawn processes on the home network. Instead of
spawning rvd on the home network, they connect to rva—which must already be
running before any applet attempts to connect. Network administrators retain
complete control over rva, along with its use of LAN, file and computational
resources on the home network.
The Rendezvous agent also protects rvd from inappropriate requests; rva checks
and filters all requests from Java applets, so rvd receives only well-formed,
legitimate requests.
Java applets using rva do not require Rendezvous shared libraries (JNI), so they
can run in browsers on computers where Rendezvous software is not installed.
However, rva does not support certified message delivery, distributed queue or
fault tolerance features. Java programs that use these features must connect
directly to rvd; these features are not available to applets that connect from
remote networks through rva.
For connections to the local network, a direct connection to rvd is more efficient
than an indirect connection through rva to rvd. In all situations we recommend
rvd transports in preference to rva transports—except for applets connecting to a
remote home network, which must use rva transports.
For information about transport objects, see TibrvTransport on page 176.
For more information about rvd, see Rendezvous Daemon (rvd) on page 35 in
TIBCO Rendezvous Administration.
For more information about rva, see Rendezvous Agent (rva) on page 253 in
TIBCO Rendezvous Administration.
Starting rva
Java programs can never start rva automatically; they must connect to an existing
rva process.
Start the Rendezvous agent using the rva command or icon. The rva command
line accepts rvd command parameters, and uses them to start rvd (when
appropriate).
When rva starts, it attempts to connect to an rvd process with identical
parameters. If an appropriate rvd process is not already running, rva starts it
automatically. If rvd terminates, rva restarts it automatically. (However, rva can
start rvd only on the same computer; it cannot automatically start a remote rvd.)
Numerous Java applets can connect to one rva process, and each applet can create
several TibrvRvaTransport objects (each representing a separate connection to
rva). An rva process instance connects to rvd only once, with a single transport,
regardless of the number of Java TibrvRvaTransport objects that connect to it.
For more information about starting rva, see Rendezvous Agent (rva) on
page 253 in TIBCO Rendezvous Administration.
For more information about starting rvd, see Rendezvous Daemon (rvd) on
page 35 in TIBCO Rendezvous Administration.
Browser Security
rva
Browsers download applets from web servers, using the hypertext transport
protocol (HTTP). A web server host runs a process that services HTTP requests.
Standard browser security arrangements permit an applet to connect back across
the Internet to the web server host where it originated. Rendezvous applets that
use rva transports connect in this way, and so require this permission (for details,
see Internet Web Site Considerations on page 13).
rvd
Applets that use rvd transports connect to an rvd process. Most browsers permit
TCP connections from locally installed classes, with appropriate configuration.
For more information, see the documentation for the browser.
Physical
Software Hardware
Connections
Internal Network
rvd Java Applet
Internal Computer
Download
rvd Java Applet
Applet Internal Computer
http Server
Daemon
Intranet Server Host
Download
Applet
Internal Network
Information Bus
Independent
rvd
Java App
Internal Computer
Physical
Software Hardware
Connections
Remote
Internet
Java Applet
External Computer
Download
Applet
A
Hardware Router
Outer Firewall
Outer Firewall
http Server
rva
Daemon
Internet Server Host
Inner Firewall
B
Hardware Router
Inner Firewall
rvd
Internal Computer
Internal Network
Information Bus
Local
rvd
Java Applet
Internal Computer
When you design Java applets that connect to an Internet web site, pay special
attention to these issues.
Rendezvous Files
For correct download and operation of your applet, Rendezvous files must be
available in the applet’s code base directory.
• Place the jar archive file in the code base directory. The jar file is named
tibrvjweb.jar.
• Embed the applet in a web page. In the HTML source file, use the <APPLET>
tag, and specify the ARCHIVE argument:
ARCHIVE=codebase_dir/tibrvjweb.jar
An rva process on the home computer must be listening for client connections on
the correct TCP port. Be sure that your calls to RvTibrvRvaTransport() use a
TCP port that matches the -listen parameter of rva.
HTTP Tunneling
Direct TCP connections to rva yield the best performance. However, intervening
firewalls and proxy servers usually prevent applets from establishing direct TCP
connections to rva.
To alleviate this restriction in some situations, rva can use a technique called
HTTP tunneling, in which it communicates with its client applets through a TCP
port using the (slower) HTTP protocol.
This solution works in two situations:
• Tunnel to the Web Server Host on page 14
• Signed Applets on page 15
Applet
HTTP
http Server
rva
Daemon
Web Server Host
Signed Applets
Most browsers allow signed applets to connect to computers other than the web
server host. If rva runs on a host computer other than the web server host, then
rva can listen on HTTP port 80, and signed applet clients can contact it. Figure 4
on page 15 illustrates this situation. However, unsigned applets can connect only
to the web server host; browsers prevent unsigned applets from connecting to any
other computer.
Signed
Applet
HTTP 80 HTTP 80
Client Firewall
Connection
Download
Applet
HTTP
HTTP 80 HTTP 80
Server Firewall
http Server
rva
Daemon
Web Server Host rva Host
When you design Java programs that run on an intranet—using rvd transports to
connect to the local network—pay special attention to these issues.
Rendezvous Files
Correct operation of programs requires the Rendezvous classes. The program
searches for the archive file that contains the Rendezvous classes; the CLASSPATH
environment variable guides the search.
rvd
TibrvRvdTransport objects must be able to connect to an rvd process. We
recommend that you install the rvd executable on the client host computer.
Topics
• Checklist, page 18
• Archive Files, page 20
• Shared Library Files, page 21
Checklist
Developers of Rendezvous programs can use this checklist during the four phases
of the development cycle: installing Rendezvous software, coding your Java
program, compiling your Java program, and running your program as either an
independent application or as a browser applet.
Install
• Install the Rendezvous software release, which automatically includes the
Java archive files in the lib subdirectory.
• The CLASSPATH variable must include an archive file that contains the
Rendezvous classes.
On UNIX platforms, include the appropriate archive file from Table 2, Archive
Files, on page 20.
On other supported platforms, this step is automatic.
Code
• Import the correct Rendezvous package.
Import com.tibco.tibrv.*
Compile
• The CLASSPATH variable must include an archive file that contains the
Rendezvous classes. Include the appropriate archive file from Table 2, Archive
Files, on page 20.
Run
• Both rvd and rva require valid licensing.
See Licensing Information on page 11 in TIBCO Rendezvous Administration.
• The CLASSPATH variable must include the location of the Rendezvous classes.
Include the appropriate archive file from Table 2, Archive Files, on page 20.
• The application must be able to connect to a Rendezvous daemon process
(rvd).
Archive Files
Table 2 details the jar files for various implementations of Rendezvous for Java.
Place the appropriate jar file in the CLASSPATH environment variable.
JNI Thin-Message
The following two native (JNI) implementations use thin-message technology, which performs best
with receiving applications that access only a few fields from inbound messages (ignoring the
remaining fields).
JNI Full-Message
The following two native (JNI) implementations use full-message technology, which performs best
with receiving applications that access all the fields of inbound messages.
Independent Java applications that use rvd transports must be able to access
Rendezvous shared library files (C libraries). Table 3 details the environment
variables that direct Java applications to the Rendezvous installation directory.
The installation directory must contain the required shared library files.
This brief chapter describes the methods that open and close the internal
machinery upon which Rendezvous software depends.
Topics
• Tibrv, page 24
• TibrvSdContext, page 36
Tibrv
Class
Remarks Programs do not create instances of Tibrv. Instead, programs use its static
methods to open and close the Rendezvous environment. Private constants and
variables contain references to Rendezvous resources.
For a list of constants that this class defines, see Implementations on page 33.
Utility Objects
Asynchronous Errors
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.toString
java.lang.Object.wait
Tibrv.close()
Method
After closing a Tibrv object, all events, transports, queues and queue groups
associated with that environment are invalid; it is illegal to call any methods of
these objects.
After closing a Tibrv environment, you can reopen it either with the same
implementation, or with a different implementation.
Reference Count A reference count protects against interactions between programs and third-party
packages that call Tibrv.open() and Tibrv.close(). Each call to Tibrv.open()
increments an internal counter; each call to Tibrv.close() decrements that
counter. A call to Tibrv.open() actually creates internal machinery only when
the reference counter is zero; subsequent calls merely increment the counter, but
do not duplicate the machinery. A call to Tibrv.close() actually destroys the
internal machinery only when the call decrements the counter to zero; other calls
merely decrement the counter. In each program, the number of calls to
Tibrv.open() and Tibrv.close() must match.
Tibrv.defaultQueue()
Method
Tibrv.getErrorCallback()
Method
Remarks If the program has not set an error callback, this method returns null.
Tibrv.getVersion()
Method
Remarks getVersion() returns the version number of the Java package (whether using
machinery from Tibrv.IMPL_JAVA or Tibrv.IMPL_NATIVE).
getCmVersion() returns the version number of the underlying C implementation
of the certified delivery library (Tibrv.IMPL_NATIVE only).
getFtVersion() returns the version number of the underlying C implementation
of the fault tolerance library (Tibrv.IMPL_NATIVE only).
getMajorVersion(), getMinorVersion() and getUpdateVersion() return the
three segments of the complete version number that getVersion() returns (it
formats these three segments into a string).
The method getVersionString() is deprecated (though not yet obsolete),
starting with release 6.2. We encourage programmers to migrate to getVersion()
instead.
Tibrv.isNativeImpl()
Method
Tibrv.isValid()
Method
Remarks This method returns true after the method Tibrv.open() has returned
successfully.
Otherwise this method returns false. The value false usually indicates one of
these situations:
• The program has not opened the Rendezvous environment.
• Attempts to open the environment failed.
• The environment was open, but the program closed it with Tibrv.close().
Tibrv.open()
Method
Remarks This call creates the internal machinery that Rendezvous software requires for its
operation:
• Internal data structures.
• Default event queue.
• Intra-process transport.
• Event driver.
Until the first call to Tibrv.open() creates the internal machinery, all events,
transports, queues and queue groups are unusable. Messages and their methods
do not depend on the internal machinery.
Parameter Description
implementation Open Rendezvous using this implementation.
Choose a value from among the constants
Tibrv.IMPL_NATIVE, Tibrv.IMPL_JAVA, and
Tibrv.IMPL_SELECT. See Implementations on page 33.
Method Forms With no argument, open using Tibrv.IMPL_SELECT. To determine the actual
implementation, use Tibrv.isNativeImpl() on page 30.
With an implementation argument, open using the specified implementation.
Constant Description
Tibrv.IMPL_NATIVE Open Rendezvous machinery using the implementation in the JNI library,
if possible; otherwise, throw a TibrvException with one of these status
codes: TibrvStatus.VERSION_MISMATCH,
TibrvStatus.WRONG_JAVA_ARCHIVE, TibrvStatus.LIBRARY_NOT_FOUND,
TibrvStatus.LIBRARY_NOT_LOADED.
Tibrv.IMPL_SELECT Open Rendezvous machinery using JNI library if possible; otherwise, use
the Java implementation.
Reference Count A reference count protects against interactions between programs and third-party
packages that call Tibrv.open() and Tibrv.close(). Each call to Tibrv.open()
increments an internal counter; each call to Tibrv.close() decrements that
counter. A call to Tibrv.open() actually creates internal machinery only when
the reference counter is zero; subsequent calls merely increment the counter, but
do not duplicate the machinery. A call to Tibrv.close() actually destroys the
internal machinery only when the call decrements the counter to zero; other calls
merely decrement the counter. In each program, the number of calls to
Tibrv.open() and Tibrv.close() must match.
Tibrv.processTransport()
Method
Tibrv.setErrorCallback()
Method
Parameter Description
errorCallback Use this TibrvErrorCallback object to process all
asynchronous errors.
TibrvSdContext
Class
Purpose This class defines static methods for interacting with secure Rendezvous
daemons.
Remarks Programs do not create instances of TibrvSdContext. Instead, programs use its
static methods to configure user names, passwords and certificates, and to
register trust in daemon certificates.
To use the methods of this class, Java programs must satisfy these two criteria:
• Programs must compile and run with the archive file tibrvjsd.jar (which
defines this class); see Archive Files on page 20.
• Programs must open the Rendezvous environment using the native
implementation; see Tibrv.open() on page 32—in particular, the constant
Tibrv.IMPL_NATIVE, which specifies the Rendezvous JNI library
implementation.
TibrvSdContext.setDaemonCert()
Method
Remarks When any program transport connects to a secure daemon, it verifies the
daemon’s identity using SSL protocols. Certificates registered using this method
identify trustworthy daemons. Programs divulge user names and passwords to
daemons that present registered certificates.
Parameter Description
daemonName Register a certificate for a secure daemon with this name. For
the syntax and semantics of this parameter, see Daemon
Name, below.
daemonCert Register this public certificate. The text of this certificate must
be in PEM encoding. See also Certificate on page 38.
This string must be identical to the string you supply as the daemon argument to
the transport creation call; see TibrvRvdTransport() on page 200.
Colon characters (:) separate the three parts.
ssl indicates the protocol to use when attempting to connect to the daemon.
host indicates the host computer of the secure daemon. You can specify this host
either as a network IP address, or a hostname. Omitting this part specifies the
local host.
port_number specifies the port number where the secure daemon listens for SSL
connections.
(This syntax is similar to the syntax connecting to remote daemons, with the
addition of the prefix ssl.)
In place of this three-part string, you can also supply the constant
TibrvSdContext.TIBRV_SECURE_DAEMON_ANY_NAME. This form lets you register
a catch-all certificate that applies to any secure daemon for which you have not
explicitly registered another certificate. For example, you might use this form
when several secure daemons share the same certificate.
Certificate For important details, see CA-Signed Certificates on page 165 in TIBCO
Rendezvous Administration.
In place of an actual certificate, you can also supply the constant
TibrvSdContext.TIBRV_SECURE_DAEMON_ANY_CERT. The program accepts any
certificate from the named secure daemon. For example, you might use this form
when testing a secure daemon configuration, before generating any actual
certificates.
TibrvSdContext.setUserCertWithKey()
Method
Purpose Register a (PEM) certificate with private key for identification to secure daemons.
Remarks When any program transport connects to a secure daemon, the daemon verifies
the program’s identity using SSL protocols.
The Rendezvous API includes two methods that achieve similar effects:
• This call accepts a certificate in PEM text format.
• TibrvSdContext.setUserCertWithKeyBin() accepts a certificate in
PKCS #12 binary format.
Parameter Description
userCertWithKey Register this user certificate with private key. The text of
this certificate must be in PEM encoding.
CA-Signed You can also supply a certificate signed by a certificate authority (CA). To use a
Certificate CA-signed certificate, you must supply not only the certificate and private key,
but also the CA’s public certificate (or a chain of such certificates). Concatenate
these items in one string. For important details, see CA-Signed Certificates on
page 165 in TIBCO Rendezvous Administration.
TibrvSdContext.setUserCertWithKeyBin()
Method
Purpose Register a (PKCS #12) certificate with private key for identification to secure
daemons.
Remarks When any program transport connects to a secure daemon, the daemon verifies
the program’s identity using SSL protocols.
The Rendezvous API includes two methods that achieve similar effects:
• This call accepts a certificate in PKCS #12 binary format.
• TibrvSdContext.setUserCertWithKey() accepts a certificate in PEM text
format.
Parameter Description
userCertWithKey Register this user certificate with private key. The binary data of this
certificate must be in PKCS #12 format.
CA-Signed You can also supply a certificate signed by a certificate authority (CA). To use a
Certificate CA-signed certificate, you must supply not only the certificate and private key,
but also the CA’s public certificate (or a chain of such certificates). For important
details, see CA-Signed Certificates on page 165 in TIBCO Rendezvous
Administration.
TibrvSdContext.setUserNameWithPassword()
Method
Purpose Register a user name with password for identification to secure daemons.
Remarks When any program transport connects to a secure daemon, the daemon verifies
the program’s identity using SSL protocols.
Parameter Description
userName Register this user name for communicating with secure
daemons.
Chapter 4 Data
Topics
Search Characteristics
In general, an identifier search completes in constant time. In contrast, a name
search completes in linear time proportional to the number of fields in the
message. Name search is quite fast for messages with 16 fields or fewer; for
messages with more than 16 fields, identifier search is faster.
Space Characteristics
The smallest field name is a one-character string, which occupies three bytes in
Rendezvous wire format. That one ASCII character yields a name space of 127
possible field names; a larger range requires additional characters.
Field identifiers are 16 bits, which also occupy three bytes in Rendezvous wire
format. However, those 16 bits yield a space of 65535 possible field identifiers;
that range is fixed, and cannot be extended.
TibrvMsg
Class
Remarks This class has no destroy() method. Instead, the Java garbage collector reclaims
storage automatically.
(Sheet 1 of 3)
Fields
Get Scalar (convenience methods) Get the value of a field as a scalar value. 61
(Sheet 2 of 3)
Address Information
Custom Datatypes
See Appendix A, Custom Datatypes, on page 329.
(Sheet 3 of 3)
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
Datatype These constants are all defined with short values. To extract a human-readable
Constants name from a short value, see TibrvMsg.getTypeName() on page 72
Constant Comment
TibrvMsg.DEFAULT Used only as a type argument to
TibrvMsg.add()
TibrvMsg.MSG
TibrvMsg.DATETIME
TibrvMsg.OPAQUE
TibrvMsg.STRING
TibrvMsg.BOOL
TibrvMsg.I8
TibrvMsg.U8
TibrvMsg.I16
TibrvMsg.U16
TibrvMsg.I32
Constant Comment
TibrvMsg.U32
TibrvMsg.I64
TibrvMsg.U64
TibrvMsg.F32
TibrvMsg.F64
TibrvMsg.IPPORT16
TibrvMsg.IPADDR32
TibrvMsg.U8ARRAY
TibrvMsg.I16ARRAY
TibrvMsg.U16ARRAY
TibrvMsg.I32ARRAY
TibrvMsg.U32ARRAY
TibrvMsg.I64ARRAY
TibrvMsg.U64ARRAY
TibrvMsg.F32ARRAY
TibrvMsg.F64ARRAY
TibrvMsg.USER_LAST
TibrvMsg()
Constructor
Declaration TibrvMsg()
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.
Parameter Description
msg Create an independent copy of this message.
bytes 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.
TibrvMsg.add()
Method
void add(
java.lang.String fieldName,
java.lang.Object data,
short type)
throws TibrvException
void add(
java.lang.String fieldName,
java.lang.Object data,
short type,
int fieldId)
throws TibrvException
Remarks This method copies the information into the new message field. All related
convenience methods behave similarly.
(Sheet 1 of 2)
Parameter Description
fieldName Add a field with this name.
null is a legal name. However, if fieldId is non-zero, then
fieldName must be non-null.
type Add a field with this explicit type. For a list of types, see
Datatype Constants on page 48.
When absent or TibrvMsg.DEFAULT, determine the field’s type
from the type of the data. In Figure 5 on page 53, filled dots
indicate default encodings between homologous types.
(Sheet 2 of 2)
Parameter Description
fieldId Add a field with this identifier. All field identifiers must be
unique within each message.
When absent, add a field without an identifier.
Integers in the range [0, 65535] are valid identifiers.
Zero is a special value, indicating no identifier. It is illegal to add
a field that has both a null field name and a non-zero field
identifier.
Encoding and This method automatically tags Java data with a corresponding Rendezvous wire
Type format type; sending the message actually triggers the encoding into wire format.
Conversion Figure 5 on page 53 specifies default encodings with filled circles; for some types
you can override the default decoding by using convenience functions that force
specific types (see Add Scalar on page 54).
Encoding XML We recommend converting the XML document string to a byte sequence, using
the encoding that corresponds to your locale (file encoding system property).
Then create a TibrvXml object containing the bytes, and add that object to the
message. This practice ensures that all receivers can easily parse the resulting
XML document. For more information, see Decoding XML on page 59.
Nested Message When the data argument is a message object, this method adds only the data
portion of the nested message; it does not include any address information or
certified delivery information.
Empty Array The behavior of TibrvMsg.add differs among the various implementations when
the data argument is an empty array. The reason for the discrepancy is that Java
supports empty arrays, while C does not.
The native (JNI) thin-message implementation uses underlying C calls to
manipulate messages stored outside of the Java environment, so it cannot support
empty arrays; consequently, this method throws an exception when it receives an
empty array.
The native (JNI) full-message implementation and the pure Java implementation
both manipulate messages stored within the Java environment, so they do
support empty arrays; consequently, this method correctly adds an empty array
to a message field.
Add
TibrvMsg[]
TibrvDate
TibrvMsg
TibrvXml
double[]
String[]
Double
Integer
short[]
String
float[]
byte[]
long[]
Short
Float
Long
Date
Bool
Byte
int[]
TibrvMsg.BOOL N N N N
TibrvMsg.F32 S N S S N N
TibrvMsg.F64 S S S S N N
TibrvMsg.I8 S N N N
TibrvMsg.I16 S S N N N
TibrvMsg.I32 S S S N N S
TibrvMsg.I64 S S S S S S
TibrvMsg.U8 S N N N N
TibrvMsg.U16 S S N N N S
TibrvMsg.U32 S S S N N S S
tibrvMsg Destination Type
TibrvMsg.U64 S S S S N S S
TibrvMsg.IPADDR32 S S
TibrvMsg.IPPORT16 S S
TibrvMsg.DATETIME
TibrvMsg.F32ARRAY N S S N N
TibrvMsg.F64ARRAY S S S N N
TibrvMsg.I8ARRAY S N N N
TibrvMsg.I16ARRAY S N N
TibrvMsg.I32ARRAY S S N
TibrvMsg.I64ARRAY S S S
TibrvMsg.U8ARRAY S N N N
TibrvMsg.U16ARRAY S N N N
TibrvMsg.U32ARRAY S S N N
TibrvMsg.U64ARRAY S S S N
TibrvMsg.MSG
TibrvMsg.OPAQUE N N N
TibrvMsg.STRING
TibrvMsg.XML
TibrvMsg.MSGARRAY
TibrvMsg.STRINGARRAY
Key
Homologous types; conversion always supported; no loss of information
S Supported conversion; always supported
N Numeric conversion; loss of information is possible (without warning)
Unsupported conversion
Add Scalar
Convenience Methods
void add(
java.lang.String fieldName,
scalar_type data,
int fieldId)
throws TibrvException
void addUbits(
java.lang.String fieldName,
scalar_type data)
throws TibrvException
void addUbits(
java.lang.String fieldName,
scalar_type data,
int fieldId)
throws TibrvException
Method Forms The convenience methods named add() determine the field type from the
numeric type of the data.
The convenience methods named addUnn() add unsigned integer fields, discarding
the sign bit of a Java integer data value.
(Sheet 1 of 2)
(Sheet 2 of 2)
Parameter Description
fieldName Add a field with this name.
null is a legal name. However, if fieldId is non-zero, then
fieldName must be non-null.
fieldId Add a field with this identifier. All field identifiers must be
unique within each message.
When absent, add a field without an identifier.
Zero is a special value, indicating no identifier. It is illegal to add
a field that has both a null field name, and a non-zero field
identifier.
TibrvMsg.addField()
Method
Remarks This method copies the information into the new message field. All related
methods behave similarly.
It is illegal to add a field that has both a null field name, and a non-zero field
identifier.
Field Name The the longest possible field name is 127 bytes.
Length
Parameter Description
field Add this field to the message.
TibrvMsg.get()
Method
java.lang.Object get(
int fieldId)
throws TibrvException
java.lang.Object get(
java.lang.String fieldName,
int fieldId)
throws TibrvException
Remarks Programs specify the field to retrieve using the fieldName and fieldId
parameters.
The method returns a snapshot of the field value.
When a program gets fields with the datatypes listed here, this method (and
convenience methods) return a reference to the actual value in the message—not a
copy. Use caution when modifying values of these types: TibrvMsg.MSG,
TibrvMsg.DATETIME, TibrvMsg.IPPORT16, TibrvMsg.IPADDR32,
TibrvMsg.OPAQUE (extracted as a byte array), TibrvMsg.XML (extracted as a byte
array), and all array types.
Programs can use a related method to loop through all the fields of a message; to
retrieve each field by its integer index number, see
TibrvMsg.getFieldByIndex() on page 66.
Parameter Description
fieldName Get a field with this name.
If the program supplied a non-zero field identifier, then search for the field
with that identifier.
If the search succeeds, return the field.
On failure, continue to step 2.
2. If the identifier search (in step 1) fails, and the program supplied a non-null
field name, then search for a field with that name.
If the name search succeeds, and the identifier in the field is null, return the
field.
If the name search succeeds, but the actual identifier in the field is non-null
(so it does not match the identifier supplied) then throw an exception with the
status code TibrvStatus.ID_CONFLICT.
On failure, or if the program supplied null as the field name, return null.
3. When the program supplied zero as the identifier, or omitted any identifier,
then begin here.
Search for a field with the specified name—even if that name is null.
If the search succeeds, return the field.
On failure, return null.
If a message contains several fields with the same name, searching by name finds
the first instance of the field with that name.
Extracting Earlier releases of Rendezvous software allowed programs to get fields from a
Fields from a nested submessage by concatenating field names. Starting with release 6,
Nested Message Rendezvous software no longer supports this special case convenience. Instead,
programs must separately extract the nested submessage using TibrvMsg.get()
(or a related method), and then get the desired fields from the submessage.
Method Forms With only a field name, find the field by name. If the field name is not present in
the message, return null. If several fields with that name are present in the
message, this method returns the first one that it finds.
With only a field identifier, find the field with that identifier (since identifiers are
unique, the message can contain at most one such field). If the identifier is not
present in the message, return null.
With both a field name and a field identifier, search first by identifier, and then by
field name. If neither are present in the message, return null. If identifier search
succeeds, return the field value. If the name search succeeds, but the actual
identifier in the field is non-zero (so it does not match the identifier supplied) then
throw a TibrvException with status code TibrvStatus.ID_CONFLICT.
Decoding and This method automatically decodes the extracted field data from its Rendezvous
Type wire format type to a corresponding Java type. In Figure 6 on page 60, filled
Conversion circles (as well as + and - symbols) specify default decodings between
homologous types; for some types you can override the default decoding by
using convenience functions that force specific types (see Get Scalar on page 61).
Java does not admit unsigned integers. When extracting an unsigned integer from
an inbound message field, this method automatically promotes the value to the
corresponding Java type that is large enough to contain it (Figure 6 indicates this
with +). When extracting an unsigned 64-bit integer, Java does not have a type
that can contain a number that uses all 64 bits; this method decodes it to a Java
long, interpreting the high bit as a sign bit (Figure 6 indicates this with -).
Decoding XML After extracting the XML document into a byte array, explicitly convert it to a
string using the encoding that corresponds to your locale (file encoding system
property). For more information, see Encoding XML on page 52.
Get
TibrvIPAddr
TibrvIPPort
TibrvMsg[]
TibrvDate
TibrvMsg
TibrvXml
double[]
Double
String[]
Integer
short[]
String
byte[]
long[]
float[]
Short
Long
Float
Byte
Bool
int[]
TibrvMsg.BOOL N N N N N N
TibrvMsg.F32 N S N N N N
TibrvMsg.F64 N N N N N N
TibrvMsg.I8 N N N S S S
TibrvMsg.I16 N N N N S S
TibrvMsg.I32 N N N N N S
TibrvMsg.I64 N N N N N N
TibrvMsg.U8 N N N N + S S
TibrvMsg.U16 N N N N N + S
TibrvMsg.U32 N N N N N N +
TibrvMsg.U64 N N N N N N -
tibrvMsg Source Type
TibrvMsg.IPADDR32
TibrvMsg.IPPORT16
TibrvMsg.DATETIME
TibrvMsg.F32ARRAY
TibrvMsg.F64ARRAY
TibrvMsg.I8ARRAY
TibrvMsg.I16ARRAY
TibrvMsg.I32ARRAY
TibrvMsg.I64ARRAY
TibrvMsg.U8ARRAY
TibrvMsg.U16ARRAY
TibrvMsg.U32ARRAY
TibrvMsg.U64ARRAY
TibrvMsg.MSG
TibrvMsg.OPAQUE
TibrvMsg.STRING
TibrvMsg.XML
TibrvMsg.MSGARRAY
TibrvMsg.STRINGARRAY
Key
Homologous types; conversion always supported; no loss of information
S Supported conversion; always supported
N Numeric conversion; loss of information is possible (without warning)
+ Unsigned converted to signed integer with double bit precision; no loss of information
- Unsigned 64-bit integer interpreted as signed 64-bits; high bit interpreted as sign bit
Unsupported conversion
Get Scalar
Convenience Methods
scalar_type getAsScalar_type(
java.lang.String fieldName,
int fieldId)
throws TibrvException
Remarks Each convenience method in this family retrieves a field and extracts its data. If
the field’s type (as it exists) does not match the type of the convenience method,
then the gettype method throws an exception; in contrast, the getAstype method
attempts to convert the data (see Decoding and Type Conversion on page 59, and
Wire Format to Java Datatype Conversion Matrix on page 60). If conversion is not
possible, the method throws an exception with status code
TibrvStatus.CONVERSION_FAILED.
Parameter Description
fieldName Get a field with this name.
(Sheet 1 of 2)
(Sheet 2 of 2)
TibrvMsg.getAsBytes()
Method
Remarks Return a copy of the message data as a byte sequence, suitable for archiving in a
file. To reconstruct the message from bytes, see TibrvMsg() on page 50.
The byte data includes the message header and all message fields in Rendezvous
wire format. It does not include address information, such as the subject and reply
subject, nor certified delivery information.
The byte sequence can contain interior null bytes.
TibrvMsg.getByteSize()
Method
Remarks This measurement accounts for the actual space that the message occupies (in
wire format), including its header and its fields. It does not include address
information, such as the subject or reply subject.
Programs can use this function as part of these tasks:
• Assess throughput rates.
• Limit output rates (also called throttling).
TibrvMsg.getField()
Method
TibrvMsgField getField(
int fieldId)
throws TibrvException
TibrvMsgField getField(
java.lang.String fieldName,
int fieldId)
throws TibrvException
Remarks Programs specify the field to retrieve using the fieldName and fieldId
parameters.
The method takes a snapshot of the field, and returns that information as a field
object.
Programs can use a related method to loop through all the fields of a message; to
retrieve each field by its integer index number, see
TibrvMsg.getFieldByIndex() on page 66.
Parameter Description
fieldName Get a field with this name.
Method Forms With only a field name, find the field by name. If the field name is not present in
the message, return null. If several fields with that name are present in the
message, this method returns the first one that it finds.
With only a field identifier, find the field with that identifier (since identifiers are
unique, the message can contain at most one such field). If the identifier is not
present in the message, return null.
With both a field name and a field identifier, search first by identifier, and then by
field name. If neither are present in the message, return null.
TibrvMsg.getFieldByIndex()
Method
Remarks Programs can loop through all the fields of a message, to retrieve each field in
turn using an integer index.
The method takes a snapshot of the field, and returns that information as a field
object.
Add, remove and update calls can perturb the order of fields (which, in turn, affects
the results when a program gets a field by index).
Parameter Description
fieldIndex Get the field with this index. Zero specifies the first field.
TibrvMsg.getFieldInstance()
Method
Remarks When a message contains several field instances with the same field name,
retrieve a specific instance by number (for example, get the ith field named foo).
Programs can use this method in a loop that examines every field with a specified
name.
The argument 1 denotes the first instance of the named field.
The method takes a snapshot of the field, and returns that information as a field
object.
The method copies scalar data into the field object. Non-scalar data extracted
from the field remain valid until the message is destroyed; that is, even removing
the field or updating the field’s value does not invalidate non-scalar data (such as
arrays, strings, submessages, XML data, or opaque byte sequences).
When the instance argument is greater than the actual number of instances of
the field in the message, this method returns null.
Release 5 Rendezvous 5 (and earlier) did not support array datatypes. Some older
Interaction programs circumvented this limitation by using several fields with the same
name to simulate arrays. This work-around is no longer necessary, since release 6
(and later) supports array datatypes within message fields. The method
TibrvMsg.getFieldInstance() ensures backward compatibility, so new
programs can still receive and manipulate messages sent from older programs.
Nonetheless, we encourage programmers to use array types as appropriate, and
we discourage storing several fields with the same name in a message.
Parameter Description
fieldName Get an instance of the field with this name.
null specifies the empty string as the field name.
instance Get this instance of the specified field name. The argument 1
denotes the first instance of the named field.
TibrvMsg.getNumFields()
Method
Remarks This method counts the immediate fields of the message; it does not descend into
submessages to count their fields recursively.
TibrvMsg.getReplySubject()
Method
Remarks The reply subject string is part of a message’s address information—it is not part
of the message itself.
If the reply subject is not set, this method returns null.
TibrvMsg.getSendSubject()
Method
Remarks The subject string is part of a message’s address information—it is not part of the
message itself.
If the destination subject is not set, this method returns null.
TibrvMsg.getStringEncoding()
Method
Purpose Return the character encoding for converting between Java Strings and wire
format strings.
TibrvMsg.getTypeName()
Method
Remarks This static method returns string representations of the TibrvMsg datatype
constants. For example, it converts the type constant TibrvMsg.I8ARRAY to the
string "I8ARRAY".
For custom datatypes, this method returns a string of the form "USER_FIRST+3"
(for example).
If the type is invalid, this method returns the string INVALID.
Parameter Description
type Convert this type constant to a string name.
TibrvMsg.removeField()
Method
boolean removeField(
int fieldId)
boolean removeField(
java.lang.String fieldName,
int fieldId)
throws TibrvException
Parameter Description
fieldName Remove the field with this name.
Method Forms This method uses this algorithm to find and remove a field within a message, as
and the Field specified by a field identifier and a field name.
Search
1. If the program supplied zero as the identifier, or omitted any identifier, then
Algorithm
begin at step 3.
If the program supplied a non-zero field identifier, then search for the field
with that identifier. If the search succeeds, remove the field and return true.
On the search does not find a field, continue to step 2.
2. If the identifier search (in step 1) fails, and the program supplied a non-null
field name, then search for a field with that name.
On the search does not find a field, or if the program supplied null as the
field name, return false.
If the name search succeeds, but the actual identifier in the field is non-zero
(so it does not match the identifier supplied) then throw an exception with the
status code TibrvStatus.ID_CONFLICT.
If the search succeeds, remove the field and return true.
3. When the program supplied zero as the identifier, or omitted any identifier,
then begin here.
Search for a field with the specified name—even if that name is null.
If the search succeeds, remove the field and return true.
If a message contains several fields with the same name, searching by name
removes the first instance of the field with that name.
TibrvMsg.removeFieldInstance()
Method
Remarks When a message contains several field instances with the same field name,
remove a specific instance by number (for example, remove the ith field named
foo). Programs can use this method in a loop that examines every field with a
specified name.
The argument 1 denotes the first instance of the named field.
If the specified instance does not exist, the method returns false.
Parameter Description
fieldName Remove the field with this name.
instance Remove this instance of the field. The argument 1 specifies the
first instance of the named field.
TibrvMsg.reset()
Method
Remarks This method is the equivalent of creating a new message—except that the
unmanaged storage is re-used.
When this method returns, the message has no fields; it is like a newly created
message. The message’s address information is also reset.
TibrvMsg.setReplySubject()
Method
Remarks A receiver can reply to an inbound message using its reply subject.
Rendezvous routing daemons modify subjects and reply subjects to enable
transparent point-to-point communication across network boundaries. This
modification does not apply to subject names stored in message data fields; we
discourage storing point-to-point subject names in data fields.
Parameter Description
replySubject Use this string as the new reply subject, replacing any
existing reply subject.
The reply subject null removes the previous reply subject.
TibrvMsg.setSendSubject()
Method
Remarks The subject of a message can describe its content, as well as its destination set.
Rendezvous routing daemons modify subjects and reply subjects to enable
transparent point-to-point communication across network boundaries. This
modification does not apply to subject names stored in message data fields; we
discourage storing point-to-point subject names in data fields.
Parameter Description
subject Use this string as the new subject, replacing any existing
subject.
The subject null removes the previous subject, leaving the
message unsendable.
TibrvMsg.setStringEncoding()
Method
Purpose Set the character encoding for converting between Java Unicode strings and wire
format strings.
Remarks This method overrides the default string encoding for all strings in all messages.
Do not call this method while any listener events are valid. We recommend setting
it at program start, before creating any listeners.
Encoding changes are not retroactive; that is, changing the encoding affects only
future string translations. For further details, see Strings and Character Encodings
on page 3.
Parameter Description
encoding Use this encoding.
TibrvMsg.toString()
Method
Remarks Programs can use this method to obtain a string representation of the message for
printing.
For most datatypes, this method formats the full value of the field to the output
string; these types are exceptions:
TibrvMsg.OPAQUE This method abbreviates the value of an opaque field; for
example, [472 opaque bytes].
TibrvMsg.XML This method abbreviates the value of an XML field; for
example, [XML document: 472 bytes].
The size measures uncompressed data.
TibrvMsg.update()
Method
void update(
java.lang.String fieldName,
java.lang.Object data,
short type)
throws TibrvException
void update(
java.lang.String fieldName,
java.lang.Object data,
short type,
int fieldId)
throws TibrvException
Remarks This method copies the new data into the message field. All related convenience
methods behave similarly.
This method locates a field within the message by matching the fieldName and
fieldId arguments. Then it updates the message field using the data argument.
(Notice that only the value and count of the message field can change.)
If no existing field matches the specifications in the fieldName and fieldId
arguments, then this method adds a new field to the message. Update
convenience methods also add a field if it is not present.
The type of the existing message field and the type of the updating field
argument must be identical; otherwise, the method throws an exception with the
error status code TibrvStatus.INVALID_TYPE. However, when updating array
or vector fields, the count (number of elements) can change.
(Sheet 1 of 2)
Parameter Description
fieldName Update a field with this name.
When absent, locate the field by identifier only.
(Sheet 2 of 2)
Parameter Description
data Update a field using this data value.
It is illegal to add or update a field with null data. To remove
a field, use TibrvMsg.removeField() on page 73.
fieldId Update a field with this identifier. All field identifiers must be
unique within each message.
Zero is a special value, indicating no identifier. It is illegal to
add a field that has both a null field name, and a non-zero
field identifier.
However, if the program supplied null as the field name, then do not search
for the field name; instead, throw an exception with the status code
TibrvStatus.NOT_FOUND.
3. When the program supplied zero as the identifier, or omitted any identifier,
then begin here.
Search for a field with the specified name—even if that name is null.
If the search fails, add the field as specified (with name and identifier).
If a message contains several fields with the same name, searching by name finds
the first instance of the field with that name.
Nested Message When the new value is a message object, this method uses only the data portion of
the nested message (data); it does not include any address information or
certified delivery information.
Update Scalar
Convenience Methods
void update(
java.lang.String fieldName,
scalar_type data,
int fieldId)
throws TibrvException
void updateUbits(
java.lang.String fieldName,
scalar_type data)
throws TibrvException
void updateUbits(
java.lang.String fieldName,
scalar_type data,
int fieldId)
throws TibrvException
Method Forms The convenience methods named update() determine the field type from the
numeric type of the data.
The convenience methods named updateUnn() update unsigned integer fields,
discarding the sign bit of a Java integer data value.
Parameter Description
data Update a field with this data value.
It is illegal to add or update a field with null data.
fieldId Update a field with this identifier. All field identifiers must be
unique within each message.
Zero is a special value, indicating no identifier. It is illegal to
add a field that has both a null field name, and a non-zero
field identifier.
TibrvMsg.updateField()
Method
Remarks This method copies the new data into the existing message field. All related
convenience methods behave similarly.
This method locates a field within the message by matching the name and
identifier of field. Then it updates the message field using the field argument.
(Notice that the program may not supply a field object with a different field name,
field identifier, or datatype.)
If no existing field matches the specifications in the field argument, then this
method adds the field to the message. Update convenience methods also add the
field if it is not present. It is illegal to add a field that has both a null field name,
and a non-zero field identifier.
The type of the existing message field and the type of the updating field
argument must be identical; otherwise, the method returns the error status code
TibrvStatus.INVALID_TYPE. However, when updating array or vector fields, the
count (number of elements) can change.
Parameter Description
field Update the existing message field using this field.
It is illegal to add or update a field with null data.
TibrvMsgField
Class
Remarks This class has no destroy() method. Instead, the Java garbage collector reclaims
storage automatically.
Field Description
name Field name, of type java.lang.String.
Names must be strings; null is a special value that indicates no name.
Field names use the character encoding appropriate to the ISO locale; see Strings and
Character Encodings on page 3.
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
TibrvMsgField()
Constructor
Declaration TibrvMsgField()
TibrvMsgField(TibrvMsgField field)
TibrvMsgField(
java.lang.String name,
java.lang.Object data,
short type,
int id)
TibrvMsgField(
java.lang.String name,
java.lang.Object data,
short type)
TibrvMsgField(
java.lang.String name,
java.lang.Object data)
Method Forms With no arguments, create an empty field (no name, no identifier, no data, no
type).
With a field argument, create an independent copy of the field.
Name, identifier, data and type arguments contribute to the contents of the field
object.
Remarks This constructor does not verify that the data and type of the field are consistent.
Methods that add the field object into a message verify consistency (for example
TibrvMsg.addField() and TibrvMsg.updateField()).
(Sheet 1 of 2)
Parameter Description
field Create an independent copy of this field.
(Sheet 2 of 2)
Parameter Description
data Create a field with this data value.
The data value must be non-null.
TibrvMsgField.toString()
Method
Remarks Programs can use this method to obtain a string representation of the field for
printing.
TibrvDate
Class
Remarks This class has no destroy() method. Instead, the Java garbage collector reclaims
storage automatically.
Constant Description
TibrvDate.MAX_SECONDS Maximum date (in seconds) that this class can represent.
The value is 549,755,813,887 (the maximum value of a 40-bit signed
integer), which is approximately 17,432 years after the year 1970.
TibrvDate.MIN_SECONDS Minimum date (in seconds) that this class can represent.
The value is -549,755,813,888 (the minimum value of a 40-bit signed
integer), which is approximately 17,432 years before the year 1970.
Inherited Methods
java.util.Date.after
java.util.Date.before
java.util.Date.clone
java.util.Date.compareTo
java.util.Date.getDate
java.util.Date.getDay
java.util.Date.getHours
java.util.Date.getMinutes
java.util.Date.getMonth
java.util.Date.getSeconds
java.util.Date.getTime
java.util.Date.getTimezoneOffset
java.util.Date.getYear
java.util.Date.hashCode
java.util.Date.parse
java.util.Date.setDate
java.util.Date.setHours
java.util.Date.setMinutes
java.util.Date.setMonth
java.util.Date.setSeconds
java.util.Date.setYear
java.util.Date.toGMTString
java.util.Date.toLocaleString
java.util.Date.toString
java.util.Date.UTC
java.lang.Object.equals
java.lang.Object.getClass
java.lang.Object.hashCode
java.lang.Object.notify
java.lang.Object.notifyAll
java.lang.Object.wait
Representations In all three representations, zero denotes the epoch, 12:00 midnight, January 1st,
1970. Range limits in this table denote the extreme value on either side of that
center. Bold type indicates the primary unit of measurement for each
representation.
Representation Details
java.util.Date Milliseconds as a 64-bit signed integer.
Representation Details
TibrvDate Seconds as a 64-bit signed integer, plus nanoseconds as a 32-bit unsigned
integer.
However, values are restricted to the range and granularity supported by
Rendezvous wire format. Forcing larger or finer values into this representation
causes an exception.
Rendezvous wire Seconds as a 40-bit signed integer, plus microseconds as a 24-bit unsigned
format integer.
TibrvDate()
Constructor
Declaration TibrvDate()
TibrvDate(java.util.Date date)
TibrvDate(long milliseconds)
TibrvDate(
long seconds,
int nanoseconds)
Remarks If the time value specified is out of range, this constructor throws an
IllegalArgumentException.
Parameter Description
date Copy the value of this Java date or Rendezvous date object
into an independent copy object.
Method Forms With no arguments, create a date object representing the current time.
With an argument of class java.util.Date (or a subclass), create a TibrvDate
object representing the same date value.
With one argument, interpret that long as the date in milliseconds. For example,
specify the time 1/2 second before midnight of December 31, 1969 as -500
milliseconds.
With two arguments, interpret them as seconds and (non-negative) nanoseconds.
For example, specify the time 1/2 second before midnight of December 31, 1969
as -1 seconds plus 500,000,000 nanoseconds.
TibrvDate.getTimeNanoseconds()
Method
TibrvDate.getTimeSeconds()
Method
Purpose Extract the partial value (in whole seconds) of a date object.
Remarks The value is the date in seconds, centered on 12:00am, January 1, 1970.
To get the modifying nanosecond value, use TibrvDate.getTimeNanoseconds()
on page 96.
TibrvDate.setTime()
Method
void setTime(
long seconds,
int nanoseconds)
Remarks If the time value specified is out of range, this constructor throws an
IllegalArgumentException.
Parameter Description
milliseconds Set the date from this value (in milliseconds, centered on
12:00am, January 1, 1970).
seconds Set the a date from this value (in seconds, centered on
12:00am, January 1, 1970). This argument must be in the
range
[TibrvDate.MIN_SECONDS;TibrvDate.MAX_SECONDS].
Method Forms With one argument, interpret it as the date in milliseconds. For example, specify
the time 1/2 second before midnight of December 31, 1969 as -500 milliseconds.
With two arguments, interpret them as seconds and (non-negative) nanoseconds.
For example, specify the time 1/2 second before midnight of December 31, 1969
as -1 seconds plus 500,000,000 nanoseconds.
TibrvIPAddr
Class
Remarks In general, an IP address consists of four 8-bit unsigned integers, in network byte
order.
This class has no destroy() method. Instead, the Java garbage collector reclaims
storage automatically.
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.toString (override)
java.lang.Object.wait
TibrvIPAddr()
Constructor
TibrvIPAddr(
java.net.InetAddress inetAddr)
TibrvIPAddr(
byte b1,
byte b2,
byte b3,
byte b4)
TibrvIPAddr(
java.lang.String ipString)
throws java.lang.NumberFormatException
TibrvIPAddr(int address)
TibrvIPAddr(TibrvIPAddr ipAddr)
Parameter Description
bytes Create an IP address from an array of 4 bytes. For
aaa.bbb.ccc.ddd, let bytes[0] be the high byte aaa, and
bytes[3] be the low byte ddd.
Remarks If the ipString argument does not represent a valid IP address, this constructor
throws a java.lang.NumberFormatException.
TibrvIPAddr.getAddr()
Method
TibrvIPAddr.getAsBytes()
Method
TibrvIPAddr.getAsString()
Method
Remarks This method returns a string composed of four decimal integers (in the form
"aaa.bbb.ccc.ddd").
TibrvIPPort
Class
Constant Description
TibrvIPPort.MAX_PORT Maximum port number that this class can
represent (65535).
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.toString (override)
java.lang.Object.wait
TibrvIPPort()
Constructor
Declaration TibrvIPPort(
byte highByte,
byte lowByte)
TibrvIPPort(int port)
TibrvIPPort(TibrvIPPort ipPort)
Parameter Description
highByte, lowByte Create an IP port from these 2 bytes.
TibrvIPPort.getPort()
Method
TibrvIPPort.getAsBytes()
Method
TibrvXml
Class
Remarks Within programs, XML data is represented as a byte array. Within message fields,
Rendezvous software compresses the bytes for efficient network transmission.
This class has no destroy() method. Instead, the Java garbage collector reclaims
storage automatically.
TibrvXml.getBytes() Get the data bytes from an XML data object. 110
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.toString (override)
java.lang.Object.wait
TibrvXml()
Constructor
Parameter Description
xmlBytes Create an XML data object from this byte array.
TibrvXml.getBytes()
Method
Topics
TibrvEvent
Class
Purpose Event objects represent program interest in events, and event occurrences.
Remarks Programs create instances of event subclasses of TibrvEvent, but not of this
superclass.
Each call to a Rendezvous event constructor results in a new event object, which
represents your program’s interest in a set of events. Rendezvous software uses
the same event object to signal each occurrence of such an event.
Destroying an event object cancels the program’s interest in that event.
Destroying the queue or transport of an event automatically destroys the event as
well.
Although the fault tolerance classes are technically events, they are sufficiently
different from listeners and timers that they require separate description. See
Chapter 8, Fault Tolerance, on page 217.
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.toString (override)
java.lang.Object.wait
TibrvEvent.destroy()
Method
Remarks Destroying an event object cancels interest in it. Upon return from
TibrvEvent.destroy(), the destroyed event is no longer dispatched. However,
all active callback methods of this event continue to run and return normally, even
though the event is invalid.
It is legal for an event callback method to destroy its own event argument.
Destroying event interest invalidates the event object; subsequent API calls
involving the invalid event throw exceptions, unless explicitly documented to the
contrary.
TibrvEvent.getClosure()
Method
Remarks This method can extract the closure data even from invalid events.
TibrvEvent.getQueue()
Method
TibrvEvent.isValid()
Method
Remarks This method returns true if the event is valid, and false if it has been destroyed.
Notice that TibrvEvent.destroy() invalidates the event immediately, even
though active callback methods may continue to run.
TibrvListener
Class
Remarks A listener object continues listening for messages until the program destroys it.
Programs must destroy instances of this class. Rendezvous software keeps
internal references to these objects, so the Java garbage collector does not delete
them automatically.
Destroying the queue or transport of an event automatically destroys the listener
as well.
Inherited Methods
TibrvEvent.destroy()
TibrvEvent.getClosure()
TibrvEvent.getQueue()
TibrvEvent.isValid()
java.lang.Object.equals
java.lang.Object.getClass
java.lang.Object.hashCode
java.lang.Object.notify
java.lang.Object.notifyAll
java.lang.Object.toString (override)
java.lang.Object.wait
This constructor creates a listener event object, and activates the event—that is, it
begins listening for all inbound messages with matching subjects. When a
message arrives, Rendezvous software places the event object and message on its
event queue. Dispatch removes the event object from the queue, and runs the
callback method to process the message. (To stop receiving inbound messages on
the subject, destroy the event object; this action cancels all messages already
queued for the listener event; see also TibrvEvent.destroy() on page 114.)
Figure 7 illustrates that messages can continue to accumulate in the queue, even
while the callback method is processing.
3. Dispatch event.
Callback
Event Waiting in
Function
Queue
Running
Callback
Event Waiting in Queue Function
Running
Callback
Event Waiting in Queue Function
Running
6. Destroying listener
Event Waiting in
More messages arrive. cancels messages in
Queue
the queue.
When the callback method is I/O-bound, messages can arrive faster than the
callback method can process them, and the queue can grow unacceptably long. In
programs where a delay in processing messages is unacceptable, consider
dispatching from several threads to process messages concurrently.
TibrvListener()
Constructor
Declaration TibrvListener(
TibrvQueue queue,
TibrvMsgCallback callback,
TibrvTransport transport,
java.lang.String subject,
java.lang.Object closure)
throws TibrvException
Remarks For each inbound message, place this event on the event queue.
Parameter Description
queue For each inbound message, place the event on this event
queue.
subject Listen for inbound messages with subjects that match this
specification. Wildcard subjects are permitted. The empty
string is not a legal subject name.
Inbox Listener To receive unicast (point-to-point) messages, listen to a unique inbox subject
name. First call TibrvTransport.createInbox() to create the unique inbox
name; then call TibrvListener() to begin listening. Remember that other
programs have no information about an inbox until the listening program uses it
as a reply subject in an outbound message.
TibrvListener.getSubject()
Method
TibrvListener.getTransport()
Method
TibrvMsgCallback
Interface
TibrvMsgCallback.onMsg()
Method
Parameter Description
listener This parameter receives the listener event.
CM Label The callback method for certified delivery messages can use certified delivery
Information (CM) label information to discriminate these situations:
• If TibrvCmMsg.getSender() returns null, then the message uses the reliable
protocol (that is, it was sent from an ordinary transport).
• If TibrvCmMsg.getSender() returns a valid sender name, then the message
uses the certified delivery protocol (that is, it is a labeled message, sent from a
CM transport).
TibrvTimer
Class
Remarks All timers are repeating timers. To simulate a once-only timer, code the callback
method to destroy the timer.
Programs must destroy instances of this class. Rendezvous software keeps
internal references to these objects, so the Java garbage collector does not delete
them automatically.
Destroying the queue of a timer automatically destroys the timer as well.
Activation and The constructor creates a timer event object, and activates the timer event—that is,
Dispatch it requests notification from the operating system when the timer’s interval
elapses. When the interval elapses, Rendezvous software places the event object
on its event queue. Dispatch removes the event object from the queue, and runs
the callback method to process the timer event. When the callback method begins,
Rendezvous software automatically reactivates the event, using the same interval.
On dispatch Rendezvous software also determines whether the next interval has
already elapsed, and requeues the timer event if appropriate. (To stop the cycle,
destroy the event object; see TibrvEvent.destroy() on page 114.)
Notice that time waiting in the event queue until dispatch can increase the
effective interval of the timer. It is the programmer’s responsibility to ensure
timely dispatch of events.
Figure 8 illustrates a sequence of timer intervals. The number of elapsed timer
intervals directly determines the number of event callbacks.
At any moment the timer object appears on the event queue at most once—not
several times as multiple copies. Nonetheless, Rendezvous software arranges for
the appropriate number of timer event callbacks based the number of intervals
that have elapsed since the timer became active or reset its interval.
Destroying or invalidating the timer object immediately halts the sequence of timer
events. The timer object ceases to queue new events, and an event already in the
queue does not result in a callback. (However, callback methods that are already
running in other threads continue to completion.)
Resetting the timer interval immediately interrupts the sequence of timer events
and begins a new sequence, counting the new interval from that moment. The
reset operation is equivalent to destroying the timer and creating a new object in
its place.
1. Activate timer.
Timer Express the timer interval (in seconds) as a 64-bit floating point number. This
Granularity representation allows microsecond granularity for intervals for over 100 years.
The actual granularity of intervals depends on hardware, Java and operating
system constraints. Most releases of the JVM limit timer granularity to 10
milliseconds.
Zero as Interval Many programmers traditionally implement user events as timers with interval
zero. Instead, we recommend implementing user events as messages on the
intra-process transport. For more information, see Intra-Process Transport and
User Events on page 114 in TIBCO Rendezvous Concepts.
Inherited Methods
TibrvEvent.destroy()
TibrvEvent.getClosure()
TibrvEvent.getQueue()
TibrvEvent.isValid()
java.lang.Object.equals
java.lang.Object.getClass
java.lang.Object.hashCode
java.lang.Object.notify
java.lang.Object.notifyAll
java.lang.Object.toString (override)
java.lang.Object.wait
TibrvTimer()
Constructor
Declaration TibrvTimer(
TibrvQueue queue,
TibrvTimerCallback callback,
double interval,
java.lang.Object closure)
throws TibrvException
Remarks All timers are repeating timers. To simulate a once-only timer, code the callback
method to destroy the timer.
Parameter Description
queue At each time interval, place the event on this event queue.
interval The timer triggers its callback method at this repeating interval
(in seconds).
Timer Express the timer interval (in seconds) as a double (64-bit floating point number).
Granularity This representation allows microsecond granularity for intervals for over 100
years. The actual granularity of intervals depends on Java implementation
constraints, as well as hardware and operating system constraints.
The JNI implementation supports fine-resolution timers through the underlying
C layer. Most releases of the JVM limit the Java implementation to 10 millisecond
resolution.
TibrvTimer.getInterval()
Method
TibrvTimer.resetInterval()
Method
Parameter Description
newInterval The timer triggers its callback method at this new repeating
interval (in seconds).
Timer Express the timer interval (in seconds) as a 64-bit floating point number. This
Granularity representation allows microsecond granularity for intervals up to approximately
146 years. The actual granularity of intervals depends on hardware and operating
system constraints.
Limit of This method can affect a timer only before or during its interval—but not after its
Effectiveness interval has elapsed.
This method neither examines, changes nor removes an event that is already
waiting in a queue for dispatch. If the next event for the timer object is already in
the queue, then that event remains in the queue, representing the old interval. The
change takes effect with the subsequent interval. (To circumvent this limitation, a
program can destroy the old timer object and replace it with a new one.)
TibrvTimerCallback
Interface
TibrvTimerCallback.onTimer()
Method
Parameter Description
timer This parameter receives the timer event.
TibrvDispatchable
Interface
TibrvDispatchable.dispatch()
Method
Remarks If an event is ready to dispatch, then this call dispatches it, and then returns. If no
events are waiting, then this call blocks indefinitely while waiting for the object to
receive an event.
Both TibrvQueue and TibrvQueueGroup implement this method.
TibrvDispatchable.poll()
Method
Remarks If an event is ready to dispatch, then this call dispatches it, and then returns. If no
events are waiting, then this call returns immediately.
When the call dispatches an event, it returns true. When the call does not
dispatch an event, it returns false.
This call is equivalent to timedDispatch(0).
Both TibrvQueue and TibrvQueueGroup implement this method.
TibrvDispatchable.timedDispatch()
Method
Purpose Dispatch an event, but if no event is ready to dispatch, limit the time that this call
blocks while waiting for an event.
Remarks If an event is ready to dispatch, then this call dispatches it, and then returns. If no
events are waiting, this call waits for an event to arrive. If an event arrives before
the waiting time elapses, then it dispatches the event and returns. If the waiting
time elapses first, then the call returns without dispatching an event.
When the call dispatches an event, it returns true. When the call does not
dispatch an event, it returns false.
Both TibrvQueue and TibrvQueueGroup implement this method.
Parameter Description
timeout Maximum time (in seconds) that this call can block while
waiting for an event to arrive.
Zero indicates no blocking (immediate timeout).
-1 indicates no timeout.
TibrvQueue
Class
Remarks Each event is associated with a TibrvQueue object; when the event occurs,
Rendezvous software places the event object in its queue. Programs dispatch
queues to process events.
Programs must explicitly destroy instances of this class. Rendezvous software
keeps internal references to these objects, so the Java garbage collector does not
delete them automatically.
Default Queue The method Tibrv.defaultQueue() returns a pre-defined queue. Programs that
need only one event queue can use this default queue (instead of using
TibrvQueue() to create one). The default queue has priority 1, can hold an
unlimited number of events, and never discards an event (since it never exceeds
an event limit).
Rendezvous software places all advisories pertaining to queue overflow on the
default queue.
Programs cannot destroy the default queue, except as a side effect of
Tibrv.close(). Programs cannot change the parameters of the default queue.
Limit Policy These constants specify the possible strategies for resolving overflow of queue
limit.
Constant Description
TibrvQueue.DISCARD_NONE Never discard events; use this policy when a queue has no limit on
then number of events it can contain.
TibrvQueue.DISCARD_FIRST Discard the first event in the queue (that is, the oldest event in the
queue, which would otherwise be the next event to dispatch).
TibrvQueue.DISCARD_LAST Discard the last event in the queue (that is, the youngest event in
the queue).
TibrvQueue.DISCARD_NEW Discard the new event (which would otherwise cause the queue to
overflow its maximum events limit).
Dispatch
Properties
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.toString (override)
java.lang.Object.wait
TibrvQueue()
Constructor
Declaration TibrvQueue()
discardAmount zero
TibrvQueue.destroy()
Method
Remarks When a queue is destroyed, events that remain in the queue are discarded.
Destroying a queue explicitly destroys all events associated with the queue; that
is, this method calls TibrvEvent.destroy() for each associated event.
A program must not call TibrvQueue.destroy() on the default queue. Closing
Tibrv destroys the default queue; see Tibrv.close() on page 26.
TibrvQueue.dispatch()
Method
Remarks If the queue is not empty, then this call dispatches the event at the head of the
queue, and then returns. If the queue is empty, then this call blocks indefinitely
while waiting for the queue to receive an event.
The more reliable way to interrupt a JNI event dispatch thread is to destroy the
TibrvDispatchable object that the thread dispatches. When the dispatch call
encounters the invalid queue or queue group, it throws a TibrvException in the
event dispatch thread.
TibrvQueue.getCount()
Method
TibrvQueue.getDiscardAmount()
Method
Remarks When the queue exceeds its maximum event limit, discard a block of events. This
property specifies the number of events to discard.
TibrvQueue.getLimitPolicy()
Method
Remarks Each queue has a policy for discarding events when a new event would cause the
queue to exceed its maxEvents limit. For an explanation of the policy values, see
Limit Policy on page 138.
TibrvQueue.getMaxEvents()
Method
Remarks Programs can limit the number of events that a queue can hold—either to curb
queue growth, or implement a specialized dispatch semantics.
Zero specifies an unlimited number of events.
TibrvQueue.getName()
Method
TibrvQueue.getPriority()
Method
Remarks Each queue has a single priority value, which controls its dispatch precedence
within queue groups. Higher values dispatch before lower values; queues with
equal priority values dispatch in round-robin fashion.
When the queue is invalid, this method throws an exception.
TibrvQueue.isDefault()
Method
Remarks Returns true if the queue is the default queue; false otherwise.
TibrvQueue.isValid()
Method
Remarks Returns true if the queue is valid; false if the queue has been destroyed.
TibrvQueue.poll()
Method
Remarks If the queue is not empty, then this call dispatches the event at the head of the
queue, and then returns. If the queue is empty, then this call returns immediately.
When the call dispatches an event, it returns true. When the call does not
dispatch an event, it returns false.
This call is equivalent to timedDispatch(0).
TibrvQueue.setName()
Method
Parameter Description
queueName Replace the name of the queue with this new name.
It is illegal to supply null as the new queue name.
TibrvQueue.setLimitPolicy()
Method
Remarks This method simultaneously sets three related properties, which together describe
the behavior of a queue in overflow situations. Each call must explicitly specify all
three properties.
Parameter Description
limitPolicy Each queue has a policy for discarding events when a new
event would cause the queue to exceed its maxEvents
limit. Choose from the values of Limit Policy on page 138.
When maxEvents is zero (unlimited), the policy must be
TibrvQueue.DISCARD_NONE.
maxEvents Programs can limit the number of events that a queue can
hold—either to curb queue growth, or implement a
specialized dispatch semantics.
Zero specifies an unlimited number of events; in this case,
the policy must be TibrvQueue.DISCARD_NONE.
discardAmount When the queue exceeds its maximum event limit, discard
a block of events. This property specifies the number of
events to discard.
When discardAmount is zero, the policy must be
TibrvQueue.DISCARD_NONE.
TibrvQueue.setPriority()
Method
Remarks Each queue has a single priority value, which controls its dispatch precedence
within queue groups. Higher values dispatch before lower values; queues with
equal priority values dispatch in round-robin fashion.
Changing the priority of a queue affects its position in all the queue groups that
contain it.
Parameter Description
priority Replace the priority of the queue with this new value.
The priority must be a non-negative integer. Priority zero
signifies the last queue to dispatch.
TibrvQueue.timedDispatch()
Method
Purpose Dispatch an event, but if no event is ready to dispatch, limit the time that this call
blocks while waiting for an event.
Remarks If an event is already in the queue, this call dispatches it, and returns immediately.
If the queue is empty, this call waits for an event to arrive. If an event arrives
before the waiting time elapses, then it dispatches the event and returns. If the
waiting time elapses first, then the call returns without dispatching an event.
When the call dispatches an event, it returns true. When the call does not
dispatch an event, it returns false.
Parameter Description
timeout Maximum time (in seconds) that this call can block while
waiting for an event to arrive in the queue.
Zero indicates no blocking (immediate timeout).
-1 indicates no timeout.
TibrvQueueGroup
Class
Remarks Queue groups add flexibility and fine-grained control to the event queue dispatch
mechanism. Programs can create groups of queues and dispatch them according
to their queue priorities.
Programs must explicitly destroy instances of this class. Rendezvous software
keeps internal references to these objects, so the Java garbage collector does not
delete them automatically.
(Sheet 1 of 2)
Dispatch
Queues
(Sheet 2 of 2)
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.toString (override)
java.lang.Object.wait
TibrvQueueGroup()
Constructor
Declaration TibrvQueueGroup()
throws TibrvException
TibrvQueueGroup.add()
Method
Remarks If the queue is already in the group, adding it again has no effect.
If either the queue or the group is invalid, this method throws a TibrvException.
Parameter Description
eventQueue Add this event queue to a queue group.
TibrvQueueGroup.contains()
Method
Parameter Description
eventQueue Test the membership of this event queue in the queue group.
TibrvQueueGroup.destroy()
Method
Remarks The individual queues in the group continue to exist, even though the group has
been destroyed.
TibrvQueueGroup.dispatch()
Method
Remarks If any queue in the group contains an event, then this call searches the queues in
priority order, dispatches an event from the first non-empty queue that it finds,
and then returns. If all the queues are empty, then this call blocks indefinitely
while waiting for any queue in the group to receive an event.
When searching the group for a non-empty queue, this call searches according to
the priority values of the queues. If two or more queues have identical priorities,
subsequent dispatch and poll calls rotate through them in round-robin fashion.
TibrvQueueGroup.elements()
Method
TibrvQueueGroup.getCount()
Method
TibrvQueueGroup.isValid()
Method
Remarks Returns true if the queue group is valid; false if the queue group has been
destroyed.
TibrvQueueGroup.poll()
Method
Remarks If any queue in the group contains an event, then this call searches the queues in
priority order, dispatches an event from the first non-empty queue that it finds,
and then returns. If all the queues are empty, then this call returns immediately.
When searching the group for a non-empty queue, this call searches according to
the priority values of the queues. If two or more queues have identical priorities,
subsequent dispatch and poll calls rotate through them in round-robin fashion.
When the call dispatches an event, it returns true. When the call does not
dispatch an event, it returns false.
This call is equivalent to timedDispatch(0).
TibrvQueueGroup.remove()
Method
Remarks If the queue is not in the group, or if the group is invalid, this call throws an
exception with the status code TibrvStatus.INVALID_QUEUE.
Parameter Description
eventQueue Remove this event queue from a queue group.
TibrvQueueGroup.timedDispatch()
Method
Purpose Dispatch an event, but if no event is ready to dispatch, limit the time that this call
blocks while waiting for an event.
Remarks If any queue in the group contains an event, then this call searches the queues in
priority order, dispatches an event from the first non-empty queue that it finds,
and then returns. If the queue is empty, this call waits for an event to arrive in any
queue. If an event arrives before the waiting time elapses, then the call searches
the queues, dispatches the event, and returns. If the waiting time elapses first,
then the call returns without dispatching an event.
When searching the group for a non-empty queue, this call searches according to
the priority values of the queues. If two or more queues have identical priorities,
subsequent dispatch calls rotate through them in round-robin fashion.
When the call dispatches an event, it returns true. When the call does not
dispatch an event, it returns false.
Parameter Description
timeout Maximum time (in seconds) that this call can block while
waiting for an event to arrive in the queue group.
Zero indicates no blocking (immediate timeout).
-1 indicates no timeout.
TibrvDispatcher
Class
Remarks Upon creation, this thread class loops indefinitely, repeatedly dispatching a queue
or queue group.
This class is a programming convenience. Programs can implement specialized
dispatcher threads, and use them instead of this class.
In either the JNI (native) implementation or the Java implementation, you can
interrupt a dispatcher thread by calling its TibrvDispatcher.destroy()
method. Destroying the thread insures prompt thread exit—at the latest, after the
return of a program callback method (if one is in progress).
Constant Description
TibrvDispatcher.DEFAULT_NAME When the constructor does not receive a thread name, it
gives the new dispatcher thread this default name.
Inherited Methods
java.lang.Thread.activeCount
java.lang.Thread.checkAccess
java.lang.Thread.countStackFrames
java.lang.Thread.currentThread
java.lang.Thread.destroy (override)
java.lang.Thread.dumpStack
java.lang.Thread.enumerate
java.lang.Thread.getContextClassLoader
java.lang.Thread.getName
java.lang.Thread.getPriority
java.lang.Thread.getThreadGroup
java.lang.Thread.interrupt
java.lang.Thread.interrupted
java.lang.Thread.isAlive
java.lang.Thread.isDaemon
java.lang.Thread.isInterrupted
java.lang.Thread.join
java.lang.Thread.resume
java.lang.Thread.run (override)
java.lang.Thread.setContextClassLoader
java.lang.Thread.setDaemon
java.lang.Thread.setName
java.lang.Thread.setPriority
java.lang.Thread.sleep
java.lang.Thread.start
java.lang.Thread.stop
java.lang.Thread.suspend
java.lang.Thread.toString
java.lang.Thread.yield
java.lang.Object.equals
java.lang.Object.getClass
java.lang.Object.hashCode
java.lang.Object.notify
java.lang.Object.notifyAll
java.lang.Object.wait
TibrvDispatcher()
Constructor
Declaration TibrvDispatcher(
java.lang.ThreadGroup group,
java.lang.String name,
TibrvDispatchable dispatchable)
TibrvDispatcher(
java.lang.String name,
TibrvDispatchable dispatchable)
TibrvDispatcher(
TibrvDispatchable dispatchable)
TibrvDispatcher(
java.lang.ThreadGroup group,
java.lang.String name,
TibrvDispatchable dispatchable,
double timeout)
TibrvDispatcher(
java.lang.String name,
TibrvDispatchable dispatchable,
double timeout)
TibrvDispatcher(
TibrvDispatchable dispatchable,
double timeout)
(Sheet 1 of 2)
Parameter Description
group Create a dispatcher thread in this Java thread group.
When absent, use the main thread group.
(Sheet 2 of 2)
Parameter Description
timeout When this time period (in seconds) elapses without
dispatching an event, the thread exits.
When absent, the default is to run indefinitely (with no
timeout).
Chapter 6 Transports
Topics
See Also
TibrvCmTransport on page 257
TibrvCmQueueTransport on page 302
TibrvTransport
Class
Intra-Process Each process has exactly one intra-process transport; the call Tibrv.open()
Transport automatically creates it, and the call Tibrv.processTransport() extracts it.
Programs must not destroy the intra-process transport.
(Sheet 1 of 2)
(Sheet 2 of 2)
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.toString
java.lang.Object.wait
TibrvTransport.createInbox()
Method
Remarks This method creates inbox names that are unique throughout the transport scope.
• For network transports, inbox subject names are unique across all processes
within the local router domain—that is, anywhere that direct multicast contact
is possible. The inbox name is not necessarily unique outside of the local
router domain.
• For the intra-process transport, inbox names are unique across all threads of
the process.
This method creates only the unique name for an inbox; it does not begin listening
for messages on that subject name. To begin listening, pass the inbox name as the
subject argument to TibrvListener(). The inbox name is only valid for use
with the same transport that created it. When calling TibrvListener(), you must
pass the same transport object that created the inbox subject name.
Remember that other programs have no information about an inbox subject name
until the listening program uses it as a reply subject in an outbound message.
Use inbox subject names for delivery to a specific destination. In the context of a
network transport, an inbox destination specifies unicast (point-to-point)
delivery.
Rendezvous routing daemons (rvrd) translate inbox subject names that appear as
the send subject or reply subject of a message. They do not translate inbox subject
names within the data fields of a message.
This inherited method is disabled for TibrvCmQueueTransport objects.
This method is the only legal way for programs to create inbox subject names.
TibrvTransport.destroy()
Method
• The transport explicitly destroys all events associated with the transport; that
is, this method calls TibrvEvent.destroy() for each associated event.
• Subsequent calls that use the destroyed transport return false (as an error
indicator).
TibrvTransport.isValid()
Method
Remarks Returns true if the transport is valid; false if the transport has been destroyed.
TibrvTransport.getDescription()
Method
TibrvTransport.send()
Method
Parameter Description
message Send this message.
TibrvTransport.sendReply()
Method
Remarks This convenience call extracts the reply subject of an inbound request message,
and sends an outbound reply message to that subject. In addition to the
convenience, this call is marginally faster than using separate calls to extract the
subject and send the reply.
This method overwrites any existing send subject of the reply message with the
reply subject of the request message.
Parameter Description
replyMessage Send this outbound reply message.
Give special attention to the order of the arguments to this method. Reversing the
inbound and outbound messages can cause an infinite loop, in which the program
repeatedly resends the inbound message to itself (and all other recipients).
TibrvTransport.sendRequest()
Method
This call blocks all other activity on its program thread. If appropriate,
programmers must ensure that other threads continue dispatching events on its
queues.
Parameter Description
message Send this message.
timeout Maximum time (in seconds) that this call can block while
waiting for a reply.
-1 indicates no timeout (wait without limit for a reply).
Remarks When the method receives a reply, it returns the reply. When the call does not
receive a reply, it returns null, indicating timeout.
Programs that receive and process the request message cannot determine that the
sender has blocked until a reply arrives.
The request message must have a valid destination subject; see
TibrvMsg.setSendSubject() on page 78.
TibrvTransport.setDescription()
Method
Parameter Description
description Use this string as the new program description.
TibrvProcessTransport
Class
Purpose The intra-process transport delivers messages among the threads of a program.
Inherited Methods
TibrvTransport.createInbox()
TibrvTransport.isValid()
TibrvTransport.send()
TibrvTransport.sendReply()
TibrvTransport.sendRequest()
java.lang.Object.equals
java.lang.Object.getClass
java.lang.Object.hashCode
java.lang.Object.notify
java.lang.Object.notifyAll
java.lang.Object.toString (override)
java.lang.Object.wait
TibrvNetTransport
Class
Remarks This abstract class is the superclass of all network transport classes.
Inherited Methods
TibrvTransport.createInbox()
TibrvTransport.destroy()
TibrvTransport.isValid()
TibrvTransport.send()
TibrvTransport.sendReply()
TibrvTransport.sendRequest()
java.lang.Object.equals
java.lang.Object.getClass
java.lang.Object.hashCode
java.lang.Object.notify
java.lang.Object.notifyAll
java.lang.Object.toString (override)
java.lang.Object.wait
TibrvRvaTransport
Class
(Sheet 1 of 2)
(Sheet 2 of 2)
Inherited Methods
TibrvTransport.createInbox()
TibrvTransport.destroy()
TibrvTransport.isValid()
TibrvTransport.send()
TibrvTransport.sendReply()
TibrvTransport.sendRequest()
java.lang.Object.equals
java.lang.Object.getClass
java.lang.Object.hashCode
java.lang.Object.notify
java.lang.Object.notifyAll
java.lang.Object.toString (override)
java.lang.Object.wait
See Also Rendezvous Agent (rva), page 253 in TIBCO Rendezvous Administration
TibrvRvaTransport()
Constructor
Declaration TibrvRvaTransport()
throws TibrvException
TibrvRvaTransport(
java.lang.String hostName)
throws TibrvException
TibrvRvaTransport()
java.lang.String hostName,
int port)
throws TibrvException
TibrvRvaTransport(
java.lang.String hostName,
int port,
int tunnelMode)
throws TibrvException
Parameter Description
hostName Connect to rva on this computer.
To connect to rva on the local computer, supply null.
tunnelMode The method interprets this parameter as a bit vector. For a list of
bit constants, see Constant on page 191.
Constant Description
TibrvRvaTransport.HTTP_TUNNEL_ENABLE When the flag HTTP_TUNNEL_ENABLE is set, first
try to connect directly to rva through the
specified port; if that attempt fails, then try
tunneling through the HTTP port.
Method Forms With no arguments, connect to rva on the local computer (where the program is
running).
All arguments specify options for connecting to rva.
Description As a debugging aid, we recommend setting a unique description string for each
String transport. Use a string that distinguishes both the application and the role of the
transport within it. See TibrvTransport.setDescription() on page 185.
TibrvRvaTransport.getHostName()
Method
Purpose Return the host name of the computer where this transport connects to the
Rendezvous agent.
TibrvRvaTransport.getHttpReconnectDelay()
Method
Purpose Return the delay time (in seconds) before the transport reopens a connection to
the Rendezvous agent.
TibrvRvaTransport.getPort()
Method
Purpose Return the port number through which this transport connects to the Rendezvous
agent.
Remarks This method returns the actual port (for example, if the program specified the
default by supplying zero, this method returns the default TCP port number,
which is 7600).
TibrvRvaTransport.isHttpTunneling()
Method
Purpose Determine whether this transport connects to the Rendezvous agent using HTTP
protocol.
Remarks This method indicates whether the transport actually connects using HTTP
protocol (for example, the program might specify HTTP, but reality might differ).
TibrvRvaTransport.setHttpReconnectDelay()
Method
Purpose Set the delay time (in seconds) before the transport reopens a connection to the
Rendezvous agent.
Parameter Description
seconds Set this delay time.
Remarks This value is relevant only when the transport uses HTTP tunneling.
Unless a program has changed the value using this method, the default value is
0.2 seconds.
TibrvRvdTransport
Class
Remarks TibrvRvdTransport is the most direct way to connect to a network. For most
independent applications and servers, use TibrvRvdTransport (rather than
TibrvRvaTransport).
Constant Description
TibrvRvdTransport.DEFAULT_RVD_PORT Unless you specify another port when creating the
transport, TibrvRvdTransport connects to the
Rendezvous daemon through this default TCP port
(7500).
Inherited Methods
TibrvTransport.createInbox()
TibrvTransport.destroy()
TibrvTransport.isValid()
TibrvTransport.send()
TibrvTransport.sendReply()
TibrvTransport.sendRequest()
java.lang.Object.equals
java.lang.Object.getClass
java.lang.Object.hashCode
java.lang.Object.notify
java.lang.Object.notifyAll
java.lang.Object.toString (override)
java.lang.Object.wait
TibrvRvdTransport()
Constructor
Declaration TibrvRvdTransport()
throws TibrvException
TibrvRvdTransport(
java.lang.String service,
java.lang.String network,
java.lang.String daemon)
throws TibrvException
TibrvRvdTransport(
java.lang.String service,
java.lang.String network,
java.lang.String daemon,
java.lang.String licenseTicket)
throws TibrvException
Method Forms With no arguments, connect to rvd on the local computer using default values the
service, network, and daemon parameters.
Description As a debugging aid, we recommend setting a unique description string for each
String transport. Use a string that distinguishes both the application and the role of the
transport within it. See TibrvTransport.setDescription() on page 185.
Parameter Description
service The Rendezvous daemon divides the network into logical partitions. Each
TibrvRvdTransport communicates on a single service; a transport can
communicate only with other transports on the same service.
To communicate on more than one service, a program must create more than
one transport—one transport for each service.
You can specify the service in several ways. For details, see Service Parameter
on page 103 in TIBCO Rendezvous Concepts.
null specifies the default rendezvous service.
network Every network transport communicates with other transports over a single
network interface. On computers with more than one network interface, the
network parameter instructs the Rendezvous daemon to use a particular
network for all outbound messages from this transport.
To communicate over more than one network, programs must create more than
one transport.
You can specify the network in several ways. For details, see Network
Parameter on page 107 in TIBCO Rendezvous Concepts.
null specifies the primary network interface for the host computer.
daemon The daemon parameter instructs the transport object about how and where to
find the Rendezvous daemon and establish communication.
For details, see Daemon Parameter on page 110 in TIBCO Rendezvous Concepts.
You can specify a daemon on a remote computer. For details, see Remote
Daemon on page 111 in TIBCO Rendezvous Concepts.
If you specify a secure daemon, this string must be identical to as the
daemonName argument of TibrvSdContext.setDaemonCert() on page 37. See
also, Secure Daemon on page 111 in TIBCO Rendezvous Concepts.
null specifies the default—find the local daemon on TCP socket 7500. (This
default is not valid when the local daemon is a secure daemon.)
licenseTicket Embed this special license ticket in the transport object. When a licensed
transport connects to rvd, it presents this special ticket to validate its
connection (rvd uses the longest-running ticket available, which can be either
this special ticket, or a ticket from the ticket file, tibrv.tkt).
Ordinary license tickets are not valid for this parameter; see also, Embedded
License on page 202.
Embedded Specially-licensed third-party developers can use the third form of this method.
License To use this alternate form, a developer must first purchase a special license ticket.
This call embeds the special ticket in the program, so that end-users do not need
to purchase Rendezvous to use the program.
To purchase an embedded license, contact TIBCO Software Inc.
TibrvRvdTransport.getDaemon()
Method
Purpose Return the socket where this transport connects to the Rendezvous daemon.
TibrvRvdTransport.getNetwork()
Method
Purpose Return the network interface that this transport uses for communication.
TibrvRvdTransport.getService()
Method
Purpose Return the effective service that this transport uses for communication.
TibrvRvdTransport.setBatchMode()
Method
Remarks The batch mode determines when the transport transmits outbound message data
to rvd:
• As soon as possible (the initial default for all transports)
• Either when its buffer is full, or when a timer interval expires—either event
triggers transmission to the daemon
Parameter Description
mode Use this value as the new batch mode.
Constant Description
DEFAULT_BATCH Default batch behavior. The transport transmits outbound
messages to rvd as soon as possible.
This value is the initial default for all transports.
See Also Batch Modes for Transports on page 118 in TIBCO Rendezvous Concepts
Topics
TibrvVcTransport
Class
Remarks A virtual circuit transport can fill the same roles as an ordinary transport.
Programs can use them to create inbox names, send messages, create listeners and
other events.
Instead of a constructor, this class has two create methods. These two methods
also determine the protocol role of the transport object—one method creates a
terminal that accepts connections, and another method creates a terminal that
attempts to connect.
The two terminals play complementary roles as they attempt to establish a
connection. However, this difference soon evaporates. After the connection is
complete, the two terminals behave identically.
Direct Because virtual circuits rely on point-to-point messages between the two
Communication terminals, they can use direct communication to good advantage. To do so, both
terminals must use network transports that enable direct communication.
For an overview, see Direct Communication on page 116 in TIBCO Rendezvous
Concepts.
For programming details, see Specifying Direct Communication on page 105 in
TIBCO Rendezvous Concepts.
Inherited Methods
TibrvTransport.createInbox()
TibrvTransport.destroy()
TibrvTransport.isValid()
TibrvTransport.send()
TibrvTransport.sendReply()
TibrvTransport.sendRequest()
java.lang.Object.equals
java.lang.Object.getClass
java.lang.Object.hashCode
java.lang.Object.notify
java.lang.Object.notifyAll
java.lang.Object.toString (override)
java.lang.Object.wait
TibrvVcTransport.createAcceptVc()
Method
Remarks After this call returns, the program must extract the object’s connect subject, and
send it in a message to another program, inviting it to establish a virtual circuit.
Furthermore, the reply subject of that invitation message must be this connect
subject. To complete the virtual circuit, the second program must extract this
subject from the invitation, and supply it to
TibrvVcTransport.createConnectVc().
Parameter Description
transport The virtual circuit terminal uses this ordinary transport for communications.
Programs may use this transport for other purposes.
It is illegal to supply a virtual circuit transport object for this parameter (that is,
you cannot nest a virtual circuit within another virtual circuit).
Test Before Either of two conditions indicate that the connection is ready to use:
Using
• The transport presents the VC.CONNECTED advisory.
• TibrvVcTransport.waitForVcConnection() returns without error.
Immediately after this call, test both conditions with these two steps (in this
order):
1. Listen on the virtual circuit transport object for the VC.CONNECTED advisory.
2. Call TibrvVcTransport.waitForVcConnection() with zero as the timeout
parameter.
For an explanation, see Testing the New Connection on page 123 in TIBCO
Rendezvous Concepts.
TibrvVcTransport.createConnectVc()
Method
Parameter Description
connectSubject The terminal uses this connect subject to establish a virtual circuit with an
accept transport in another program.
The program must receive this connect subject from the accepting program.
The call to TibrvVcTransport.createAcceptVc() creates and returns this
subject.
transport The virtual circuit terminal uses this ordinary transport for communications.
Programs may use this transport for other purposes.
It is illegal to supply a virtual circuit transport object for this parameter (that is,
you cannot nest a virtual circuit within another virtual circuit).
Test Before Either of two conditions indicate that the connection is ready to use:
Using
• The transport presents the VC.CONNECTED advisory.
• TibrvVcTransport.waitForVcConnection() returns without error.
Immediately after this call, test both conditions with these two steps (in this
order):
1. Listen on the virtual circuit transport object for the VC.CONNECTED advisory.
2. Call TibrvVcTransport.waitForVcConnection() with zero as the timeout
parameter.
For an explanation, see Testing the New Connection on page 123 in TIBCO
Rendezvous Concepts.
TibrvVcTransport.getConnectSubject()
Method
Remarks After creating an accept terminal, the program must use this method to extract its
connect subject, and send it in a message to another program, inviting it to
establish a virtual circuit. Furthermore, the reply subject of that invitation message
must be this connect subject. To complete the virtual circuit, the second program
must extract this subject from the invitation, and supply it to
TibrvVcTransport.createConnectVc().
TibrvVcTransport.waitForVcConnection()
Method
Remarks This method tests (and can block) until this virtual circuit transport object has
established a connection with its opposite terminal. You may call this method for
either an accept terminal or a connect terminal.
This method produces the same information as the virtual circuit advisory
messages—but it produces it synchronously (while advisories are asynchronous).
Programs can use this method not only to test the connection, but also to block
until the connection is ready to use.
For example, a program can create a terminal object, then call this method to wait
until the connection completes.
Parameter Description
timeout This parameter determines the behavior of the call:
• For a quick test of current connection status, supply zero. The call returns
immediately, without blocking.
• To wait for a new terminal to establish a connection, supply a reasonable
positive value. The call returns either when the connection is complete, or
when this time limit elapses.
• To wait indefinitely for a usable connection, supply -1. The call returns
when the connection is complete. If the connection was already complete
and is now broken, the call returns immediately.
Results When the connection is complete (ready to use), this method returns normally.
Otherwise it throws an exception; the status value in the exception yields
additional information about the unusable connection.
(Sheet 1 of 2)
Status Description
TibrvStatus.TIMEOUT The connection is not yet complete, but the
non-negative time limit for waiting has expired.
(Sheet 2 of 2)
Status Description
TibrvStatus.TIBRV_VC_NOT_CONNECTED The connection was formerly complete, but is now
irreparably broken.
Topics
TibrvFtMember
Class
Remarks Upon creating this object, the program joins a fault tolerance group.
By destroying a member object, the program withdraws its membership in the
fault tolerance group.
Programs must destroy instances of this class. Rendezvous software keeps
internal references to these objects, so the Java garbage collector does not delete
them automatically.
Destroying the queue or transport of a member object automatically destroys the
member object as well.
Constants Each of these constant fields is a token designating a command to a fault tolerance
callback method. The program’s callback method receives one of these tokens in a
parameter, and interprets it as an instruction from the Rendezvous fault tolerance
software as described in this table (see also, Fault Tolerance Callback Actions on
page 214 in TIBCO Rendezvous Concepts).
(Sheet 1 of 2)
Constant Description
TibrvFtMember.PREPARE_TO_ACTIVATE Prepare to activate (hint).
Rendezvous fault tolerance software passes this token
to the callback method to instruct the program to
make itself ready to activate on short notice—so that if
the callback method subsequently receives the
instruction to activate, it can do so without delay.
This token is a hint, indicating that the program might
soon receive an instruction to activate. It does not
guarantee that an activate instruction will follow, nor
that any minimum time will elapse before an activate
instruction follows.
(Sheet 2 of 2)
Constant Description
TibrvFtMember.ACTIVATE Activate immediately.
Rendezvous fault tolerance software passes this token
to the callback method to instruct the program to
activate.
Inherited Methods
TibrvEvent.getClosure()
TibrvEvent.isValid()
java.lang.Object.equals
java.lang.Object.getClass
java.lang.Object.hashCode
java.lang.Object.notify
java.lang.Object.notifyAll
java.lang.Object.toString (override)
java.lang.Object.wait
TibrvFtMember()
Constructor
Declaration TibrvFtMember(
TibrvQueue queue,
TibrvFtMemberCallback callback,
TibrvTransport transport,
java.lang.String groupName,
int weight,
int activeGoal,
double heartbeatInterval,
double preparationInterval,
double activationInterval,
java.lang.Object closure)
throws TibrvException
Remarks Upon creating a member object, the program becomes a member of the group.
A program may hold simultaneous memberships in several distinct fault
tolerance groups. For examples, see Multiple Groups on page 217 in TIBCO
Rendezvous Concepts.
Avoid joining the same group twice. It is illegal for a program to maintain more
than one membership in any one fault tolerance group. The constructor does not
guard against this illegal situation, and results are unpredictable.
All arguments are required except for preparationInterval (which may be
zero) and closure (which may be null).
Intervals The heartbeat interval must be less than the activation interval. If the preparation
interval is non-zero, it must be greater than the heartbeat interval and less than
the activation interval. It is an error to violate these rules.
In addition, intervals must be reasonable for the hardware and network
conditions. For information and examples, see Step 4: Choose the Intervals on
page 235 in TIBCO Rendezvous Concepts.
Group Name The group name must be a legal Rendezvous subject name (see Subject Names on
page 61 in TIBCO Rendezvous Concepts). You may use names with several
elements; for examples, see Multiple Groups on page 217 in TIBCO Rendezvous
Concepts.
(Sheet 1 of 2)
Parameter Description
queue Place fault tolerance events for this member on this event queue.
transport Use this transport for fault tolerance internal protocol messages (such as
heartbeat messages).
weight Weight represents the ability of this member to fulfill its purpose, relative
to other members of the same fault tolerance group. Rendezvous fault
tolerance software uses relative weight values to select which members
to activate; members with higher weight take precedence over members
with lower weight.
Acceptable values range from 1 to 65535. Zero is a special, reserved
value; Rendezvous fault tolerance software assigns zero weight to
processes with resource errors, so they only activate when no other
members are available.
For more information, see Rank and Weight on page 204 in TIBCO
Rendezvous Concepts.
heartbeatInterval When this member is active, it sends heartbeat messages at this interval
(in seconds).
The interval must be positive. To determine the correct value, see Step 4:
Choose the Intervals on page 235 in TIBCO Rendezvous Concepts.
(Sheet 2 of 2)
Parameter Description
preparationInterval When the heartbeat signal from one or more active members has been
silent for this interval (in seconds), Rendezvous fault tolerance software
issues an early warning hint (TibrvFtMember.PREPARE_TO_ACTIVATE)
to the ranking inactive member. This warning lets the inactive member
prepare to activate, for example, by connecting to a database server, or
allocating memory.
The interval must be non-negative. Zero is a special value, indicating
that the member does not need advance warning to activate;
Rendezvous fault tolerance software never issues a
TibrvFtMember.PREPARE_TO_ACTIVATE hint when this value is zero. To
determine the correct value, see Step 4: Choose the Intervals on page 235
in TIBCO Rendezvous Concepts.
activationInterval When the heartbeat signal from one or more active members has been
silent for this interval (in seconds), Rendezvous fault tolerance software
considers the silent member to be lost, and issues the instruction to
activate (TibrvFtMember.ACTIVATE) to the ranking inactive member.
When a new member joins a group, Rendezvous fault tolerance software
identifies the new member to existing members (if any), and then waits
for this interval to receive identification from them in return. If, at the
end of this interval, it determines that too few members are active, it
issues the activate instruction (TibrvFtMember.ACTIVATE) to the new
member.
Then interval must be positive. To determine the correct value, see Step
4: Choose the Intervals on page 235 in TIBCO Rendezvous Concepts.
TibrvFtMember.destroy()
Method
TibrvFtMember.getActivationInterval()
Method
TibrvFtMember.getActiveGoal()
Method
TibrvFtMember.getGroupName()
Method
TibrvFtMember.getHeartbeatInterval()
Method
TibrvFtMember.getPreparationInterval()
Method
TibrvFtMember.getQueue()
Method
TibrvFtMember.getTransport()
Method
TibrvFtMember.getWeight()
Method
TibrvFtMember.isValid()
Method
Remarks Returns true if the member is valid; false if the member has been destroyed or is
otherwise invalid.
TibrvFtMember.setWeight()
Method
Purpose Change the weight of a fault tolerance member within its group.
Remarks Weight summarizes the relative suitability of a member for its task, relative to
other members of the same fault tolerance group. That suitability is a combination
of computer speed and load factors, network bandwidth, computer and network
reliability, and other factors. Programs may reset their weight when any of these
factors change, overriding the previous assigned weight.
You can use relative weights to indicate priority among group members.
Zero is a special value; Rendezvous fault tolerance software assigns zero weight
to processes with resource errors, so they only activate when no other members
are available. Programs must always assign weights greater than zero.
When Rendezvous fault tolerance software requests a resource but receives an
error (for example, the member process cannot allocate memory, or start a timer),
it attempts to send the member process a DISABLING_MEMBER advisory message,
and sets the member’s weight to zero, effectively disabling the member. Weight
zero implies that this member is active only as a last resort—when no other
members outrank it. (However, if the disabled member process does become
active, it might not operate correctly.)
Parameter Description
weight The new weight value. See weight on page 223.
See Also Adjusting Member Weights on page 225 in TIBCO Rendezvous Concepts.
TibrvFtMemberCallback
Interface
TibrvFtMemberCallback.onFtAction()
Method
Remarks Each member program of a fault tolerance group must implement this method.
Programs register a member callback object (and this method) with each call to
TibrvFtMember().
For additional information see Fault Tolerance Callback Actions on page 214 in
TIBCO Rendezvous Concepts.
(Sheet 1 of 2)
Parameter Description
member This parameter receives the member object.
(Sheet 2 of 2)
Parameter Description
groupName This parameter receives a string denoting the name of the fault
tolerance group.
TibrvFtMonitor
Class
Remarks Upon creating this object, the program monitors a fault tolerance group.
Monitors are passive—they do not affect the group members in any way.
Rendezvous fault tolerance software queues a monitor event whenever the
number of active members in the group changes—either it detects a new
heartbeat, or it detects that the heartbeat from a previously active member is now
silent, or it receives a message from the fault tolerance component of an active
member indicating deactivation or termination.
The monitor callback method receives the number of active members as an
argument.
By destroying a monitor object, the program stops monitoring the fault tolerance
group.
Programs must destroy instances of this class. Rendezvous software keeps
internal references to these objects, so the Java garbage collector does not delete
them automatically.
Destroying the queue or transport of a monitor automatically destroys the
monitor as well.
Inherited Methods
TibrvEvent.getClosure()
TibrvEvent.getQueue()
TibrvEvent.isValid()
java.lang.Object.equals
java.lang.Object.getClass
java.lang.Object.hashCode
java.lang.Object.notify
java.lang.Object.notifyAll
java.lang.Object.toString (override)
java.lang.Object.wait
TibrvFtMonitor()
Constructor
Declaration TibrvFtMonitor(
TibrvQueue queue,
TibrvFtMonitorCallback callback,
TibrvTransport transport,
java.lang.String groupName,
double lostInterval,
java.lang.Object closure)
throws TibrvException
Remarks The monitor callback method receives the number of active members as an
argument.
The group need not have any members at the time of this constructor call.
Parameter Description
queue Place events for this monitor on this event queue.
lostInterval When the heartbeat signal from an active member has been
silent for this interval (in seconds), Rendezvous fault
tolerance software considers that member lost, and queues a
monitor event.
The interval must be positive. To determine the correct
value, see Step 4: Choose the Intervals on page 235 in TIBCO
Rendezvous Concepts.
See also, Lost Interval on page 242.
Lost Interval The monitor uses the lostInterval to determine whether a member is still
active. When the heartbeat signal from an active member has been silent for this
interval (in seconds), the monitor considers that member lost, and queues a
monitor event.
We recommend setting the lostInterval identical to the group’s
activationInterval, so the monitor accurately reflects the behavior of the
group members.
Group Name The group name must be a legal Rendezvous subject name (see Subject Names on
page 61 in TIBCO Rendezvous Concepts). You may use names with several
elements; for examples, see Multiple Groups on page 217 in TIBCO Rendezvous
Concepts.
TibrvFtMonitor.destroy()
Method
Purpose Stop monitoring a fault tolerance group, and free associated resources.
Remarks This method throws an exception when the monitor object is already invalid, or
when its queue or transport are invalid.
TibrvFtMonitor.getGroupName()
Method
TibrvFtMonitor.getTransport()
Method
TibrvFtMonitorCallback
Interface
TibrvFtMonitorCallback.onFtMonitor()
Remarks A program must define a method of this type as a prerequisite to monitor a fault
tolerance group. Programs register a monitor callback method with each call to
TibrvFtMonitor() on page 241.
Parameter Description
monitor This parameter receives the monitor object.
See Also
This API implements Rendezvous certified delivery features. For a complete
discussion, see Certified Message Delivery on page 139 in TIBCO Rendezvous
Concepts.
Certified delivery software uses advisory messages extensively. For example,
advisories inform sending and receiving programs of the delivery status of each
message. For complete details, see Certified Message Delivery (RVCM) Advisory
Messages on page 269 in TIBCO Rendezvous Concepts.
If your application sends or receives certified messages across network
boundaries, you must configure the Rendezvous routing daemons to exchange
_RVCM administrative messages. For details, see Certified Message Delivery on
page 371 in TIBCO Rendezvous Administration.
Some programs require certified delivery to one of n worker processes. See
Distributed Queue on page 181 in TIBCO Rendezvous Concepts.
Topics
TibrvCmListener
Class
Purpose A certified delivery listener object listens for labeled messages and certified
messages.
Inherited Methods
TibrvListener.getSubject()
TibrvListener.getTransport()
TibrvEvent.getClosure()
TibrvEvent.getQueue()
TibrvEvent.isValid()
java.lang.Object.equals
java.lang.Object.getClass
java.lang.Object.hashCode
java.lang.Object.notify
java.lang.Object.notifyAll
java.lang.Object.toString (override)
java.lang.Object.wait
TibrvCmListener()
Constructor
Declaration TibrvCmListener(
TibrvQueue queue,
TibrvMsgCallback callback,
TibrvCmTransport cmTransport,
java.lang.String subject,
java.lang.Object closure)
throws TibrvException
Purpose Listen for messages that match the subject, and request certified delivery when
available.
Parameter Description
queue For each inbound message, place the listener event on this
event queue.
subject Listen for inbound messages with subjects that match this
specification. Wildcard subjects are permitted. The empty
string is not a legal subject name.
Activation and Details of listener event semantics are identical to those for ordinary listeners; see
Dispatch Activation and Dispatch on page 118.
Inbox Listener To receive unicast (point-to-point) messages, listen to a unique inbox subject
name. First call TibrvTransport.createInbox() to create the unique inbox
name; then call TibrvCmListener() to begin listening. Remember that other
programs have no information about an inbox until the listening program uses it
as a reply subject in an outbound message.
TibrvCmListener.destroy()
Method
void destroy(
boolean cancelAgreements)
Parameter Description
cancelAgreements true cancels all certified delivery agreements of this
listener; certified senders delete from their ledgers all
messages sent to this listener.
false leaves all certified delivery agreements in effect,
so certified senders continue to store messages.
Canceling When destroying a certified delivery listener, a program can either cancel its
Agreements certified delivery agreements with senders, or let those agreements persist (so a
successor listener can receive the messages covered by those agreements).
When canceling agreements, each (previously) certified sender transport receives
a REGISTRATION.CLOSED advisory. Successor listeners cannot receive old
messages.
TibrvCmListener.confirmMsg()
Method
Remarks Use this method only in programs that override automatic confirmation (see
TibrvCmListener.setExplicitConfirm() on page 256). The default behavior
of certified listeners is to automatically confirm delivery when the callback
method returns.
Parameter Description
message Confirm receipt of this message.
Unregistered When a CM listener receives a labeled message, its behavior depends on context:
Message
• If a CM listener is registered for certified delivery, it presents the
supplementary information to the callback method. If the sequence number is
present, then the receiving program can confirm delivery.
• If a CM listener is not registered for certified delivery with the sender, it
presents the sender’s name to the callback method, but omits the sequence
number. In this case, the receiving program cannot confirm delivery;
TibrvCmListener.confirmMsg() throws an exception with the status code
TibrvStatus.NOT_PERMITTED.
Notice that the first labeled message that a program receives on a subject
might not be certified; that is, the sender has not registered a certified delivery
agreement with the listener. If appropriate, the certified delivery library
automatically requests that the sender register the listener for certified
delivery. (See Discovery and Registration for Certified Delivery on page 154 in
TIBCO Rendezvous Concepts.)
A labeled but uncertified message can also result when the sender explicitly
disallows or removes the listener.
TibrvCmListener.isExplicitConfirm()
Method
TibrvCmListener.setExplicitConfirm()
Method
TibrvCmTransport
Class
Purpose A certified delivery transport object implements the CM delivery protocol for
messages.
(Sheet 1 of 3)
(Sheet 2 of 3)
(Sheet 3 of 3)
Inherited Methods
TibrvTransport.createInbox()
TibrvTransport.destroy()
TibrvTransport.isValid()
TibrvTransport.send()
TibrvTransport.sendReply()
TibrvTransport.sendRequest()
java.lang.Object.equals
java.lang.Object.getClass
java.lang.Object.hashCode
java.lang.Object.notify
java.lang.Object.notifyAll
java.lang.Object.toString
java.lang.Object.wait
Field Description
DEFAULT_TIME_LIMIT The default time limit (in seconds) for certified
messages sent on this transport.
The initial value is zero, a special value indicating
that messages do not expire.
Programs can change this value using
TibrvCmTransport.setDefaultTimeLimit().
TibrvCmTransport()
Method
Declaration TibrvCmTransport(
TibrvRvdTransport transport)
throws TibrvException
TibrvCmTransport(
TibrvRvdTransport transport,
java.lang.String cmName,
boolean requestOld)
throws TibrvException
TibrvCmTransport(
TibrvRvdTransport transport,
java.lang.String cmName,
boolean requestOld,
java.lang.String ledgerName,
boolean syncLedger)
throws TibrvException
TibrvCmTransport(
TibrvRvdTransport transport,
java.lang.String cmName,
boolean requestOld,
java.lang.String ledgerName,
boolean syncLedger,
java.lang.String relayAgent)
throws TibrvException
Remarks The new certified delivery transport must employ a valid transport for network
communications.
The certified delivery transport remains valid until the program explicitly
destroys it.
(Sheet 1 of 3)
Parameter Description
transport The new TibrvCmTransport employs this transport object for network
communications.
This object must be a TibrvRvdTransport.
Destroying the TibrvCmTransport does not affect this TibrvRvdTransport object.
(Sheet 2 of 3)
Parameter Description
cmName Bind this reusable name to the new TibrvCmTransport, so the TibrvCmTransport
represents a persistent correspondent with this name.
If non-null, the name must conform to the syntax rules for Rendezvous subject
names. It cannot begin with reserved tokens. It cannot be a non-reusable name
generated by another call to TibrvCmTransport(). It cannot be the empty string.
If omitted or null, then TibrvCmTransport() generates a unique, non-reusable
name for the duration of the transport.
For more information, see Name on page 263.
If this parameter is false (or omitted), then the new TibrvCmTransport does not
require certified senders to retain unacknowledged messages. Certified senders
may delete those messages from their ledgers.
ledgerName If this argument is non-null, then the new TibrvCmTransport uses a file-based
ledger. The argument must represent a valid file name. Actual locations
corresponding to relative file names conform to operating system conventions. We
strongly discourage using the empty string as a ledger file name.
If omitted or null, then the new TibrvCmTransport uses a process-based ledger.
For more information, see Ledger File on page 263.
syncLedger If this argument is true, then operations that update the ledger file do not return
until the changes are written to the storage medium.
If this argument is false (or omitted), the operating system writes changes to the
storage medium asynchronously.
(Sheet 3 of 3)
Parameter Description
relayAgent Designate the rvrad process with this name as the new transport’s relay agent.
If null or omitted, the new TibrvCmTransport does not use a relay agent.
If non-null, the relay agent name must conform to the syntax rules for reusable
names. For details, see Reusable Names on page 166 in TIBCO Rendezvous Concepts.
It is illegal for a relay agent to have the same name as a CM correspondent.
We strongly discourage using the empty string as a relay agent name.
For more information, see Relay Agent on page 263.
Method Forms With only a transport, create a transient correspondent, with a unique,
non-reusable name. (Supplying null as the cmName has the same effect.)
All other parameters are optional, with default values when omitted.
Ledger File Every certified delivery transport stores the state of its certified communications
in a ledger.
If ledgerFile is null, then the new transport stores its ledger exclusively in
process-based storage. When you destroy the transport or the process terminates,
all information in the ledger is lost.
If ledgerFile specifies a valid file name, then the new transport uses that file for
ledger storage. If the transport is destroyed or the process terminates with
incomplete certified communications, the ledger file records that state. When a
new transport binds the same reusable name, it reads the ledger file and continues
certified communications from the state stored in the file.
Even though a transport uses a ledger file, it may sometimes replicate parts of the
ledger in process-based storage for efficiency; however, programmers cannot rely
on this replication.
The syncLedger parameter determines whether writing to the ledger file is a
synchronous operation:
• To specify synchronous writing, supply true. Each time Rendezvous software
writes a ledger item, the call does not return until the data is safely stored in
the storage medium.
• To specify asynchronous writing (the default), supply false. Certified
delivery calls may return before the data is safely stored in the storage
medium, which results in greater speed at the cost of certainty. The ledger file
might not accurately reflect program state in cases of hardware or operating
system kernel failure (but it is accurate in cases of sudden program failure).
Despite this small risk, we strongly recommend this option for maximum
performance.
A program that uses an asynchronous ledger file can explicitly synchronize it
by calling TibrvCmTransport.syncLedger() on page 290.
Destroying a transport with a file-based ledger always leaves the ledger file intact;
it neither erases nor removes a ledger file.
The ledger file must reside on the same host computer as the program that uses it.
TibrvCmTransport.addListener()
Method
Remarks Some sending programs can anticipate requests for certified delivery—even
before the listening programs actually register. In such situations, the sending
transport can pre-register listeners, so Rendezvous software begins storing
outbound messages in the sender’s ledger; when the listener requests certified
delivery, it receives the backlogged messages.
If the correspondent with this cmName already receives certified delivery of this
subject from this sender transport, then TibrvCmTransport.addListener()
has no effect.
If the correspondent with this cmName is disallowed,
TibrvCmTransport.addListener() returns an exception with status code
TibrvStatus.NOT_PERMITTED. You can call
TibrvCmTransport.allowListener() to supersede the effect of a prior call to
TibrvCmTransport.disallowListener(); then call
TibrvCmTransport.addListener() again.
It is not sufficient for a sender to use this method to anticipate listeners; the
anticipated listening programs must also require old messages when creating
certified delivery transports.
Parameter Description
cmName Anticipate a listener from a correspondent with this reusable
name.
subject Anticipate a listener for this subject. Wildcard subjects are illegal.
TibrvCmTransport.allowListener()
Method
Purpose Invite the named receiver to reinstate certified delivery for its listeners,
superseding the effect of any previous disallow calls.
Remarks Upon receiving the invitation to reinstate certified delivery, Rendezvous software
at the listening program automatically sends new registration requests. The
sending program accepts these requests, restoring certified delivery.
Parameter Description
cmName Accept requests for certified delivery to listeners at the
transport with this correspondent name.
TibrvCmTransport.connectToRelayAgent()
Method
Remarks Programs may specify a relay agent when creating a CM transport object.
Connect calls are non-blocking; they immediately return control to the program,
and asynchronously attempt to connect to the relay agent (continuing until they
succeed, or until the program makes a disconnect call).
When a transport attempts to connect to a relay agent, Rendezvous software
automatically locates the relay agent process (if it exists). When the program
successfully connects to the relay agent, they synchronize:
• The transport receives a RELAY.CONNECTED advisory, informing it of
successful contact with the relay agent. (Listen for all advisory messages on
the ordinary TibrvTransport that the TibrvCmTransport employs.)
(When a program cannot locate its relay agent, certified delivery software
produces DELIVERY.NO_RESPONSE advisories; however, we recommend
against designing programs to rely on this side effect.)
• If the client transport is a CM listener, the relay agent listens to the same set of
subjects on behalf of the client. The relay agent also updates its confirmation
state to reflect the state of the transport.
• If the client transport is a CM sender, the relay agent updates its acceptance
state to reflect the state of the transport. The sending client updates its
confirmation state to reflect the state of the relay agent.
• The transport and relay agent exchange the CM data messages that they have
been storing during the time they were disconnected.
Errors The error code TibrvStatus.INVALID_ARG can indicate that the transport does
not have a relay agent.
TibrvCmTransport.destroy()
Method
void destroyEx()
Remarks Destroying a certified delivery transport with a file-based ledger always leaves
the ledger file intact; it neither erases nor removes a ledger file.
These methods automatically disconnect the transport from its relay agent before
destroying the object; see TibrvCmTransport.disconnectFromRelayAgent().
Distributed To destroy a distributed queue transport, use destroyEx(). With the ordinary
Queue destroy call, the distributed queue can lose reliable (non-certified) task messages
before they are processed. In contrast, destroyEx() blocks until previously
assigned tasks are complete; then it destroys the transport and returns. Do not
destroy the underlying transport, nor the transport’s listeners until after
destroyEx() returns.
Restrictions destroyEx() is available in both the thin-message JNI implementation and the
full-message JNI implementation. It is not available in the pure Java
implementation.
TibrvCmTransport.disallowListener()
Method
Remarks Disallowed listeners still receive subsequent messages from this sender, but
delivery is not certified. In other words:
• The listener receives a REGISTRATION.NOT_CERTIFIED advisory, informing it
that the sender has canceled certified delivery of all subjects.
• If the sender’s ledger contains messages sent to the disallowed listener (for
which this listener has not confirmed delivery), then Rendezvous software
removes those ledger items, and does not attempt to redeliver those messages.
• Rendezvous software presents subsequent messages (from the canceling
sender) to the listener without a sequence number, to indicate that delivery is
not certified.
Parameter Description
cmName Cancel certified delivery to listeners of the transport with this
name.
TibrvCmTransport.disconnectFromRelayAgent()
Method
Remarks Disconnect calls are non-blocking; they immediately return control to the
program, and asynchronously proceed with these clean-up tasks:
• If the client transport is a CM listener, the relay agent attempts to synchronize
its listening state with the transport (to assure that the relay agent adequately
represents the listening interest of the client).
• The transport stops communicating with the relay agent.
• The transport stores subsequent outbound events—including data messages
and protocol state changes. If the transport is a certified sender, it cancels its
request for delivery confirmation of outstanding unconfirmed messages. (See
also, Requesting Confirmation on page 157 in TIBCO Rendezvous Concepts.)
• The relay agent stores subsequent inbound events for the transport—
including data messages and protocol state changes.
• A transport that explicitly disconnects without terminating receives a
RELAY.DISCONNECTED advisory, informing it that is safe to sever the physical
network connection. (Terminating transports never receive this advisory;
instead, it is safe to sever the connection when the destroy call returns.)
Errors The error code TibrvStatus.INVALID_ARG can indicate that the transport does
not have a relay agent.
TibrvCmTransport.expireMessages()
Method
Remarks This call checks the ledger for messages that match both the subject and sequence
number criteria, and immediately marks them as expired.
Once a message has expired, the CM transport no longer attempts to redeliver it
to registered listeners.
Rendezvous software presents each expired message to the sender in a
DELIVERY.FAILED advisory. Each advisory includes all the fields of an expired
message. (This call can cause many messages to expire simultaneously.)
Use with extreme caution. This call exempts the expired messages from certified
delivery semantics. It is appropriate only in very few situations.
For example, consider an application program in which an improperly formed
CM message causes registered listeners to exit unexpectedly. When the listeners
restart, the sender attempts to redeliver the offending message, which again
causes the listeners to exit. To break this cycle, the sender can expire the offending
message (along with all prior messages bearing the same subject).
Parameter Description
subject Mark messages with this subject.
Wildcards subjects are permitted, but must exactly reflect
the send subject of the message. For example, if the
program sends to A.* then you may expire messages with
subject A.* (however, A.> does not resolve to match A.*).
TibrvCmTransport.getDefaultTimeLimit()
Method
Purpose Get the default message time limit for all outbound certified messages from a
transport.
Remarks Every labeled message has a time limit, after which the sender no longer certifies
delivery.
Sending programs can explicitly set the time limit on a message (see
TibrvCmMsg.setTimeLimit() on page 299). If a time limit is not already set for
the outbound message, the transport sets it to the transport’s default time limit
(extractable with this method); if this default is not set for the transport (nor for
the message), the default time limit is zero (no time limit).
Time limits represent the minimum time that certified delivery is in effect.
TibrvCmTransport.getLedgerName()
Method
Errors The error code TibrvStatus.ARG_CONFLICT can indicate that the transport does
not have a ledger file.
TibrvCmTransport.getName()
Method
TibrvCmTransport.getRelayAgent()
Method
Purpose Extract the name of the relay agent used by a certified delivery transport.
Errors The error code TibrvStatus.ARG_CONFLICT can indicate that the transport does
not have a relay agent.
TibrvCmTransport.getRequestOld()
Method
Purpose Extract the request old messages flag of a certified delivery transport.
TibrvCmTransport.getSyncLedger()
Method
Errors The error code TibrvStatus.ARG_CONFLICT can indicate that the transport does
not have a ledger file.
TibrvCmTransport.getTransport()
Method
TibrvCmTransport.removeListener()
Method
Remarks This method cancels certified delivery of the specific subject to the
correspondent with this name. The listening correspondent may subsequently
re-register for certified delivery of the subject. (In contrast,
TibrvCmTransport.disallowListener() cancels certified delivery of all
subjects to the correspondent, and prohibits re-registration.)
Senders can call this method when the ledger item for a listening correspondent
has grown very large. Such growth indicates that the listener is not confirming
delivery, and may have terminated. Removing the listener reduces the ledger size
by deleting messages stored for the listener.
When a sending program calls this method, certified delivery software in the
sender behaves as if the listener had closed the endpoint for the subject. The
sending program deletes from its ledger all information about delivery of the
subject to the correspondent with this cmName. The sending program receives a
REGISTRATION.CLOSED advisory, to trigger any operations in the callback method
for the advisory.
If the listening correspondent is available (running and reachable), it receives a
REGISTRATION.NOT_CERTIFIED advisory, informing it that the sender no longer
certifies delivery of the subject.
If the correspondent with this name does not receive certified delivery of the
subject from this sender TibrvCmTransport, then
TibrvCmTransport.removeListener() throws an exception with the status code
TibrvStatus.INVALID_ARG.
Parameter Description
cmName Cancel certified delivery of the subject to listeners of this
correspondent.
TibrvCmTransport.removeSendState()
Method
Background In some programs subject names are useful only for a limited time; after that time,
they are never used again. For example, consider a server program that sends
certified reply messages to client inbox names; it only sends one reply message to
each inbox, and after delivery is confirmed and complete, that inbox name is
obsolete. Nonetheless, a record for that inbox name remains in the server’s ledger.
As such obsolete records accumulate, the ledger size grows. To counteract this
growth, programs can use this method to discard obsolete subject records from
the ledger.
The DELIVERY.COMPLETE advisory is a good opportunity to clear the send state of
an obsolete subject. Another strategy is to review the ledger periodically,
sweeping to detect and remove all obsolete subjects.
Do not use this method to clear subjects that are still in use.
Parameter Description
subject Remove send state for this obsolete subject.
Remarks As a side-effect, this method resets the sequence numbering for the subject, so the
next message sent on the subject would be number 1. In proper usage, this
side-effect is never detected, since obsolete subjects are truly obsolete.
TibrvCmTransport.reviewLedger()
Method
Purpose Query the ledger for stored items related to a subject name.
Remarks The callback method receives one message for each matching subject of outbound
messages stored in the ledger. For example, when FOO.* is the subject,
TibrvCmTransport.reviewLedger() calls its callback method separately for
each matching subject—once for FOO.BAR, once for FOO.BAZ, and once for
FOO.BOX.
Parameter Description
callback This object receives the review messages.
TibrvCmTransport.send()
Method
Remarks This method sends the message, along with its certified delivery protocol
information: the correspondent name of the TibrvCmTransport, a sequence
number, and a time limit. The protocol information remains on the message
within the sending program, and also travels with the message to all receiving
programs.
Programs can explicitly set the message time limit; see
TibrvCmMsg.setTimeLimit() on page 299. If a time limit is not already set for
the outbound message, this method sets it to the transport’s default time limit (see
TibrvCmTransport.setDefaultTimeLimit() on page 288); if that default is not
set for the transport, the default time limit is zero (no time limit).
Parameter Description
msg Send this message.
Wildcard subjects are illegal.
TibrvCmTransport.sendReply()
Method
Remarks This convenience call extracts the reply subject of an inbound request message,
and sends a labeled outbound reply message to that subject. In addition to the
convenience, this call is marginally faster than using separate calls to extract the
subject and send the reply.
This method can send a labeled reply to an ordinary message.
This method automatically registers the requesting CM transport, so the reply
message is certified.
Parameter Description
replyMsg Send this outbound reply message.
requestMsg Send a reply to this inbound request message; extract its reply
subject to use as the subject of the outbound reply message.
If this message has a wildcard reply subject, the method
produces an error.
Give special attention to the order of the arguments to this method. Reversing the
inbound and outbound messages can cause an infinite loop, in which the program
repeatedly resends the inbound message to itself (and all other recipients).
TibrvCmTransport.sendRequest()
Method
This call blocks all other activity on its program thread. If appropriate,
programmers must ensure that other threads continue dispatching events on its
queues.
Parameter Description
msg Send this request message.
Wildcard subjects are illegal.
timeout Maximum time (in seconds) that this call can block while
waiting for a reply.
Remarks Programs that receive and process the request message cannot determine that the
sender has blocked until a reply arrives.
The sender and receiver must already have a certified delivery agreement,
otherwise the request is not certified.
The request message must have a valid destination subject; see
TibrvMsg.setSendSubject() on page 78.
A certified request does not necessarily imply a certified reply; the replying
program determines the type of reply message that it sends.
3. Block until the listener receives a reply; if the time limit expires before a reply
arrives, then return null. (The reply event uses a private queue that is not
accessible to the program.)
4. Return the reply message as the value of the method call.
TibrvCmTransport.setDefaultTimeLimit()
Method
Purpose Set the default message time limit for all outbound certified messages from a
transport.
Remarks Every labeled message has a time limit, after which the sender no longer certifies
delivery.
Sending programs can explicitly set the time limit on a message (see
TibrvCmMsg.setTimeLimit() on page 299). If a time limit is not already set for
the outbound message, the transport sets it to the transport’s default time limit
(set with this method); if this default is not set for the transport, the default time
limit is zero (no time limit).
Time limits represent the minimum time that certified delivery is in effect.
Parameter Description
timeLimit Use this time limit (in whole seconds). The time limit must be
non-negative.
TibrvCmTransport.setPublisherInactivityDiscardInterval()
Method
Purpose Set a time limit after which a listening CM transport can discard state for inactive
CM senders.
Remarks The timeout value limits the time that can elapse during which such a sender does
not send a message. When the elapsed time exceeds this limit, the listening
transport declares the sender inactive, and discards internal state corresponding
to the sender.
We discourage programmers from using this call except to solve a very specific
problem, in which a long-running CM listener program accumulates state for a
large number of obsolete CM senders with non-reusable names.
Before using this call, review every subject for which the CM transport has a
listener; ensure that only CM senders with non-reusable names send to those
subjects. (If senders with reusable names send messages to such subjects, the
listening transport can discard their state, and incorrect behavior can result.)
Parameter Description
timeout Use this time limit (in whole seconds). The time limit must be
non-negative.
TibrvCmTransport.syncLedger()
Method
Remarks When this method returns, the transport’s current state is safely stored in the
ledger file.
Transports that use synchronous ledger files need not call this method, since the
current state is automatically written to the storage medium before returning.
Transports that use process-based ledger storage need not call this method, since
they have no ledger file.
Errors The error code TibrvStatus.INVALID_ARG can indicate that the transport does
not have a ledger file.
TibrvCmReviewCallback
Interface
TibrvCmReviewCallback.onLedgerMsg()
Method
Parameter Description
cmTransport This parameter receives the transport.
subject This parameter receives the subject for this ledger item.
(Sheet 1 of 2)
seqno_last_sent The sequence number of the most recent message sent with this
subject name.
This field has datatype TibrvMsg.U64.
(Sheet 2 of 2)
total_size The total storage (in bytes) occupied by all messages with this
subject name.
If the ledger contains several messages with this subject name,
then this field sums the storage space over all of them.
This field has datatype TibrvMsg.I64.
listener Each summary message can contain one or more fields named
listener. Each listener field contains a nested submessage with
details about a single registered listener.
This field has datatype TibrvMsg.MSG.
listener.name Within each listener submessage, the name field contains the
name of the listener transport.
This field has datatype TibrvMsg.STRING.
TibrvCmMsg
Class
Remarks Programs do not create instances of TibrvCmMsg. Instead, programs use its static
methods to get and set certified delivery information of TibrvMsg objects.
TibrvCmMsg.getTimeLimit() Extract the message time limit from a certified message. 298
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.toString
java.lang.Object.wait
TibrvCmMsg.getSender()
Method
Purpose Extract the correspondent name of the sender from a certified message.
Parameter Description
msg Extract the sender name from this message.
TibrvCmMsg.getSequence()
Method
Parameter Description
msg Extract the sequence number from this message.
Release 5 In release 6 (and later) the sequence number is a 64-bit unsigned integer, while in
Interaction older releases (5 and earlier) it is a 32-bit unsigned integer.
TibrvCmMsg.getTimeLimit()
Method
Remarks Programs can explicitly set the message time limit (see
TibrvCmMsg.setTimeLimit() on page 299).
Parameter Description
msg Extract the time limit from this message.
TibrvCmMsg.setTimeLimit()
Method
Remarks Every labeled message has a time limit, after which the sender no longer certifies
delivery.
Sending programs can explicitly set the message time limit using this method. If a
time limit is not already set for the outbound message,
TibrvCmTransport.send() sets it to the transport’s default time limit (see
TibrvCmTransport.setDefaultTimeLimit() on page 288); if that default is not
set for the transport, the default time limit is zero (no time limit).
Time limits represent the minimum time that certified delivery is in effect.
It is meaningless for receiving programs to call this method.
Parameter Description
msg Set the time limit of this message.
timeLimit Use this time limit (in whole seconds) for the message. The
time limit must be non-negative.
Programs can use distributed queues for one of n certified delivery to a group of
worker processes.
A distributed queue is a group of TibrvCmQueueTransport objects, each in a
separate process. From the outside, a distributed queue appears as though a
single transport object; inside, the group members act in concert to process
inbound task messages. Ordinary senders and CM senders can send task
messages to the group. Notice that the senders are not group members, and do
not do anything special to send messages to a group; rather, they send messages
to ordinary subject names. Inside the group, the member acting as scheduler
assigns each task message to exactly one of the other members (which act as
workers); only that worker processes the task message. Each member uses CM
listener objects to receive task messages.
Distributed queues depend upon the certified delivery methods and the fault
tolerance methods.
Topics
TibrvCmQueueTransport
Class
(Sheet 1 of 2)
(Sheet 2 of 2)
Inherited Methods
Legal TibrvCmTransport.getName()
Methods TibrvCmTransport.getTransport()
TibrvTransport.isValid() (override)
java.lang.Object.equals
java.lang.Object.getClass
java.lang.Object.hashCode
java.lang.Object.notify
java.lang.Object.notifyAll
java.lang.Object.toString
java.lang.Object.wait
Disabled TibrvCmTransport.addListener()
Methods TibrvCmTransport.allowListener()
TibrvCmTransport.connectToRelayAgent()
TibrvCmTransport.disallowListener()
TibrvCmTransport.disconnectFromRelayAgent()
TibrvCmTransport.getDefaultTimeLimit()
TibrvCmTransport.getLedgerName()
TibrvCmTransport.getRelayAgent()
TibrvCmTransport.getRequestOld()
TibrvCmTransport.getSyncLedger()
TibrvCmTransport.removeListener()
TibrvCmTransport.removeSendState()
TibrvCmTransport.reviewLedger()
TibrvCmTransport.send()
TibrvCmTransport.sendReply()
TibrvCmTransport.sendRequest()
TibrvCmTransport.setDefaultTimeLimit()
TibrvCmTransport.syncLedger()
TibrvTransport.createInbox()
TibrvTransport.send()
TibrvTransport.sendReply()
TibrvTransport.sendRequest()
Constant Description
TibrvCmQueueTransport.DEFAULT_COMPLETE_TIME static final double 0
Constant Description
TibrvCmQueueTransport.DEFAULT_WORKER_TASKS static final int 1
TibrvCmQueueTransport()
Constructor
Declaration TibrvCmQueueTransport(
TibrvRvdTransport transport,
java.lang.String cmName)
throws TibrvException
TibrvCmQueueTransport(
TibrvRvdTransport transport,
java.lang.String cmName,
int workerWeight,
int workerTasks,
int schedulerWeight,
double schedulerHeartbeat,
double schedulerActivation)
throws TibrvException
(Sheet 1 of 3)
Parameter Description
transport The new TibrvCmQueueTransport employs this TibrvRvdTransport
object for network communications.
Destroying the TibrvCmQueueTransport does not affect this transport.
cmName Bind this reusable name to the new transport object, which becomes a
member of the distributed queue with this name.
The name must be non-null, and conform to the syntax rules for
Rendezvous subject names. It cannot begin with reserved tokens. It
cannot be a non-reusable name generated by a call to
TibrvCmTransport(). It cannot be the empty string.
(Sheet 2 of 3)
Parameter Description
workerWeight When the scheduler receives a task, it assigns the task to the available
worker with the greatest worker weight.
A worker is considered available unless either of these conditions are
true:
• The pending tasks assigned to the worker member exceed its task
capacity.
• The worker is also the scheduler. (The scheduler assigns tasks to its
own worker role only when no other workers are available.)
When omitted, the default value is 1.
workerTasks Task capacity is the maximum number of tasks that a worker can accept.
When the number of accepted tasks reaches this maximum, the worker
cannot accept additional tasks until it completes one or more of them.
When the scheduler receives a task, it assigns the task to the worker with
the greatest worker weight—unless the pending tasks assigned to that
worker exceed its task capacity. When the preferred worker has too
many tasks, the scheduler assigns the new inbound task to the worker
with the next greatest worker weight.
When omitted, the default value is 1. Value must be greater than zero.
schedulerWeight Weight represents the ability of this member to fulfill the role of
scheduler, relative to other members with the same name. Cooperating
members use relative scheduler weight values to elect one member as the
scheduler; members with higher scheduler weight take precedence.
When omitted, the default value is 1.
Acceptable values range from 0 to 65535. Zero is a special value,
indicating that the member can never be the scheduler. For more
information, see Rank and Weight on page 204 in TIBCO Rendezvous
Concepts.
(Sheet 3 of 3)
Parameter Description
schedulerHeartbeat The scheduler sends heartbeat messages at this interval (in seconds).
All TibrvCmQueueTransport objects with the same name must specify
the same value for this parameter. The value must be strictly positive. To
determine the correct value, see Step 4: Choose the Intervals on page 235
in TIBCO Rendezvous Concepts.
When omitted, the default value is 1.0.
schedulerActivation When the heartbeat signal from the scheduler has been silent for this
interval (in seconds), the cooperating member with the greatest
scheduler weight takes its place as the new scheduler.
All TibrvCmQueueTransport objects with the same name must specify
the same value for this parameter. The value must be strictly positive. To
determine the correct value, see Step 4: Choose the Intervals on page 235
in TIBCO Rendezvous Concepts.
When omitted, the default value is 3.5.
TibrvCmQueueTransport.destroy()
Method
TibrvCmQueueTransport.getCompleteTime()
Method
Purpose Extract the worker complete time limit of a distributed queue member.
TibrvCmQueueTransport.getUnassignedMessageCount()
Function
Purpose Extract the number of unassigned task messages from a distributed queue
transport.
Remarks An unassigned task message is a message received by the scheduler, but not yet
assigned to any worker in the distributed queue.
This call produces a valid count only within a scheduler process. Within a worker
process, this call always produces zero.
TibrvCmQueueTransport.getWorkerWeight()
Method
TibrvCmQueueTransport.getWorkerTasks()
Method
TibrvCmQueueTransport.setCompleteTime()
Method
Purpose Set the worker complete time limit of a distributed queue member.
Remarks If the complete time is non-zero, the scheduler waits for a worker member to
complete an assigned task. If the complete time elapses before the scheduler
receives completion from the worker member, the scheduler reassigns the task to
another worker member.
Zero is a special value, which specifies no limit on the completion time—that is,
the scheduler does not set a timer, and does not reassign tasks when task
completion is lacking. All members implicitly begin with a default complete time
value of zero; programs can change this parameter using this method.
Parameter Description
completeTime Use this complete time (in seconds). The time must be
non-negative.
TibrvCmQueueTransport.setTaskBacklogLimit...()
Method
void setTaskBacklogLimitInMessages(
int msgLimit)
throws TibrvException
Purpose Set the scheduler task queue limits of a distributed queue transport.
Remarks The scheduler stores tasks in a queue. These properties limit the maximum size of
that queue—by number of bytes or number of messages (or both). When no value
is set for these properties, the default is no limit.
When the task messages in the queue exceed either of these limits, Rendezvous
software deletes new inbound task messages.
Programs may call each of these methods at most once. The calls must occur
before the transport assumes the scheduler role; after a transport acts as a
scheduler, these values are fixed, and subsequent attempts to change them throw
an exception with status code TibrvStatus.NOT_PERMITTED.
Parameter Description
byteLimit Use this size limit (in bytes).
Zero is a special value, indicating no size limit.
TibrvCmQueueTransport.setWorkerWeight()
Method
Remarks Relative worker weights assist the scheduler in assigning tasks. When the
scheduler receives a task, it assigns the task to the available worker with the
greatest worker weight.
The default worker weight is 1; programs can set this parameter at creation using
TibrvCmQueueTransport(), or change it dynamically using this method.
Parameter Description
workerWeight Use this worker weight.
TibrvCmQueueTransport.setWorkerTasks()
Method
Remarks Task capacity is the maximum number of tasks that a worker can accept. When
the number of accepted tasks reaches this maximum, the worker cannot accept
additional tasks until it completes one or more of them.
When the scheduler receives a task, it assigns the task to the worker with the
greatest worker weight—unless the pending tasks assigned to that worker exceed
its task capacity. When the preferred worker has too many tasks, the scheduler
assigns the new inbound task to the worker with the next greatest worker weight.
The default worker task capacity is 1.
Parameter Description
workerTasks Use this task capacity. Value must be greater than zero.
Topics
TibrvException
Class
Remarks Rendezvous software also throws exceptions defined as part of the Java language.
Field Description
error An error or status code, indicating the reason for the
exception; see TibrvStatus on page 322.
internal In some cases this field contains a Java exception, which can
yield additional information. When no further information is
available, this field is null.
Inherited Methods
java.lang.Throwable.fillInStackTrace
java.lang.Throwable.getLocalizedMessage
java.lang.Throwable.getMessage
java.lang.Throwable.printStackTrace (override)
java.lang.Throwable.toString (override)
java.lang.Object.equals
java.lang.Object.getClass
java.lang.Object.hashCode
java.lang.Object.notify
java.lang.Object.notifyAll
java.lang.Object.wait
TibrvException.printStackTrace()
Method
void printStackTrace(java.io.PrintWriter s)
void printStackTrace(java.io.PrintStream s)
Purpose Print stack trace of this exception, and of the internal exception (if it is set).
Overrides java.lang.Throwable.printStackTrace
Parameter Description
s Print the stack trace to this object.
When absent, print to the standard error stream.
TibrvStatus
Class
(Sheet 1 of 5)
Status Description
TibrvStatus.INIT_FAILURE Cannot create the network transport.
(Sheet 2 of 5)
Status Description
TibrvStatus.VERSION_MISMATCH The library, header files and Rendezvous daemon are
incompatible.
TibrvStatus.INVALID_NAME The field name is too long; see Field Name Length on
page 56.
TibrvStatus.INVALID_SIZE The explicit size in the field does not match its explicit
type.
TibrvStatus.INVALID_COUNT The explicit field count does not match its explicit
type.
(Sheet 3 of 5)
Status Description
TibrvStatus.RESERVED_HANDLER The datatype handler number is reserved for
Rendezvous internal datatype handlers.
(Sheet 4 of 5)
Status Description
TibrvStatus.INVALID_TIME_INTERVAL The method received a negative timer interval.
(Sheet 5 of 5)
Status Description
TibrvStatus.AGENT_ERROR Invalid response from rva.
TibrvStatus.AGENT_DISCONNECTED The transport has lost its connection to rva. Check the
physical network connection. Check that rva is still
running.
TibrvErrorCallback
Interface
Remarks Programs can implement this interface (optional) to process asynchronous errors.
TibrvErrorCallback.onError()
Method
Remarks Rendezvous software calls this method in two asynchronous error situations:
• The connection to the Rendezvous agent has broken.
In this situation, the tibrvObject parameter receives the broken
TibrvRvaTransport object. All listener objects associated with the broken
transport are invalid.
• A subscription (listener) request failed.
In this situation, the tibrvObject parameter receives the TibrvListener
object representing the failed subscription. This situation is rare.
Programs need not respond the these errors. Programs that do respond to these
errors usually inform the user of the problem.
Parameter Description
tibrvObject This parameter receives the object that is the locus of the
error—either a TibrvRvaTransport, or a TibrvListener.
errorCode This parameter receives a status code indicating the error. See
TibrvStatus on page 322.
Topics
• TibrvMsg methods:
— TibrvMsg.getDecoder(), page 330
— TibrvMsg.getEncoder(), page 331
— TibrvMsg.setHandlers(), page 332
• TibrvMsgDecoder, page 333
• TibrvMsgEncoder, page 335
TibrvMsg.getDecoder()
Method
Parameter Description
userType This type designator must be in the inclusive range
[TibrvMsg.USER_FIRST,TibrvMsg.USER_LAST].
TibrvMsg.getEncoder()
Method
Parameter Description
userType This type designator must be in the inclusive range
[TibrvMsg.USER_FIRST, TibrvMsg.USER_LAST].
TibrvMsg.setHandlers()
Method
Purpose Define a custom datatype by registering its encoder and decoder interfaces.
Remarks The encoder and decoder must implement inverse operators. That is, when the
encoder encodes a Java object as a byte array, and the decoder must decode the
byte array to an identical Java object. Conversely, when the decoder decodes the
byte array to a Java object, the encoder must encode the Java object as an identical
byte array.
This method sets (or replaces) both interfaces. Supplying null for either the
encoder or the decoder, removes that interface. Supplying null for both interfaces
disables the custom type (by removing both interfaces).
Parameter Description
userType Define a custom datatype with this numeric designator.
This type designator must be in the inclusive range
[TibrvMsg.USER_FIRST,TibrvMsg.USER_LAST].
TibrvMsgDecoder
Interface
Purpose Decode custom datatypes from wire format into Java objects.
TibrvMsgDecoder.decode()
Method
Purpose Decode data (of a custom datatype) from wire format into a Java object.
Remarks When this method successfully decodes the data, it must return the decoding as a
Java object. When this method cannot decode the data, it must return null.
Parameter Description
type Decode this custom datatype.
TibrvMsgEncoder
Interface
Remarks To define this interface, programs must implement both of its methods.
TibrvMsgEncoder.canEncode()
Method
Purpose Test whether this encoder can encode the data as a particular wire format custom
datatype.
Parameter Description
type Test viability of encoding the data as an instance of this custom
datatype.
TibrvMsgEncoder.encode()
Method
Remarks Before calling this method, TibrvMsg first checks its applicability by calling
TibrvMsgEncoder.canEncode(). Whenever TibrvMsgEncoder.canEncode()
indicates that encoding is viable, this method must correctly encode the object.
When this method successfully encodes the data, it must return the encoding as a
byte array; the byte array value can have length zero. When this method fails, it
must return null.
Methods that call TibrvMsgEncoder.encode() incorporate its byte array value
directly into a TibrvMsg object.
Parameter Description
type Encode the data as an instance of this custom datatype.
Index
A callback method
asynchronous error 330
accept, virtual circuit create 210 fault tolerance 237
activate, fault tolerance 220 fault tolerance monitor 247
activation interval 226 inbound message 125
active goal, fault tolerance 227 review ledger 292
add timer 133
datatype conversion during 53 canEncode() 338
scalar 54 certificate
add() 51, 160 set daemon certificate 37
addField() 56 set user certificate 39, 40
addListener() 265 certified delivery 249
address, IP 99 add
advisory message, see TIBCO Rendezvous Concepts listener 265
agent 6 allow listener 266
allow listener 266 confirm 254
applet, remote 13 connect to relay agent 267
archive files 20 destroy
asynchronous error 35 transport 269
callback method 330 disallow listener 270
disconnect from relay agent 271
expire messages 272
get message parameter
B sequence number 296
time limit 298
backward compatibility. See, release 5. get sender name 295
batch mode 206 get transport parameter
bytes, get field as 63 correspondent name 275
ledger name 274
relay agent 276
request old 277
C sync ledger 278
time limit 273
C library files 21 transport 279
is explicit confirm 255
label information, inbound message 125
ledger review 283
listener 250
create 252
decoder E
get 332
interface 335 elements(), queues in a queue group 164
default queue 138 embedded license 202
isDefault() 150 empty array 52
defaultQueue() 27 encode() 339
delay, reconnect, rva 194, 197 encoder
description 181, 185 get 333
destroy() interface 337
certified delivery listener 253 encoding, character 3
certified delivery transport 269 get 71
distributed queue transport 309 set 79
event 114 environment
event queue 142 isValid() 31
fault tolerance member 225 TibrvSdContext class 36
fault tolerance monitor 243 environment variables 21
queue group 162 environment, Tibrv 23
transport 179 error callback
destroyEx() get 28
certified delivery transport 269 interface 329
disallowListener() 270 set 35
discard amount, get 145 errors 319
disconnectFromRelayAgent() 271 event
dispatch() class 112
queue 143 closure data, get 115
queue group 163 destroy 114
queue or queue group 135 get count from a queue 144
dispatch, timed 156, 169 get queue 116
dispatcher thread 170 poll 136
create 172 timed dispatch 137
interrupt 170 validity 117
distributed queue 301 event dispatch 135
destroy 309 event queue 156
get complete time 310 class 138
get worker task capacity 313 create 141
get worker weight 312 destroy 142
member, create 306 dispatch 143
set complete time 314 get
set scheduler task queue limits 315 discard amount 145
set worker task capacity 317 limit policy 146
set worker weight 316 max events 147
transport 302 name 148
N port
IP 104
name rva transport 195
certified delivery 295 preparation interval 230
certified delivery transport 263 prepare to activate, fault tolerance 219
get name 275 pre-register certified delivery listener 265
datatype name 72 printStackTrace() 321
event queue 148, 153 priority, of event queue 149
fault tolerance group 228 set 155
fault tolerance monitor 244 process transport class 186
native implementation, test 30 processTransport() 34
native library files 21
nested message, get 58
network interface 200
network transport Q
object 187
set batch mode 206 queue
number of fields in a message 68 add to group 160
create 141
default 27
destroy 142
O dispatch 143
fault tolerance event 231
old messages, request certified delivery 277 get
onError() 330 discard amount 145
onFtAction() 237 event count 144
onFtMonitor() 247 limit policy 146
onLedgerMsg() 292 max events 147
onMsg() 125 name 148
onTimer() 133 priority 149
open() 32 get queue from event 116
isDefault() 150
isValid() 151
poll 152
P set
limit policy 154
package 18 name 153
PEM 39 priority 155
PKCS #12 40 timed dispatch 156
poll()
event queue 152
queue group 167
queue or queue group 136
V
valid
event 117
event queue 151
fault tolerance member 234
queue group 166
Tibrv environment 31
transport 180
version number, get 29
virtual circuit
create accept 210
create connect 211
get connect subject 213
transport class 208
wait for connection 214
W
wait, for virtual circuit connection 214
waitForVcConnection() 214
web server 13
weight, fault tolerance
get 233
set 235
withdraw from fault tolerance group 225
worker weight, distributed queue
get 312
set 316
X
XML data 108
get byte array 110