Package com.tibco.tibrv
Class TibrvJMSTransport
- java.lang.Object
- 
- com.tibco.tibrv.TibrvTransport
- 
- com.tibco.tibrv.TibrvNetTransport
- 
- com.tibco.tibrv.TibrvJMSTransport
 
 
 
- 
 public class TibrvJMSTransport extends com.tibco.tibrv.TibrvNetTransportNetwork transport using TIBCO Enterprise Message Service EMS client to connect to the network. This transport can be used by Java Applets and Java applications. TibrvJMSTransport does not require JNI library. It connects to the TIBCO Enterprise Message Service server directly. To receive notification in case the underlying EMS transport is terminated, useTibrv.setErrorCallback()method.
- 
- 
Constructor SummaryConstructors Constructor Description TibrvJMSTransport()Creates EMS transport connecting to the TIBCO Enterprise Message Service server running on the local computer with default port.TibrvJMSTransport(java.lang.String serverURL)Creates EMS transport connecting to the TIBCO Enterprise Message Service server specified by serverURL parameter.TibrvJMSTransport(java.lang.String serverURL, java.lang.String clientId, java.lang.String userName, java.lang.String password)Creates EMS transport connecting as specified user to the TIBCO Enterprise Message Service server.TibrvJMSTransport(java.lang.String serverURL, java.lang.String clientId, java.lang.String userName, java.lang.String password, java.util.Hashtable sslParameters)Creates EMS transport connecting via TLS to the TIBCO Enterprise Message Service server.TibrvJMSTransport(java.lang.String serverURL, java.lang.String clientId, java.lang.String userName, java.lang.String password, java.util.Hashtable sslParameters, boolean emulateReconnect)Create EMS transport which has the ability to reconnect to a server among a list of comma separated EMS servers in the event of current connection is down.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddestroy()Destroys this transport and all associated listeners.voiddestroyInbox(java.lang.String inbox)Explicitly destroy an inbox when automatic inbox garbage collection is disabled.java.lang.StringgetCurrentConnectedServer()Get the url of currently connected server.java.lang.StringgetDurableListenerMode()Returns currently configured durable listener name prefix.booleanisPersistentDelivery()Returns true if persistent delivery mode is set for this transport.voidrecoverConnection()This method is used to reestablish a connection with an EMS server.voidsetDurableListenerMode(java.lang.String durableNamePrefix)Set or cancel durable listener mode.voidsetInboxGarbageCollection(boolean val)Enable or disable automatic inbox garbage collection.voidsetPersistentDelivery(boolean persistent)Set persistent delivery mode for this transport.java.lang.StringtoString()Returns string representation of this transportvoidunsubscribe(java.lang.String durableNamePrefix, java.lang.String subject)Unsubscribe durable Jakarta Messaging subscriber previously created for Rendezvous listener in durable listener mode.
 
- 
- 
- 
Constructor Detail- 
TibrvJMSTransportpublic TibrvJMSTransport() throws com.tibco.tibrv.TibrvExceptionCreates EMS transport connecting to the TIBCO Enterprise Message Service server running on the local computer with default port.- Throws:
- com.tibco.tibrv.TibrvException
 
 - 
TibrvJMSTransportpublic TibrvJMSTransport(java.lang.String serverURL) throws com.tibco.tibrv.TibrvExceptionCreates EMS transport connecting to the TIBCO Enterprise Message Service server specified by serverURL parameter.- Throws:
- com.tibco.tibrv.TibrvException
 
 - 
TibrvJMSTransportpublic TibrvJMSTransport(java.lang.String serverURL, java.lang.String clientId, java.lang.String userName, java.lang.String password) throws com.tibco.tibrv.TibrvExceptionCreates EMS transport connecting as specified user to the TIBCO Enterprise Message Service server.- Throws:
- com.tibco.tibrv.TibrvException
 
 - 
TibrvJMSTransportpublic TibrvJMSTransport(java.lang.String serverURL, java.lang.String clientId, java.lang.String userName, java.lang.String password, java.util.Hashtable sslParameters) throws com.tibco.tibrv.TibrvExceptionCreates EMS transport connecting via TLS to the TIBCO Enterprise Message Service server. TLS parameters which can be set in the sslParameters Hashtable are documented in com.tibco.tibjms.TibjmsSSL class.- Throws:
- com.tibco.tibrv.TibrvException
 
 - 
TibrvJMSTransportpublic TibrvJMSTransport(java.lang.String serverURL, java.lang.String clientId, java.lang.String userName, java.lang.String password, java.util.Hashtable sslParameters, boolean emulateReconnect) throws com.tibco.tibrv.TibrvExceptionCreate EMS transport which has the ability to reconnect to a server among a list of comma separated EMS servers in the event of current connection is down. The server is picked in round robin fashion. The reconnect will start with last connected server.- Throws:
- com.tibco.tibrv.TibrvException
 
 
- 
 - 
Method Detail- 
destroypublic void destroy() Destroys this transport and all associated listeners.- Specified by:
- destroyin class- com.tibco.tibrv.TibrvTransport
 
 - 
toStringpublic java.lang.String toString() Returns string representation of this transport- Overrides:
- toStringin class- java.lang.Object
 
 - 
setPersistentDeliverypublic void setPersistentDelivery(boolean persistent) Set persistent delivery mode for this transport.
 - 
isPersistentDeliverypublic boolean isPersistentDelivery() Returns true if persistent delivery mode is set for this transport.
 - 
setDurableListenerModepublic void setDurableListenerMode(java.lang.String durableNamePrefix) throws com.tibco.tibrv.TibrvExceptionSet or cancel durable listener mode. If parameterdurableNamePrefixspecifies non-empty string, all subsequent calls to create Rendezvous listeners on this transport will use durable Jakarta Messaging subscribers created on a Session with AUTO_ACKNOWLEDGE acknowledge mode and with namedurableNamePrefix:subject-name. Such subscribers remain present even if corresponding Rendezvous listener is closed viaTibrvListener.destroy(). If an application creates identical Rendesvous listener again, it will receive messages sent to it while it was offline. To completely destroy durable listener, it must be first destroyed via call toTibrvListener.destroy()and then unsubscribed via call tounsubscribe()method. If this method is called withnullparameter it cancels durable listener mode such that subsequent calls to create Rendezvous listeners will not use durable Jakarta Messaging subscribers. This method can be also used to change durable subscriber name prefix at any time.- Parameters:
- durableNamePrefix- set durable listener mode if not empty, cancel durable subscriber mode if this parameter is- null.
- Throws:
- java.lang.IllegalArgumentException- if parameter is an empty string.
- com.tibco.tibrv.TibrvException- if listener creation failed for any reason.
 
 - 
getDurableListenerModepublic java.lang.String getDurableListenerMode() Returns currently configured durable listener name prefix. Returnsnullif durable listener mode is not set.
 - 
recoverConnectionpublic void recoverConnection() throws com.tibco.tibrv.TibrvExceptionThis method is used to reestablish a connection with an EMS server. The transport has to be created with emulate reconnect mode set to true if non-fault-tolarent behavior of a ',' separated server URL list is desired.- Throws:
- com.tibco.tibrv.TibrvException- if a new connection was not established.
 
 - 
getCurrentConnectedServerpublic java.lang.String getCurrentConnectedServer() Get the url of currently connected server.- Returns:
- server url
 
 - 
unsubscribepublic void unsubscribe(java.lang.String durableNamePrefix, java.lang.String subject) throws com.tibco.tibrv.TibrvExceptionUnsubscribe durable Jakarta Messaging subscriber previously created for Rendezvous listener in durable listener mode. Notice this method must be called only after corresponding Rendezvous listener has beed destroyed. If Rendezvous listener is not destroyed this method throws exception.- Parameters:
- durableNamePrefix- durable name prefix specified at the time Rendezvous listener was created.
- subject- listener subject.
- Throws:
- com.tibco.tibrv.TibrvException- if listener with such name prefix and subject was never created or if it is open (not destroyed).
 
 - 
setInboxGarbageCollectionpublic void setInboxGarbageCollection(boolean val) throws com.tibco.tibrv.TibrvExceptionEnable or disable automatic inbox garbage collection. By default, when the application creates an inbox, creates a listener on that inbox and finally destroys the listener on that inbox, the transport automatically garbage collects the inbox and its resources. If the application needs to create a listener on the same inbox more than once, this method can be used to disable automatic inbox garbage collection.- Parameters:
- val- equals false to disable inbox garbage collection.
- Throws:
- com.tibco.tibrv.TibrvException- if any inboxes already exist when this method is called.
 
 - 
destroyInboxpublic void destroyInbox(java.lang.String inbox) throws com.tibco.tibrv.TibrvExceptionExplicitly destroy an inbox when automatic inbox garbage collection is disabled.- Parameters:
- inbox- inbox to be destroyed.
- Throws:
- com.tibco.tibrv.TibrvException- if automatic garbage collection is enabled or if the string is not an inbox.
 
 
- 
 
-