LibreOffice Module connectivity (master) 1
Public Member Functions | Private Member Functions | Private Attributes | List of all members
connectivity::jdbc::ContextClassLoaderScope Class Reference

#include <ContextClassLoader.hxx>

Collaboration diagram for connectivity::jdbc::ContextClassLoaderScope:
[legend]

Public Member Functions

 ContextClassLoaderScope (JNIEnv &environment, const GlobalRef< jobject > &newClassLoader, const ::comphelper::EventLogger &_rLoggerForErrors, const css::uno::Reference< css::uno::XInterface > &_rxErrorContext)
 creates the instance. More...
 
 ~ContextClassLoaderScope ()
 
bool isActive () const
 

Private Member Functions

 ContextClassLoaderScope (ContextClassLoaderScope const &)=delete
 
ContextClassLoaderScopeoperator= (ContextClassLoaderScope const &)=delete
 

Private Attributes

JNIEnv & m_environment
 
LocalRef< jobject > m_currentThread
 
LocalRef< jobject > m_oldContextClassLoader
 
jmethodID m_setContextClassLoaderMethod
 

Detailed Description

Definition at line 32 of file ContextClassLoader.hxx.

Constructor & Destructor Documentation

◆ ContextClassLoaderScope() [1/2]

connectivity::jdbc::ContextClassLoaderScope::ContextClassLoaderScope ( JNIEnv &  environment,
const GlobalRef< jobject > &  newClassLoader,
const ::comphelper::EventLogger _rLoggerForErrors,
const css::uno::Reference< css::uno::XInterface > &  _rxErrorContext 
)

creates the instance.

If isActive returns <FALSE> afterwards, then an exception happened in the JVM, which should be raised as UNO exception by the caller

Parameters
environmentthe current JNI environment
newClassLoaderthe new class loader to set at the current thread
_rLoggerForErrorsthe logger which should be passed to java_lang_object::ThrowLoggedSQLException in case an error occurs
_rxErrorContextthe context which should be passed to java_lang_object::ThrowLoggedSQLException in case an error occurs

◆ ~ContextClassLoaderScope()

connectivity::jdbc::ContextClassLoaderScope::~ContextClassLoaderScope ( )

◆ ContextClassLoaderScope() [2/2]

connectivity::jdbc::ContextClassLoaderScope::ContextClassLoaderScope ( ContextClassLoaderScope const &  )
privatedelete

Member Function Documentation

◆ isActive()

bool connectivity::jdbc::ContextClassLoaderScope::isActive ( ) const
inline

◆ operator=()

ContextClassLoaderScope & connectivity::jdbc::ContextClassLoaderScope::operator= ( ContextClassLoaderScope const &  )
privatedelete

Member Data Documentation

◆ m_currentThread

LocalRef< jobject > connectivity::jdbc::ContextClassLoaderScope::m_currentThread
private

Definition at line 70 of file ContextClassLoader.hxx.

Referenced by isActive(), and ~ContextClassLoaderScope().

◆ m_environment

JNIEnv& connectivity::jdbc::ContextClassLoaderScope::m_environment
private

Definition at line 69 of file ContextClassLoader.hxx.

Referenced by ~ContextClassLoaderScope().

◆ m_oldContextClassLoader

LocalRef< jobject > connectivity::jdbc::ContextClassLoaderScope::m_oldContextClassLoader
private

Definition at line 71 of file ContextClassLoader.hxx.

Referenced by ~ContextClassLoaderScope().

◆ m_setContextClassLoaderMethod

jmethodID connectivity::jdbc::ContextClassLoaderScope::m_setContextClassLoaderMethod
private

Definition at line 72 of file ContextClassLoader.hxx.

Referenced by isActive(), and ~ContextClassLoaderScope().


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