Qorus Integration Engine®  4.1.4.p4_git
com.qoretechnologies.qorus.DbRemote Class Reference
Inheritance diagram for com.qoretechnologies.qorus.DbRemote:
org::qore::jni::QoreObjectWrapper

Public Member Methods

 DbRemote (QoreObject obj)
 
 DbRemote (String remote, String dsname, HashMap< String, Object > opts) throws Throwable
 
 DbRemote (String remote, String dsname) throws Throwable
 
 DbRemote (QorusSystemRestHelper remote, String dsname, HashMap< String, Object > opts) throws Throwable
 
 DbRemote (QorusSystemRestHelper remote, String dsname) throws Throwable
 
void beginTransaction () throws Throwable
 
String datasourceName () throws Throwable
 
StreamConfig config () throws Throwable
 
void commit () throws Throwable
 
void rollback (boolean disconnect) throws Throwable
 
void rollback () throws Throwable
 
void disconnect () throws Throwable
 
Object callRemoteMethod (String method, Object... args) throws Throwable
 

Detailed Description

Java wrapper for the OMQ::DbRemote class in Qorus

Constructor & Destructor Documentation

◆ DbRemote() [1/5]

com.qoretechnologies.qorus.DbRemote.DbRemote ( QoreObject  obj)
inline

Creates the object as a wrapper for the Qore object

◆ DbRemote() [2/5]

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() [3/5]

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() [4/5]

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() [5/5]

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

◆ callRemoteMethod()

Object com.qoretechnologies.qorus.DbRemote.callRemoteMethod ( String  method,
Object...  args 
) throws Throwable
inline

Calls a remote method and returns the result

◆ commit()

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

Commits a remote transaction

◆ config()

StreamConfig com.qoretechnologies.qorus.DbRemote.config ( ) throws Throwable
inline

Returns the configuration object

◆ datasourceName()

String com.qoretechnologies.qorus.DbRemote.datasourceName ( ) throws Throwable
inline

Returns the remote datasource name specified in constructor

◆ disconnect()

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

Disconnects the connection

◆ 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: