public class CertifiedRendezvousClient extends RendezvousClientImp
Implementation of RendezvousClient
which provides certified message delivery. Persistent messaging requires a ledger
file name and request old to be set to true.
In the adapter configuration file this class is aliased as certified-rendezvous-client which is the preferred alternative to the fully qualified classname when building your configuration.
log, queue, transport
Constructor and Description |
---|
CertifiedRendezvousClient()
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Close this instance.
|
void |
createConfirmationListener(com.tibco.tibrv.TibrvMsgCallback callback)
Creates a
TibrvListener for confirmation messages, which
may be useful for debugging / troubleshooting. |
void |
createMessageListener(com.tibco.tibrv.TibrvMsgCallback callback,
java.lang.String sendSubject)
Creates a
TibrvListener using the passed callback
and sendSubject . |
java.lang.String |
getConfirmationSubject()
Returns the optional confirmation subject.
|
long |
getDeliveryTimeLimit()
Return the delivery time limit in seconds.
|
java.lang.String |
getLedgerFileName()
Returns the name of the file to use as a ledger file.
|
boolean |
getRequestOld()
If request old is true, when consumers which use this client start up
they will request messages which were delivered while they were not
running.
|
java.lang.String |
getUniqueName()
Returns the name of the underlying certified transport, which must be
unique in the context of all certified transports in the system.
|
void |
init()
Initialise this instance.
|
void |
send(com.tibco.tibrv.TibrvMsg tibrvMsg)
Sends the passed
TibrvMsg . |
void |
setConfirmationSubject(java.lang.String s)
Sets the optional confirmation subject.
|
void |
setDeliveryTimeLimit(long l)
Sets the delivery time limit in seconds.
|
void |
setLedgerFileName(java.lang.String s)
Sets the name of the file to use as a ledger file.
|
void |
setRequestOld(boolean b)
If request old is true, when consumers which use this client start up
they will request messages which were delivered while they were not
running.
|
void |
setUniqueName(java.lang.String s)
Sets the name of the underlying certified transport, which must be
unique in the context of all certified transports in the system.
|
java.lang.String |
toString() |
getDaemon, getNetwork, getQueueName, getService, setDaemon, setNetwork, setQueueName, setService, start, stop
public CertifiedRendezvousClient()
Creates a new instance. Default delivery time limit is 0 (no limit).
public void createMessageListener(com.tibco.tibrv.TibrvMsgCallback callback, java.lang.String sendSubject) throws com.tibco.tibrv.TibrvException
RendezvousClient
Creates a TibrvListener
using the passed callback
and sendSubject
. Not part of init
as only
required by client code which consumes messages.
callback
- the TibrvMsgCallback
(some sort of
consumer)sendSubject
- the send subject, conforming to TibcoRendezvous rulescom.tibco.tibrv.TibrvException
- if any occur(com.tibco.tibrv.TibrvMsgCallback, java.lang.String)
public void createConfirmationListener(com.tibco.tibrv.TibrvMsgCallback callback) throws com.tibco.tibrv.TibrvException
RendezvousClient
Creates a TibrvListener
for confirmation messages, which
may be useful for debugging / troubleshooting.
callback
- the TibrvMsgCallback
to usecom.tibco.tibrv.TibrvException
- if any occur#createConfirmationListener(com.tibco.tibrv.TibrvMsgCallback)
public void send(com.tibco.tibrv.TibrvMsg tibrvMsg) throws com.tibco.tibrv.TibrvException
RendezvousClient
Sends the passed TibrvMsg
.
send
in interface RendezvousClient
send
in class RendezvousClientImp
tibrvMsg
- the message to sendcom.tibco.tibrv.TibrvException
- if any occur#send(com.tibco.tibrv.TibrvMsg)
public void init() throws com.tibco.tibrv.TibrvException
RendezvousClient
Initialise this instance.
init
in interface RendezvousClient
init
in class RendezvousClientImp
com.tibco.tibrv.TibrvException
- if any occurRendezvousClientImp.init()
public void close()
RendezvousClient
Close this instance.
close
in interface RendezvousClient
close
in class RendezvousClientImp
StandardRendezvousClient.close()
public java.lang.String toString()
toString
in class RendezvousClientImp
RendezvousClientImp.toString()
public java.lang.String getUniqueName()
Returns the name of the underlying certified transport, which must be unique in the context of all certified transports in the system.
public void setUniqueName(java.lang.String s)
Sets the name of the underlying certified transport, which must be unique in the context of all certified transports in the system.
s
- the name of the underlying certified transportpublic boolean getRequestOld()
If request old is true, when consumers which use this client start up they will request messages which were delivered while they were not running. This is analgous to durable subscriptions in JMS.
public void setRequestOld(boolean b)
If request old is true, when consumers which use this client start up they will request messages which were delivered while they were not running. This is analgous to durable subscriptions in JMS.
b
- whether to request old messages or notpublic java.lang.String getConfirmationSubject()
Returns the optional confirmation subject. This can be used to obtain and log confirmation messages which may be useful for debugging or troubleshooting.
public void setConfirmationSubject(java.lang.String s)
Sets the optional confirmation subject. This can be used to obtain and log confirmation messages which may be useful for debugging or troubleshooting.
s
- the optional confirmation subjectpublic long getDeliveryTimeLimit()
Return the delivery time limit in seconds. After the delivery time limit the message will not be delivered. This is analgous to time to live in JMS.
public void setDeliveryTimeLimit(long l)
Sets the delivery time limit in seconds. After the delivery time limit the message will not be delivered. This is analgous to time to live in JMS.
l
- delivery time limit in secondspublic java.lang.String getLedgerFileName()
Returns the name of the file to use as a ledger file. If no file name is specified a transient process ledger will be used.
public void setLedgerFileName(java.lang.String s)
Sets the name of the file to use as a ledger file. If no file name is specified a transient process ledger will be used.
s
- the name of the file to use as a ledger file