org.xlightweb
Annotation Type InvokeOn
@Target(value={TYPE,METHOD})
@Retention(value=RUNTIME)
public @interface InvokeOn
Annotation which defines when a call back method will be call. Either by
receiving a message header (default) or by receiving the complete message.
This annotation can be used to declare the invoke modus by performing
call back method such as onRequest or onResponse.
For these call back method xLightweb is free to invoke the method on MessageRecevied
even though on HeaderReceived is declared.
E.g.
class MyResponseHandler implements IHttpResponseHandler {
@InvokeOn(InvokeOn.MESSAGE_RECEIVED) // overrides default HEADER_RECEIVED
public void onResponse(IHttpResponse response) throws IOException {
status = response.getStatus();
//...
}
public void void onException(IOException ioe) {
//...
}
//...
}
|
Optional Element Summary |
int |
value
|
value
public abstract int value
- Default:
- 0