public class TibrvJMSTransport
extends com.tibco.tibrv.TibrvNetTransport
Tibrv.setErrorCallback()
method.Constructor and Description |
---|
TibrvJMSTransport()
Creates JMS transport connecting to the TIBCO Enterprise Message Service
server running on the local computer with default port.
|
TibrvJMSTransport(java.lang.String serverURL)
Creates JMS 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 JMS 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 JMS 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 JMS transport which has the ability to reconnect to a
server among a list of comma separated JMS servers in the
event of current connection is down.
|
Modifier and Type | Method and Description |
---|---|
void |
destroy()
Destroys this transport and all associated listeners.
|
void |
destroyInbox(java.lang.String inbox)
Explicitly destroy an inbox when automatic inbox garbage collection is disabled.
|
java.lang.String |
getCurrentConnectedServer()
Get the url of currently connected server.
|
java.lang.String |
getDurableListenerMode()
Returns currently configured durable listener name
prefix.
|
boolean |
isPersistentDelivery()
Returns true if persistent delivery mode is set for this transport.
|
void |
recoverConnection()
This method is used to reestablish a connection with an EMS server.
|
void |
setDurableListenerMode(java.lang.String durableNamePrefix)
Set or cancel durable listener mode.
|
void |
setInboxGarbageCollection(boolean val)
Enable or disable automatic inbox garbage collection.
|
void |
setPersistentDelivery(boolean persistent)
Set persistent delivery mode for this transport.
|
java.lang.String |
toString()
Returns string representation of this transport
|
void |
unsubscribe(java.lang.String durableNamePrefix,
java.lang.String subject)
Unsubscribe durable JMS subscriber previously created for Rendezvous
listener in durable listener mode.
|
public TibrvJMSTransport() throws TibrvException
TibrvException
public TibrvJMSTransport(java.lang.String serverURL) throws TibrvException
TibrvException
public TibrvJMSTransport(java.lang.String serverURL, java.lang.String clientId, java.lang.String userName, java.lang.String password) throws TibrvException
TibrvException
public TibrvJMSTransport(java.lang.String serverURL, java.lang.String clientId, java.lang.String userName, java.lang.String password, java.util.Hashtable sslParameters) throws TibrvException
TibrvException
public TibrvJMSTransport(java.lang.String serverURL, java.lang.String clientId, java.lang.String userName, java.lang.String password, java.util.Hashtable sslParameters, boolean emulateReconnect) throws TibrvException
TibrvException
public void destroy()
public java.lang.String toString()
public void setPersistentDelivery(boolean persistent)
public boolean isPersistentDelivery()
public void setDurableListenerMode(java.lang.String durableNamePrefix) throws TibrvException
durableNamePrefix
specifies non-empty
string, all subsequent calls to create Rendezvous listeners
on this transport will use durable JMS subscribers created on a
Session with AUTO_ACKNOWLEDGE acknowledge mode and with name
durableNamePrefix:subject-name
.
Such subscribers remain present even if corresponding Rendezvous
listener is closed via TibrvListener.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 to TibrvListener.destroy()
and then unsubscribed
via call to unsubscribe()
method.
If this method is called with null
parameter it cancels
durable listener mode such that subsequent calls to create Rendezvous
listeners will not use durable JMS subscribers. This method can be also
used to change durable subscriber name prefix at any time.durableNamePrefix
- set durable listener mode if not empty,
cancel durable subscriber mode if this parameter is null
.java.lang.IllegalArgumentException
- if parameter is an empty string.TibrvException
- if listener creation failed for any reason.public java.lang.String getDurableListenerMode()
null
if durable listener mode is not set.public void recoverConnection() throws TibrvException
TibrvException
- if a new connection was not established.public java.lang.String getCurrentConnectedServer()
public void unsubscribe(java.lang.String durableNamePrefix, java.lang.String subject) throws TibrvException
durableNamePrefix
- durable name prefix specified at the time
Rendezvous listener was created.subject
- listener subject.TibrvException
- if listener with such name prefix and subject
was never created or if it is open (not destroyed).public void setInboxGarbageCollection(boolean val) throws TibrvException
val
- equals false to disable inbox garbage collection.TibrvException
- if any inboxes already exist when this method
is called.public void destroyInbox(java.lang.String inbox) throws TibrvException
inbox
- inbox to be destroyed.TibrvException
- if automatic garbage collection is enabled or
if the string is not an inbox.Copyright © Cloud Software Group, Inc. All rights reserved