Axis2/C: listener manager

- Main Page
- Modules
- Classes
- Files
- Directories
- Related Pages
- Examples

- Search for |

# listener manager

## Files
file | axis2_listener_manager.h
## Typedefs
typedef struct axis2_listener_manager | axis2_listener_manager_t
## Functions
AXIS2_EXTERN axis2_status_t | axis2_listener_manager_make_sure_started (axis2_listener_manager_t *listener_manager, const axutil_env_t *env, const AXIS2_TRANSPORT_ENUMS transport, axis2_conf_ctx_t *conf_ctx)
AXIS2_EXTERN axis2_status_t | axis2_listener_manager_stop (axis2_listener_manager_t *listener_manager, const axutil_env_t *env, const AXIS2_TRANSPORT_ENUMS transport)
AXIS2_EXTERN axis2_endpoint_ref_t * | axis2_listener_manager_get_reply_to_epr (const axis2_listener_manager_t *listener_manager, const axutil_env_t *env, const axis2_char_t *svc_name, const AXIS2_TRANSPORT_ENUMS transport)
AXIS2_EXTERN axis2_conf_ctx_t * | axis2_listener_manager_get_conf_ctx (const axis2_listener_manager_t *listener_manager, const axutil_env_t *env)
AXIS2_EXTERN void | axis2_listener_manager_free (axis2_listener_manager_t *listener_manager, const axutil_env_t *env)
AXIS2_EXTERN axis2_listener_manager_t * | axis2_listener_manager_create (const axutil_env_t *env)

## Detailed Description

listener manager manages the listeners in case of dual channel invocations. In case of a dual channel invocation, request is sent along one channel and the response is received on another channel. When the response is expected to be received along another transport channel, it has to be made sure that the listener socket is up in anticipation of the response and also that listener must be closed once the response is received. listener manager is responsible for dealing with these tasks.

## Typedef Documentation

typedef struct axis2_listener_manager axis2_listener_manager_t

Type name for struct axis2_listener_manager

## Function Documentation

AXIS2_EXTERN axis2_listener_manager_t* axis2_listener_manager_create | ( | const axutil_env_t * | env | ) |

Creates a listener manager struct instance.

Parameters:

  | env | pointer to environment struct

Returns:
  a pointer to newly created listener manager struct, or NULL on error with error code set in environment's error

AXIS2_EXTERN void axis2_listener_manager_free | ( | axis2_listener_manager_t * | listener_manager,
|  | const axutil_env_t * | env |
| ) |  |  |

Frees listener manager struct.

Parameters:

  | listener_manager | pointer to listener manager struct
  | env | pointer to environment struct

Returns:
  void

AXIS2_EXTERN axis2_conf_ctx_t* axis2_listener_manager_get_conf_ctx | ( | const axis2_listener_manager_t * | listener_manager,
|  | const axutil_env_t * | env |
| ) |  |  |

Gets the configuration context that holds information on the transports managed by the listener manager.

Parameters:

  | listener_manager | pointer to listener manager struct
  | env | pointer to environment struct

AXIS2_EXTERN axis2_endpoint_ref_t* axis2_listener_manager_get_reply_to_epr | ( | const axis2_listener_manager_t * | listener_manager,
|  | const axutil_env_t * | env,
|  | const axis2_char_t * | svc_name,
|  | const AXIS2_TRANSPORT_ENUMS | transport |
| ) |  |  |

Gets reply to end point reference. The engine will direct the response for the message to this reply to address.

Parameters:

  | listener_manager | pointer to listener manager struct
  | env | pointer to environment struct
  | svc_name | name of the service for which the epr is to be returned
  | transport | name of the transport corresponding to the endpoint

Returns:
  a pointer to endpoint reference struct representing the reply endpoint

AXIS2_EXTERN axis2_status_t axis2_listener_manager_make_sure_started | ( | axis2_listener_manager_t * | listener_manager,
|  | const axutil_env_t * | env,
|  | const AXIS2_TRANSPORT_ENUMS | transport,
|  | axis2_conf_ctx_t * | conf_ctx |
| ) |  |  |

Ensures that the named transport's listener is started. Starts a listener if it is not already started. Only one listener would be started for a given transport.

Parameters:

  | listener_manager | pointer to listener manager struct
  | env | pointer to environment struct
  | transport | name of the transport
  | conf_ctx | configuration context to pick transport info for the named transport

Returns:
  AXIS2_SUCCESS on success, else AXIS2_FAILURE

AXIS2_EXTERN axis2_status_t axis2_listener_manager_stop | ( | axis2_listener_manager_t * | listener_manager,
|  | const axutil_env_t * | env,
|  | const AXIS2_TRANSPORT_ENUMS | transport |
| ) |  |  |

Stops the named listener transport.

Parameters:

  | listener_manager | pointer to listener manager struct
  | env | pointer to environment struct
  | transport | name of the transport whose listener is to be stopped

Returns:
  AXIS2_SUCCESS on success, else AXIS2_FAILURE