3
* ====================================================================
4
* Licensed to the Apache Software Foundation (ASF) under one
5
* or more contributor license agreements. See the NOTICE file
6
* distributed with this work for additional information
7
* regarding copyright ownership. The ASF licenses this file
8
* to you under the Apache License, Version 2.0 (the
9
* "License"); you may not use this file except in compliance
10
* with the License. You may obtain a copy of the License at
12
* http://www.apache.org/licenses/LICENSE-2.0
14
* Unless required by applicable law or agreed to in writing,
15
* software distributed under the License is distributed on an
16
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17
* KIND, either express or implied. See the License for the
18
* specific language governing permissions and limitations
20
* ====================================================================
23
* @file JNIThreadData.h
24
* @brief Interface of the class JNIThreadData
27
#ifndef JNITHREADDATA_H
28
#define JNITHREADDATA_H
33
struct apr_threadkey_t;
36
* This class implements thread local storage for JNIUtil.
41
static void del(void *);
42
static JNIThreadData *getThreadData();
43
static bool initThreadData();
44
static void pushNewThreadData();
45
static void popThreadData();
50
* The current JNI environment.
55
* Flag that a Java execption has been detected.
57
bool m_exceptionThrown;
60
* A buffer used for formating messages.
62
char m_formatBuffer[JNIUtil::formatBufferSize];
66
* Pointer to previous thread information to enable reentrent
69
JNIThreadData *m_previous;
72
* The key to address this thread local storage.
74
static apr_threadkey_t *g_key;
77
#endif // JNITHREADDATA_H