org.baswell.routes
Annotation Type AfterRoute


@Retention(value=RUNTIME)
@Target(value=METHOD)
public @interface AfterRoute

Callback to receive notification after HTTP requests have been routed. The response to the HTTP client has already been sent by the time this callback is invoked. AfterRoute methods should always return void and should never throw exceptions.


Optional Element Summary
 java.lang.String[] exceptTags
           Do not execute after any routes that have matching Route.tags().
 boolean[] onlyOnError
           Only call when the HTTP servlet response was unsuccessfully processed (an exception was thrown and response status is between 200 and 299).
 boolean[] onlyOnSuccess
           Only call when the HTTP servlet response was successfully processed (no exceptions thrown and response status is less than 300).
 java.lang.String[] onlyTags
           Only execute after any routes that have matching Route.tags().
 int[] order
           An optional weight to control the order of method execution when there are multiple AfterRoute for a Route.
 

exceptTags

public abstract java.lang.String[] exceptTags

Do not execute after any routes that have matching Route.tags().

Default:
{}

onlyTags

public abstract java.lang.String[] onlyTags

Only execute after any routes that have matching Route.tags().

Default:
{}

onlyOnSuccess

public abstract boolean[] onlyOnSuccess

Only call when the HTTP servlet response was successfully processed (no exceptions thrown and response status is less than 300).

This should be used as a single value. Only the first value in the array will be used.

Default:
{}

onlyOnError

public abstract boolean[] onlyOnError

Only call when the HTTP servlet response was unsuccessfully processed (an exception was thrown and response status is between 200 and 299).

This should be used as a single value. Only the first value in the array will be used.

Default:
{}

order

public abstract int[] order

An optional weight to control the order of method execution when there are multiple AfterRoute for a Route. Smaller numbers go first.

This should be used as a single value. Only the first value in the array will be used.

Default:
{}