@Deprecated
public class GlobalSettings
extends java.lang.Object
How to use it: create a Global.java
class in your Java application and override the methods you want.
Constructor and Description |
---|
GlobalSettings()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
void |
beforeStart(Application app)
Deprecated.
Executed before any plugin - you can set-up your database schema here, for instance.
|
<T extends play.api.mvc.EssentialFilter> |
filters()
Deprecated.
Get the filters that should be used to handle each request.
|
java.util.concurrent.CompletionStage<Result> |
onBadRequest(Http.RequestHeader request,
java.lang.String error)
Deprecated.
Called when an action has been found, but the request parsing has failed.
|
java.util.concurrent.CompletionStage<Result> |
onError(Http.RequestHeader request,
java.lang.Throwable t)
Deprecated.
Called when an exception occurred.
|
java.util.concurrent.CompletionStage<Result> |
onHandlerNotFound(Http.RequestHeader request)
Deprecated.
Called when no action was found to serve a request.
|
Action |
onRequest(Http.Request request,
java.lang.reflect.Method actionMethod)
Deprecated.
Call to create the root Action of a request for a Java application.
|
play.api.mvc.Handler |
onRouteRequest(Http.RequestHeader request)
Deprecated.
Called when an HTTP request has been received.
|
void |
onStart(Application app)
Deprecated.
Executed after all plugins, including the database set-up with Evolutions and the EBean wrapper.
|
void |
onStop(Application app)
Deprecated.
Executed when the application stops.
|
public void beforeStart(Application app)
app
- the bootstrapping applicationpublic void onStart(Application app)
app
- the bootstrapped applicationpublic void onStop(Application app)
app
- the application that is shutting downpublic java.util.concurrent.CompletionStage<Result> onError(Http.RequestHeader request, java.lang.Throwable t)
null
,
so that the Scala engine handles the excepetion and shows an error page.
By overriding this method one can provide an alternative error page.request
- header of the HTTP request being processedt
- is any throwablepublic Action onRequest(Http.Request request, java.lang.reflect.Method actionMethod)
request
- The HTTP RequestactionMethod
- The action method containing the user code for this Action.public play.api.mvc.Handler onRouteRequest(Http.RequestHeader request)
request
- the HTTP request header as seen by the core framework (the body has not been parsed yet)public java.util.concurrent.CompletionStage<Result> onHandlerNotFound(Http.RequestHeader request)
null
,
so that the Scala engine handles onHandlerNotFound
.
By overriding this method one can provide an alternative 404 page.request
- the HTTP requestpublic java.util.concurrent.CompletionStage<Result> onBadRequest(Http.RequestHeader request, java.lang.String error)
null
,
so that the Scala engine handles onBadRequest
.
By overriding this method one can provide an alternative 400 page.request
- the HTTP requesterror
- an arbitrary string describing the errorpublic <T extends play.api.mvc.EssentialFilter> java.lang.Class<T>[] filters()
T
- the filter type