Qorus Integration Engine®  4.0.3.p2_git
com.qoretechnologies.qorus.DbRemote Class Reference

Java wrapper for the OMQ::DbRemote class in Qorus. More...

Inheritance diagram for com.qoretechnologies.qorus.DbRemote:
org::qore::jni::QoreObjectWrapper

Public Member Methods

 DbRemote (QoreObject obj)
 creates the object as a wrapper for the Qore object
 
 DbRemote (String remote, String dsname, HashMap< String, Object > opts) throws Throwable
 constructor taking a string giving the name of the remote connection for the remote server More...
 
 DbRemote (String remote, String dsname) throws Throwable
 constructor taking a string giving the name of the remote connection for the remote server More...
 
 DbRemote (QorusSystemRestHelper remote, String dsname, HashMap< String, Object > opts) throws Throwable
 constructor taking a com.qoretechnologies.qorus.QorusSystemRestHelper object for the remote server More...
 
 DbRemote (QorusSystemRestHelper remote, String dsname) throws Throwable
 constructor taking a com.qoretechnologies.qorus.QorusSystemRestHelper object for the remote server More...
 
void beginTransaction () throws Throwable
 starts or continues a remote transaction More...
 
String datasourceName () throws Throwable
 returns the remote datasource name specified in constructor
 
StreamConfig config () throws Throwable
 returns the configuration object
 
void commit () throws Throwable
 commits a remote transaction
 
void rollback (boolean disconnect) throws Throwable
 Rollback remote transaction. More...
 
void rollback () throws Throwable
 Rollback remote transaction and disconnect the connection. More...
 
void disconnect () throws Throwable
 Disconnects the connection.
 
Object callRemoteMethod (String method, Object... args) throws Throwable
 Calls a remote method and returns the result.
 

Detailed Description

Java wrapper for the OMQ::DbRemote class in Qorus.

Constructor & Destructor Documentation

◆ DbRemote() [1/4]

com.qoretechnologies.qorus.DbRemote.DbRemote ( String  remote,
String  dsname,
HashMap< String, Object opts 
) throws Throwable
inline

constructor taking a string giving the name of the remote connection for the remote server

Parameters
remotea string giving the name of the remote connection for the remote server
dsnamea string with name of the remote datasource to use
optsoptional Streaming API Constructor Options as follows:
  • "timeout": an HTTP socket timeout value in milliseconds; used locally and in the remote for socket I/O and queue operations; default value: 5m
  • "loglevel": a default log level option for logging; see Log Levels for valid value
  • "no_remote_timeout": if True the "timeout" option will not be sent to the remote
Note
the explicit or default timeout value here overrides any socket I/O timeout set for the remote connection object

◆ DbRemote() [2/4]

com.qoretechnologies.qorus.DbRemote.DbRemote ( String  remote,
String  dsname 
) throws Throwable
inline

constructor taking a string giving the name of the remote connection for the remote server

Parameters
remotea string giving the name of the remote connection for the remote server
dsnamea string with name of the remote datasource to use
Note
the explicit or default timeout value here overrides any socket I/O timeout set for the remote connection object

◆ DbRemote() [3/4]

com.qoretechnologies.qorus.DbRemote.DbRemote ( QorusSystemRestHelper  remote,
String  dsname,
HashMap< String, Object opts 
) throws Throwable
inline

constructor taking a com.qoretechnologies.qorus.QorusSystemRestHelper object for the remote server

Parameters
remotea com.qoretechnologies.qorus.QorusSystemRestHelper object for the remote server
dsnamea string with name of the remote datasource to use
optsoptional Streaming API Constructor Options as follows:
  • "timeout": an HTTP socket timeout value in milliseconds; used locally and in the remote for socket I/O and queue operations; default value: 5m
  • "loglevel": a default log level option for logging; see Log Levels for valid value
  • "no_remote_timeout": if True the "timeout" option will not be sent to the remote
Note
the explicit or default timeout value here overrides any socket I/O timeout set for the remote connection object

◆ DbRemote() [4/4]

com.qoretechnologies.qorus.DbRemote.DbRemote ( QorusSystemRestHelper  remote,
String  dsname 
) throws Throwable
inline

constructor taking a com.qoretechnologies.qorus.QorusSystemRestHelper object for the remote server

Parameters
remotea com.qoretechnologies.qorus.QorusSystemRestHelper object for the remote server
dsnamea string with name of the remote datasource to use
Note
the explicit or default timeout value here overrides any socket I/O timeout set for the remote connection object

Member Function Documentation

◆ beginTransaction()

void com.qoretechnologies.qorus.DbRemote.beginTransaction ( ) throws Throwable
inline

starts or continues a remote transaction

This method is called from the constructor() automatically

◆ rollback() [1/2]

void com.qoretechnologies.qorus.DbRemote.rollback ( boolean  disconnect) throws Throwable
inline

Rollback remote transaction.

Note
it's normally better to disconnect the connection if an error occurs rather than call rollback() when streaming because if a chunked transfer is interrupted, then HTTP calls will fail anyway, and the remote end will rollback the transaction in any case unless an explicit commit is executed
Parameters
disconnecta boolean value to keep connection open or close the connection. Connection closing is the default
See also
disconnect()

◆ rollback() [2/2]

void com.qoretechnologies.qorus.DbRemote.rollback ( ) throws Throwable
inline

Rollback remote transaction and disconnect the connection.

Note
it's normally better to disconnect the connection if an error occurs rather than call rollback() when streaming because if a chunked transfer is interrupted, then HTTP calls will fail anyway, and the remote end will rollback the transaction in any case unless an explicit commit is executed
See also
disconnect()

The documentation for this class was generated from the following file: