# phase rule
[description]

## Files
file | axis2_phase_rule.h
## Typedefs
typedef struct axis2_phase_rule | axis2_phase_rule_t
## Functions
AXIS2_EXTERN const axis2_char_t * | axis2_phase_rule_get_before (const axis2_phase_rule_t *phase_rule, const axutil_env_t *env)
AXIS2_EXTERN axis2_status_t | axis2_phase_rule_set_before (axis2_phase_rule_t *phase_rule, const axutil_env_t *env, const axis2_char_t *before)
AXIS2_EXTERN const axis2_char_t * | axis2_phase_rule_get_after (const axis2_phase_rule_t *phase_rule, const axutil_env_t *env)
AXIS2_EXTERN axis2_status_t | axis2_phase_rule_set_after (axis2_phase_rule_t *phase_rule, const axutil_env_t *env, const axis2_char_t *after)
AXIS2_EXTERN const axis2_char_t * | axis2_phase_rule_get_name (const axis2_phase_rule_t *phase_rule, const axutil_env_t *env)
AXIS2_EXTERN axis2_status_t | axis2_phase_rule_set_name (axis2_phase_rule_t *phase_rule, const axutil_env_t *env, const axis2_char_t *name)
AXIS2_EXTERN axis2_bool_t | axis2_phase_rule_is_first (const axis2_phase_rule_t *phase_rule, const axutil_env_t *env)
AXIS2_EXTERN axis2_status_t | axis2_phase_rule_set_first (axis2_phase_rule_t *phase_rule, const axutil_env_t *env, axis2_bool_t first)
AXIS2_EXTERN axis2_bool_t | axis2_phase_rule_is_last (const axis2_phase_rule_t *phase_rule, const axutil_env_t *env)
AXIS2_EXTERN axis2_status_t | axis2_phase_rule_set_last (axis2_phase_rule_t *phase_rule, const axutil_env_t *env, axis2_bool_t last)
AXIS2_EXTERN void | axis2_phase_rule_free (axis2_phase_rule_t *phase_rule, const axutil_env_t *env)
AXIS2_EXTERN axis2_phase_rule_t * | axis2_phase_rule_clone (axis2_phase_rule_t *phase_rule, const axutil_env_t *env)
AXIS2_EXTERN axis2_phase_rule_t * | axis2_phase_rule_create (const axutil_env_t *env, const axis2_char_t *name)

## Detailed Description

phase rule encapsulates data and operations related to phase rules for a given handler. phase rule lives within a handler. phase rules of a handler specify the relative location of the handler within the phase to which it belongs, with respect to other handlers in the phase or first and last positions of the handler chain of the phase.

## Typedef Documentation

typedef struct axis2_phase_rule axis2_phase_rule_t

Type name for struct axis2_phase_rule

## Function Documentation

AXIS2_EXTERN axis2_phase_rule_t* axis2_phase_rule_clone | ( | axis2_phase_rule_t * | phase_rule,
|  | const axutil_env_t * | env |
| ) |  |  |

Clones phase rule.

Parameters:

  | phase_rule | pointer to phase rule
  | env | pointer to environment struct

Returns:
  pointer to newly cloned phase rule

AXIS2_EXTERN axis2_phase_rule_t* axis2_phase_rule_create | ( | const axutil_env_t * | env,
|  | const axis2_char_t * | name |
| ) |  |  |

Creates a phase rule struct instance.

Parameters:

  | env | pointer to environment struct
  | phase_name | name of the phase rule

Returns:
  pointer to newly created phase rule

AXIS2_EXTERN void axis2_phase_rule_free | ( | axis2_phase_rule_t * | phase_rule,
|  | const axutil_env_t * | env |
| ) |  |  |

Frees phase rule.

Parameters:

  | phase_rule | pointer to phase rule
  | env | pointer to environment struct

Returns:
  void

AXIS2_EXTERN const axis2_char_t* axis2_phase_rule_get_after | ( | const axis2_phase_rule_t * | phase_rule,
|  | const axutil_env_t * | env |
| ) |  |  |

Gets the name of the handler after which the handler associated with this rule should be placed.

Parameters:

  | phase_rule | pointer to phase rule
  | env | pointer to environment struct

Returns:
  name of handler after which the handler should be placed

AXIS2_EXTERN const axis2_char_t* axis2_phase_rule_get_before | ( | const axis2_phase_rule_t * | phase_rule,
|  | const axutil_env_t * | env |
| ) |  |  |

Gets the name of the handler before which the handler associated with this rule should be placed.

Parameters:

  | phase_rule | pointer to phase rule
  | env | pointer to environment struct

Returns:
  name of handler before which the handler should be placed

AXIS2_EXTERN const axis2_char_t* axis2_phase_rule_get_name | ( | const axis2_phase_rule_t * | phase_rule,
|  | const axutil_env_t * | env |
| ) |  |  |

Gets name.

Parameters:

  | phase_rule | pointer to phase rule
  | env | pointer to environment struct

Returns:
  name string

AXIS2_EXTERN axis2_bool_t axis2_phase_rule_is_first | ( | const axis2_phase_rule_t * | phase_rule,
|  | const axutil_env_t * | env |
| ) |  |  |

Checks if the handler is the first in phase.

Parameters:

  | phase_rule | pointer to phase rule
  | env | pointer to environment struct

Returns:
  AXIS2_TRUE if the handler associated with this rule is the first in phase, else AXIS2_FALSE

AXIS2_EXTERN axis2_bool_t axis2_phase_rule_is_last | ( | const axis2_phase_rule_t * | phase_rule,
|  | const axutil_env_t * | env |
| ) |  |  |

Checks if the handler is the last in phase.

Parameters:

  | phase_rule | pointer to phase rule
  | env | pointer to environment struct

Returns:
  AXIS2_TRUE if the handler associated with this rule is the last in phase, else AXIS2_FALSE

AXIS2_EXTERN axis2_status_t axis2_phase_rule_set_after | ( | axis2_phase_rule_t * | phase_rule,
|  | const axutil_env_t * | env,
|  | const axis2_char_t * | after |
| ) |  |  |

Sets the name of the handler after which the handler associated with this rule should be placed.

Parameters:

  | phase_rule | pointer to phase rule
  | env | pointer to environment struct
  | after | name of handler after which the handler should be placed

Returns:
  AXIS2_SUCCESS on success, else AXIS2_FAILURE

AXIS2_EXTERN axis2_status_t axis2_phase_rule_set_before | ( | axis2_phase_rule_t * | phase_rule,
|  | const axutil_env_t * | env,
|  | const axis2_char_t * | before |
| ) |  |  |

Sets the name of the handler before which the handler associated with this rule should be placed.

Parameters:

  | phase_rule | pointer to phase rule
  | env | pointer to environment struct
  | before | name of handler before which the handler should be placed

Returns:
  AXIS2_SUCCESS on success, else AXIS2_FAILURE

AXIS2_EXTERN axis2_status_t axis2_phase_rule_set_first | ( | axis2_phase_rule_t * | phase_rule,
|  | const axutil_env_t * | env,
|  | axis2_bool_t | first |
| ) |  |  |

Sets handler to be the first in phase.

Parameters:

  | phase_rule | pointer to phase rule
  | env | pointer to environment struct
  | first | AXIS2_TRUE if the handler associated with this rule is the first in phase, else AXIS2_FALSE

Returns:
  AXIS2_SUCCESS on success, else AXIS2_FAILURE

AXIS2_EXTERN axis2_status_t axis2_phase_rule_set_last | ( | axis2_phase_rule_t * | phase_rule,
|  | const axutil_env_t * | env,
|  | axis2_bool_t | last |
| ) |  |  |

Sets handler to be the last in phase.

Parameters:

  | phase_rule | pointer to phase rule
  | env | pointer to environment struct
  | last | AXIS2_TRUE if the handler associated with this rule is the last in phase, else AXIS2_FALSE

Returns:
  AXIS2_SUCCESS on success, else AXIS2_FAILURE

AXIS2_EXTERN axis2_status_t axis2_phase_rule_set_name | ( | axis2_phase_rule_t * | phase_rule,
|  | const axutil_env_t * | env,
|  | const axis2_char_t * | name |
| ) |  |  |

Sets name.

Parameters:

  | phase_rule | pointer to phase rule
  | env | pointer to environment struct
  | name | name string

Returns:
  AXIS2_SUCCESS on success, else AXIS2_FAILURE