org.scalatra.Handler.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of scalatra_2.9.0-1 Show documentation
Show all versions of scalatra_2.9.0-1 Show documentation
The core Scalatra framework
The newest version!
package org.scalatra
/**
* A `Handler` is the Scalatra abstraction for an object that operates on
* a request/response pair. The request and response types themselves are
* abstract in order to support multiple server adapters.
*/
trait Handler {
/**
* The type of request handled by this handler. Made abstract for
* compatibility with the Servlet implementation.
*/
type RequestT <: Request
/**
* The type of request generated by this handler. Made abstract for
* compatibility with the Servlet implementation.
*/
type ResponseT <: Response
/**
* Handles a request and writes to the response.
*/
def handle(request: RequestT, res: ResponseT): Unit
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy