Overview | Package | Class | Tree | Deprecated | Index | Help
| TIBCO Enterprise Message Service
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.tibco.tibrv
Class TibrvJMSTransport

    java.lang.Object
      com.tibco.tibrv.TibrvNetTransport
          com.tibco.tibrv.TibrvJMSTransport

    public class TibrvJMSTransport

extends com.tibco.tibrv.TibrvNetTransport

Network transport using TIBCO Enterprise Message Service JMS 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, use `Tibrv.setErrorCallback()` method.

Constructor Summary
`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 SSL 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.

Method Summary
`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 [Beta feature].
`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 [Beta feature].
`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.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### TibrvJMSTransport

    public TibrvJMSTransport()
                      throws TibrvException

  Creates JMS transport connecting to the TIBCO Enterprise Message Service server running on the local computer with default port.

  Throws:
    `TibrvException`

### TibrvJMSTransport

    public TibrvJMSTransport(java.lang.String serverURL)
                      throws TibrvException

  Creates JMS transport connecting to the TIBCO Enterprise Message Service server specified by serverURL parameter.

  Throws:
    `TibrvException`

### TibrvJMSTransport

    public TibrvJMSTransport(java.lang.String serverURL,
                             java.lang.String clientId,
                             java.lang.String userName,
                             java.lang.String password)
                      throws TibrvException

  Creates JMS transport connecting as specified user to the TIBCO Enterprise Message Service server.

  Throws:
    `TibrvException`

### TibrvJMSTransport

    public TibrvJMSTransport(java.lang.String serverURL,
                             java.lang.String clientId,
                             java.lang.String userName,
                             java.lang.String password,
                             java.util.Hashtable sslParameters)
                      throws TibrvException

  Creates JMS transport connecting via SSL to the TIBCO Enterprise Message Service server. SSL parameters which can be set in the sslParameters Hashtable are documented in com.tibco.tibjms.TibjmsSSL class.

  Throws:
    `TibrvException`

### TibrvJMSTransport

    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

  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. The server is picked in round robin fashion. The reconnect will start with last connected server.

  Throws:
    `TibrvException`

Method Detail

### destroy

    public void destroy()

  Destroys this transport and all associated listeners.

### toString

    public java.lang.String toString()

  Returns string representation of this transport

### setPersistentDelivery

    public void setPersistentDelivery(boolean persistent)

  Set persistent delivery mode for this transport.

### isPersistentDelivery

    public boolean isPersistentDelivery()

  Returns true if persistent delivery mode is set for this transport.

### setDurableListenerMode

    public void setDurableListenerMode(java.lang.String durableNamePrefix)
                                throws TibrvException

  Set or cancel durable listener mode [Beta feature]. If parameter `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.

  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.
    `TibrvException` - if listener creation failed for any reason.

### getDurableListenerMode

    public java.lang.String getDurableListenerMode()

  Returns currently configured durable listener name prefix [Beta feature]. Returns `null` if durable listener mode is not set.

### recoverConnection

    public void recoverConnection()
                           throws TibrvException

  This 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:
    `TibrvException` - if a new connection was not established.

### getCurrentConnectedServer

    public java.lang.String getCurrentConnectedServer()

  Get the url of currently connected server.

  Returns:
    server url

### unsubscribe

    public void unsubscribe(java.lang.String durableNamePrefix,
                            java.lang.String subject)
                     throws TibrvException

  Unsubscribe durable JMS 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:
    `TibrvException` - if listener with such name prefix and subject was never created or if it is open (not destroyed).

### setInboxGarbageCollection

    public void setInboxGarbageCollection(boolean val)
                                   throws TibrvException

  Enable 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:
    `TibrvException` - if any inboxes already exist when this method is called.

### destroyInbox

    public void destroyInbox(java.lang.String inbox)
                      throws TibrvException

  Explicitly destroy an inbox when automatic inbox garbage collection is disabled.

  Parameters:
    `inbox` - inbox to be destroyed.
  Throws:
    `TibrvException` - if automatic garbage collection is enabled or if the string is not an inbox.

Overview | Package | Class | Tree | Deprecated | Index | Help
| TIBCO Enterprise Message Service
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © TIBCO Software Inc. All rights reserved