Interface ComplexHandler


public interface ComplexHandler
Interface for a handler in case a SimpleHandler is not flexible enough. A complex Handler takes a RequestCycle. It can, for example, access the ResponseTransmitter directly and stream a large binary response without loading it all into memory first.

Note that implementing ComplexHandler is not more complex than how a SimpleHandler works, but rather is needed for more complex cases. The main downside with a complex handler is that a request cycle is much harder to mock in tests than just a Request. You should therefore implement SimpleHandler whenever possible to reduce scaffolding for your tests.

  • Method Summary

    Modifier and Type
    Method
    Description
    handle(RequestCycle requestCycle)
    Handles a request.