public class MRvSession extends MSession
You can access an MRvSession
in two ways:
MEventSource
instances must be explicitly assigned to either an MRvSession
or MJmsSession
via the session name in the constructor.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
M_PROCESS_NAME |
static java.lang.String |
m_rvTicket |
m_app, m_defaultTimeout, m_deliveryMode, m_transactionLevel
m_registry
Constructor and Description |
---|
MRvSession(MApp app) |
MRvSession(MApp app,
java.lang.String name,
java.lang.String host,
int port)
Create a TIBCO Rendezvous Agent to connect to a network for communication
between components for example, between a publisher and a subscriber.
|
MRvSession(MApp app,
java.lang.String name,
java.lang.String cmName,
java.lang.String ledgerFile)
Create a TIBCO Rendezvous transport for certified message communication between components.
|
MRvSession(MApp app,
java.lang.String name,
java.lang.String service,
java.lang.String network,
java.lang.String daemon)
Create a TIBCO Rendezvous transport for communication between components
for example, between a publisher and a subscriber.
|
MRvSession(MApp app,
java.lang.String name,
java.lang.String cmqName,
java.lang.String service,
java.lang.String network,
java.lang.String daemon,
int schedulerWeight,
int schedulerHeartbeat,
int schedulerActivation,
int workerWeight,
int workerTasks)
Create a TIBCO Rendezvous transport for distributed queue.
|
MRvSession(MApp app,
java.lang.String name,
java.lang.String cmqName,
java.lang.String service,
java.lang.String network,
java.lang.String daemon,
int timeLimit,
int schedulerWeight,
int schedulerHeartbeat,
int schedulerActivation,
int workerWeight,
int workerTasks)
Deprecated.
as of TIBCO Adapter SDK 5.2.0.
|
MRvSession(MApp app,
java.lang.String name,
java.lang.String cmName,
java.lang.String service,
java.lang.String network,
java.lang.String daemon,
java.lang.String ledgerFile,
boolean requireOldMsgs,
int timeLimit,
java.lang.String relayAgent,
boolean syncLedger)
Create a TIBCO Rendezvous transport for certified message communication between components.
|
MRvSession(MApp app,
java.lang.String name,
java.lang.String cmName,
java.lang.String service,
java.lang.String network,
java.lang.String daemon,
java.lang.String ledgerFile,
boolean requireOldMsgs,
int timeLimit,
java.lang.String relayAgent,
boolean syncLedger,
long syncLedgerTime)
Create a TIBCO Rendezvous transport for certified message communication between components.
|
Modifier and Type | Method and Description |
---|---|
void |
activate()
Deprecated.
as of TIBCO Adapter SDK 5.0.0.
|
void |
deactivate()
Deprecated.
as of TIBCO Adapter SDK 5.0.0.
|
void |
destroy()
destroy session related resources
|
java.lang.String |
getDaemon()
Return the sessions rvd daemon.
|
MSessionImpl |
getEmbeddedSession() |
MException |
getException() |
java.lang.String |
getHost()
Return the session's rva host parameter; null if this is not an rva session.
|
java.lang.String |
getNetwork()
Return the sessions network.
|
int |
getPort()
Return the sessions rva port parameter.
|
int |
getProtocol()
Deprecated.
as of TIBCO Adapter SDK 5.0.0.
|
static java.lang.String |
getRvTix() |
java.lang.String |
getService()
Return the session's rvd service parameter.
|
java.lang.String |
getSessionName()
Return the session's name.
|
com.tibco.tibrv.TibrvQueue |
getTibrvQueue()
Return the TIBCO Rendezvous event queue that this
MRvSession encapsulates. |
com.tibco.tibrv.TibrvTransport |
getTibrvTransport()
Return the TIBCO Rendezvous session, regardless of protocol.
|
double |
getTimeout() |
boolean |
nextEvent()
Call the next event for this
MSession instance. |
boolean |
nextEvent(long timeLimit)
Call the next event for this
MRvSession instance. |
void |
removeAdvisory(java.lang.String subject) |
void |
setCompleteTime(long time) |
void |
setTaskBacklogLimitInBytes(int byteLimit)
Set the scheduler stored task limit for the RVCMQ session.
|
void |
setTaskBacklogLimitInMessages(int msgLimit)
Set the scheduler stored task limit for the RVCMQ session.
|
void |
setupAdvisory() |
void |
setupNewAdvisory(java.lang.String subject) |
getApp, getDeliveryMode
getComponentRegistry, getName, getStatus, isActivated, remove
public static java.lang.String m_rvTicket
public static final java.lang.String M_PROCESS_NAME
public MRvSession(MApp app, java.lang.String name, java.lang.String host, int port)
For most Java applets running a secure browser environment, this is the only way to connect to a network for communication between components.
app
- The MApp
with which this instance session is associated.name
- The name of the session to create (to be used in the component registry as a unique key).host
- Host for this session. The null literal indicates the default hostport
- Port for this session.public MRvSession(MApp app, java.lang.String name, java.lang.String service, java.lang.String network, java.lang.String daemon)
app
- The MApp
with which this instance session is associated.name
- The name of the session to create (to be used in the component registry as a unique key).service
- Service for this session. The null string indicates the default service.network
- Network parameter for this session. The null string indicates the default network.daemon
- The local rvd daemon for this session. The null string indicates the default daemon.public MRvSession(MApp app, java.lang.String name, java.lang.String cmName, java.lang.String service, java.lang.String network, java.lang.String daemon, java.lang.String ledgerFile, boolean requireOldMsgs, int timeLimit, java.lang.String relayAgent, boolean syncLedger, long syncLedgerTime)
app
- The MApp
with which this session instance is associated.name
- The name of the session to create (to be used in the component registry as a unique key).cmName
- The certified message name to use.service
- Service for this session. The null literal indicates the default service.
The default service is TIBCO Rendezvous 7500.network
- Network for this session. The null literal indicates the default network.daemon
- The local rvd daemon for this session. The null string indicates the default TIBCO Rendezvous daemon.ledgerFile
- The ledger file name. Use the empty string "" to indicate an in-memory ledger file.requireOldMsgs
- Set this to true
if this session expects senders to resend
unconfirmed messages. The default value is false
.timeLimit
- An amount of time (in milliseconds) before an unconfirmed certified
message will be discarded from the ledger file. The default value of 0 indicates never discard.relayAgent
- Unused by default. This designates the rvrad process of the
same name as the relay agent for this session.syncLedger
- The default value is set to true so that all ledger file updates
are written immediately. If set to false, ledger files are written asynchronously.
This is typically changed from the default only under special cirumstances.syncLedgerTime
- The time interval in micro-second to write the ledger file update.
The default value is set to 0. Just be useful when set the paramter "syncLedger" to false.MRvSession(MApp, String, String, String)
public MRvSession(MApp app, java.lang.String name, java.lang.String cmName, java.lang.String service, java.lang.String network, java.lang.String daemon, java.lang.String ledgerFile, boolean requireOldMsgs, int timeLimit, java.lang.String relayAgent, boolean syncLedger)
public MRvSession(MApp app, java.lang.String name, java.lang.String cmName, java.lang.String ledgerFile)
public MRvSession(MApp app, java.lang.String name, java.lang.String cmqName, java.lang.String service, java.lang.String network, java.lang.String daemon, int timeLimit, int schedulerWeight, int schedulerHeartbeat, int schedulerActivation, int workerWeight, int workerTasks)
app
- The MApp
with which this instance session is associated.name
- The name of the session to create (to be used in the component registry as a unique key).cmqName
- Name of this distribution queue.service
- Service for this session. The null literal indicates the default service.network
- Network for this session. The null literal indicates the default network.daemon
- The local rvd daemon for this session. The null string indicates the default daemon.timeLimit
- An amount of time (in milliseconds) before an unconfirmed certified.schedulerWeight
- Represents the ability of this distributed queue member to become
the scheduler. Distributed queue members elect a scheduler among themselves with the
highest scheduler weight becoming the scheduler.schedulerHeartbeat
- The scheduler sends heartbeats in this interval (in milliseconds).
It must be positive, and all members of this distributed queue must have the same value.schedulerActivation
- When a scheduler has been silent for this interval (sent
no heartbeat), the member with the greatest scheduler weight takes its place as the new scheduler.workerWeight
- When a CMQ scheduler receives a task, worker weight can be used
to affect which member of a distributed queue is assigned that task. A greater
worker weight indicates a preference for receiving tasks.workerTasks
- The maximum number of tasks a worker can accept before being
considered busy. Typically set to 1, and must be greater than zero.public MRvSession(MApp app, java.lang.String name, java.lang.String cmqName, java.lang.String service, java.lang.String network, java.lang.String daemon, int schedulerWeight, int schedulerHeartbeat, int schedulerActivation, int workerWeight, int workerTasks)
app
- The MApp
with which this instance session is associated.name
- The name of the session to create (to be used in the component registry as a unique key).cmqName
- Name of this distribution queue.service
- Service for this session. The null literal indicates the default service.network
- Network for this session. The null literal indicates the default network.daemon
- The local rvd daemon for this session. The null string indicates the default daemon.schedulerWeight
- Represents the ability of this distributed queue member to become
the scheduler. Distributed queue members elect a scheduler among themselves with the
highest scheduler weight becoming the scheduler.schedulerHeartbeat
- The scheduler sends heartbeats in this interval (in milliseconds).
It must be positive, and all members of this distributed queue must have the same value.schedulerActivation
- When a scheduler has been silent for this interval (sent
no heartbeat), the member with the greatest scheduler weight takes its place as the new scheduler.workerWeight
- When a CMQ scheduler receives a task, worker weight can be used
to affect which member of a distributed queue is assigned that task. A greater
worker weight indicates a preference for receiving tasks.workerTasks
- The maximum number of tasks a worker can accept before being
considered busy. Typically set to 1, and must be greater than zero.public MRvSession(MApp app)
public boolean nextEvent() throws MException
MSession
MSession
instance.
This contrasts with MApp.nextEvent(long)
,
which calls the next event for this application instance.
This method waits for an event indefinitely.
nextEvent
in class MSession
MException
MApp.nextEvent(long)
public boolean nextEvent(long timeLimit) throws MException
MRvSession
instance.
This contrasts with MApp.nextEvent()
,
which calls the next event for this application instance.nextEvent
in class MSession
timeLimit
- Time limit in milliseconds.
If the next event cannot be executed within the time specified by this parameter, the method returns.
If, for example, you set the time limit to 10 milliseconds and no event occurs in 10 milliseconds (or has occurred in the past and has not yet been reported), then this method terminates and no exception is thrown.
MException
MApp.nextEvent(long)
public java.lang.String getNetwork()
getNetwork
in class MSession
public java.lang.String getSessionName()
getSessionName
in class MSession
public java.lang.String getService()
getService
in class MSession
public java.lang.String getDaemon()
public java.lang.String getHost()
public int getPort()
public void activate() throws MException
MBaseComponent
activate
in interface MComponent
activate
in class MBaseComponent
MException
- Subclass of MBaseComponent overriding this method can throw exception
if necessarypublic void deactivate() throws MException
MBaseComponent
deactivate
in interface MComponent
deactivate
in class MBaseComponent
MException
- Subclass of MBaseComponent overriding this method can throw exception
if necessarypublic int getProtocol()
getProtocol
in class MSession
MSession.getDeliveryMode()
public com.tibco.tibrv.TibrvTransport getTibrvTransport()
getTibrvTransport
in class MSession
public com.tibco.tibrv.TibrvQueue getTibrvQueue()
MRvSession
encapsulates.getTibrvQueue
in class MSession
public double getTimeout()
public MSessionImpl getEmbeddedSession()
public static java.lang.String getRvTix()
public void setCompleteTime(long time) throws MException
MException
public void setupAdvisory()
public void setupNewAdvisory(java.lang.String subject)
public void removeAdvisory(java.lang.String subject) throws MException
MException
public MException getException()
public void destroy()
public void setTaskBacklogLimitInBytes(int byteLimit) throws MException
MException
- When the session is not a RVCMQ session or the method is invoked too late.public void setTaskBacklogLimitInMessages(int msgLimit) throws MException
MException
- When the session is not a RVCMQ session or the method is invoked too late.