Classes | |
| struct | axutil_env |
| Axis2 Environment struct. More... | |
Defines | |
| #define | AXIS_ENV_FREE_LOG 0x1 |
| #define | AXIS_ENV_FREE_ERROR 0x2 |
| #define | AXIS_ENV_FREE_THREADPOOL 0x4 |
| #define | AXIS2_ENV_CHECK(env, error_return) |
Typedefs | |
| typedef struct axutil_env | axutil_env_t |
| Axis2 Environment struct. | |
Functions | |
| AXIS2_EXTERN axutil_env_t * | axutil_env_create (axutil_allocator_t *allocator) |
| AXIS2_EXTERN axutil_env_t * | axutil_env_create_all (const axis2_char_t *log_file, const axutil_log_levels_t log_level) |
| AXIS2_EXTERN axutil_env_t * | axutil_env_create_with_error (axutil_allocator_t *allocator, axutil_error_t *error) |
| AXIS2_EXTERN axutil_env_t * | axutil_env_create_with_error_log (axutil_allocator_t *allocator, axutil_error_t *error, axutil_log_t *log) |
| AXIS2_EXTERN axutil_env_t * | axutil_env_create_with_error_log_thread_pool (axutil_allocator_t *allocator, axutil_error_t *error, axutil_log_t *log, axutil_thread_pool_t *pool) |
| AXIS2_EXTERN axis2_status_t | axutil_env_enable_log (axutil_env_t *env, axis2_bool_t enable) |
| AXIS2_EXTERN axis2_status_t | axutil_env_check_status (const axutil_env_t *env) |
| AXIS2_EXTERN void | axutil_env_free (axutil_env_t *env) |
| AXIS2_EXTERN void | axutil_env_free_masked (axutil_env_t *env, char mask) |
| AXIS2_EXTERN axis2_status_t | axutil_env_increment_ref (axutil_env_t *env) |
| typedef struct axutil_env axutil_env_t |
Axis2 Environment struct.
Environment acts as a container for error, log, memory allocator and threading routines
| AXIS2_EXTERN axis2_status_t axutil_env_check_status | ( | const axutil_env_t * | env | ) |
Checks the status code of environment stored within error struct.
| env | pointer to environment struct |
| AXIS2_EXTERN axutil_env_t* axutil_env_create | ( | axutil_allocator_t * | allocator | ) |
Creates an environment struct. Would include a default log and error structs within the created environment. By default, logging would be enabled and the default log level would be debug.
| allocator | pointer to an instance of allocator struct. Must not be NULL |
| AXIS2_EXTERN axutil_env_t* axutil_env_create_all | ( | const axis2_char_t * | log_file, | |
| const axutil_log_levels_t | log_level | |||
| ) |
Creates an environment struct with all of its default parts, that is an allocator, error, log and a thread pool.
| log_file | name of the log file. If NULL, a default log would be created. | |
| log_level | log level to be used. If not valid, debug would be used as the default log level |
| AXIS2_EXTERN axutil_env_t* axutil_env_create_with_error | ( | axutil_allocator_t * | allocator, | |
| axutil_error_t * | error | |||
| ) |
Creates an environment struct with given error struct.
| allocator | pointer to an instance of allocator struct. Must not be NULL | |
| error | pointer to an instance of error struct. Must not be NULL |
| AXIS2_EXTERN axutil_env_t* axutil_env_create_with_error_log | ( | axutil_allocator_t * | allocator, | |
| axutil_error_t * | error, | |||
| axutil_log_t * | log | |||
| ) |
Creates an environment struct with given error and log structs.
| allocator | pointer to an instance of allocator struct. Must not be NULL | |
| error | pointer to an instance of error struct. Must not be NULL | |
| log | pointer to an instance of log struct. If NULL it would be assumed that logging is disabled. |
| AXIS2_EXTERN axutil_env_t* axutil_env_create_with_error_log_thread_pool | ( | axutil_allocator_t * | allocator, | |
| axutil_error_t * | error, | |||
| axutil_log_t * | log, | |||
| axutil_thread_pool_t * | pool | |||
| ) |
Creates an environment struct with given error, log and thread pool structs.
| allocator | pointer to an instance of allocator struct. Must not be NULL | |
| error | pointer to an instance of error struct. Must not be NULL | |
| log | pointer to an instance of log struct. If NULL it would be assumed that logging is disabled. | |
| pool | pointer to an instance of thread_pool. Must not be NULL |
| AXIS2_EXTERN axis2_status_t axutil_env_enable_log | ( | axutil_env_t * | env, | |
| axis2_bool_t | enable | |||
| ) |
Enable or disable logging.
| env | pointer to environment struct | |
| enable | AXIS2_TRUE to enable logging and AXIS2_FALSE to disable logging |
| AXIS2_EXTERN void axutil_env_free | ( | axutil_env_t * | env | ) |
Frees an environment struct instance.
| env | pointer to environment struct instance to be freed. |
| AXIS2_EXTERN void axutil_env_free_masked | ( | axutil_env_t * | env, | |
| char | mask | |||
| ) |
Frees the environment components based on the mask.
| env | pointer to environment struct to be freed | |
| mask | bit pattern indicating which components of the env struct are to be freed AXIS_ENV_FREE_LOG - Frees the log AXIS_ENV_FREE_ERROR - Frees the error AXIS_ENV_FREE_THREADPOOL - Frees the thread pool You can use combinations to free multiple components as well E.g : AXIS_ENV_FREE_LOG | AXIS_ENV_FREE_ERROR frees both log and error, but not the thread pool |
| AXIS2_EXTERN axis2_status_t axutil_env_increment_ref | ( | axutil_env_t * | env | ) |
Incrent the reference count.This is used when objects are created using this env and keeping this for future use.
| env | pointer to environment struct instance to be freed. |
1.5.3