Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## juzu.request
Interface RequestLifeCycle

    public interface RequestLifeCycle

This interface can be implemented by a controller to be aware of the dispatch of a request on the controller.

Author:
  Julien Viet

Method Summary
`void` | `beginRequest(RequestContext context)` Signals to the controller that a request begins.
`void` | `endRequest(RequestContext context)` Signals to the controller that a request ends.

Method Detail

### beginRequest

    void beginRequest(RequestContext context)

  Signals to the controller that a request begins. During the invocation of this method, if a `Response` is set on the request context, the request will be considered as terminated.

  When this method throws a runtime exception, a `Response.Error` response will be set on the request context, thus terminating the request.

  Parameters:
    `context` - the request context

### endRequest

    void endRequest(RequestContext context)

  Signals to the controller that a request ends. During the invocation of this method, the response set during the dispatch of the request is available via the `RequestContext.getResponse()` method, this method is free to override it and provide a new response instead.

  When this method throws a runtime exception, a `Response.Error` response will be set on the request context, thus terminating the request.

  Parameters:
    `context` - the request context

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2013 eXo Platform SAS. All Rights Reserved.