|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.reuters.rc.db.adb.AdbRequest
This class represents a request sent to ADB. Each instance of this class is immutable - instances can be freely shared among threads.
This class depends on DbManager
to pick up transport/queue/timeout defaults. An easy way for the application to provide
consistent transport/queue/timeout parameters across modules is to configure the DbManager once.
DbManager
Constructor Summary | |
AdbRequest(DbRequestStmt stmt)
Constructor. |
|
AdbRequest(DbRequestStmt[] stmts)
Constructor. |
|
AdbRequest(DbRequestStmt[] stmts,
double timeout)
Constructor. |
|
AdbRequest(DbRequestStmt[] stmts,
double timeout,
java.lang.Object closure)
Constructor. |
|
AdbRequest(DbRequestStmt stmt,
double timeout)
Constructor. |
|
AdbRequest(DbRequestStmt stmt,
double timeout,
java.lang.Object closure)
Constructor. |
Method Summary | |
java.lang.Object |
getClosure()
Get the closure argument. |
DbRequestStmt[] |
getRequest()
Get the statement(s) associated with this request. |
double |
getTimeout()
Get the maximum time interval for which to wait for reply. |
void |
send(java.lang.String sendSubject)
Send the request to ADB without waiting for a reply. |
void |
send(java.lang.String sendSubject,
java.lang.String replySubject)
Send the request to ADB using the default transport. |
void |
send(com.tibco.tibrv.TibrvTransport rvTrans,
java.lang.String sendSubject)
Send the request to ADB without waiting for a reply. |
void |
send(com.tibco.tibrv.TibrvTransport rvTrans,
java.lang.String sendSubject,
java.lang.String replySubject)
Send the request to ADB without waiting for a reply. |
DbReply |
sendRequest(java.lang.String sendSubject)
Send the request to ADB and return the reply. |
void |
sendRequest(java.lang.String sendSubject,
DbRequestCallback adbCb,
java.lang.String replySubject)
Async. |
DbReply |
sendRequest(com.tibco.tibrv.TibrvTransport rvTrans,
java.lang.String sendSubject)
Send the request to ADB and return the reply. |
void |
sendRequest(com.tibco.tibrv.TibrvTransport rvTrans,
java.lang.String sendSubject,
com.tibco.tibrv.TibrvQueue rvQueue,
DbRequestCallback adbCb,
java.lang.String replySubject)
Async. |
void |
setReplySize(int replySize)
This method is a NO-OP and exists to satisfy interface requirements. |
void |
setTimeout(double timeout)
Set the maximum time interval for which to wait for reply. |
java.lang.String |
toPrettyPrintString()
Pretty Print the request message. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public AdbRequest(DbRequestStmt stmt)
stmt
- Request statement.public AdbRequest(DbRequestStmt stmt, double timeout)
stmt
- Request statement.timeout
- Maximum time interval - in seconds - for which to
wait for reply in request/reply mode.public AdbRequest(DbRequestStmt stmt, double timeout, java.lang.Object closure)
stmt
- Request statement.timeout
- Maximum time interval - in seconds - for which to wait for
reply in request/reply mode.closure
- Closure argument. In asynchronous request/reply mode, the closure
is returned with the response to the application callback.throws AdbException
,
DbRequestCallback
public AdbRequest(DbRequestStmt[] stmts)
stmts
- Request statements.public AdbRequest(DbRequestStmt[] stmts, double timeout)
stmts
- Request statements.timeout
- Maximum time interval - in seconds - for which to
wait for reply in request/reply mode.public AdbRequest(DbRequestStmt[] stmts, double timeout, java.lang.Object closure)
stmts
- Request statements.timeout
- Maximum time interval - in seconds - for which to
wait for reply in request/reply mode.closure
- Closure argument. In asynchronous request/reply mode, the closure
is returned with the response to the application callback.throws AdbException
,
DbRequestCallback
Method Detail |
public void setReplySize(int replySize)
setReplySize
in interface DbRequest
com.reuters.rc.db.DbRequest
size
- the return batch sizepublic final java.lang.Object getClosure()
getClosure
in interface DbRequest
public final double getTimeout()
getTimeout
in interface DbRequest
public final void setTimeout(double timeout)
setTimeout
in interface DbRequest
timeout
- Maximum time interval - in seconds - for which to
wait for reply.public final DbRequestStmt[] getRequest()
getRequest
in interface DbRequest
public final DbReply sendRequest(com.tibco.tibrv.TibrvTransport rvTrans, java.lang.String sendSubject) throws AdbBusinessException, AdbSystemException
sendRequest
in interface DbRequest
rvTrans
- Transport used to send the request.sendSubject
- Send subject.setTimeout(double)
public final DbReply sendRequest(java.lang.String sendSubject) throws AdbBusinessException, AdbSystemException
sendRequest
in interface DbRequest
sendSubject
- Send subject.#setDefault(TibrvTransport)
,
setTimeout(double)
public final void send(com.tibco.tibrv.TibrvTransport rvTrans, java.lang.String sendSubject) throws AdbBusinessException, AdbSystemException
send
in interface DbRequest
rvTrans
- Transport used to send the request.sendSubject
- Send subject.public final void send(java.lang.String sendSubject) throws AdbBusinessException, AdbSystemException
send
in interface DbRequest
sendSubject
- Send subject.#setDefault(TibrvTransport)
,
#setDefault(TibrvTransport, TibrvQueue)
,
send(TibrvTransport, String)
public final void send(com.tibco.tibrv.TibrvTransport rvTrans, java.lang.String sendSubject, java.lang.String replySubject) throws AdbBusinessException, AdbSystemException
send
in interface DbRequest
rvTrans
- Transport.sendSubject
- Send subject.replySubject
- Reply subject.send(String, String)
public final void send(java.lang.String sendSubject, java.lang.String replySubject) throws AdbBusinessException, AdbSystemException
send
in interface DbRequest
sendSubject
- Send subject.replySubject
- Reply subject.#setDefault(TibrvTransport)
,
#setDefault(TibrvTransport, TibrvQueue)
,
send(TibrvTransport, String, String)
public final void sendRequest(com.tibco.tibrv.TibrvTransport rvTrans, java.lang.String sendSubject, com.tibco.tibrv.TibrvQueue rvQueue, DbRequestCallback adbCb, java.lang.String replySubject) throws AdbBusinessException, AdbSystemException
sendRequest
in interface DbRequest
rvTrans
- Transport used to send the request.sendSubject
- Send subject.rvQueue
- Queue on which the reply is received. Caller must dispatch
from this queue.adbCb
- Callback function.replySubject
- Listen for reply from ADB on this subject.DbRequestCallback
public final void sendRequest(java.lang.String sendSubject, DbRequestCallback adbCb, java.lang.String replySubject) throws AdbBusinessException, AdbSystemException
sendRequest
in interface DbRequest
sendSubject
- Send subject.adbCb
- Callback function.replySubject
- Listen for reply from ADB on this subject.DbRequestCallback
public final java.lang.String toPrettyPrintString()
toPrettyPrintString
in interface DbRequest
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |