|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object play.PlayPlugin
public abstract class PlayPlugin
A framework plugin
Field Summary | |
---|---|
int |
index
Plugin priority (0 for highest priority) |
Constructor Summary | |
---|---|
PlayPlugin()
|
Method Summary | |
---|---|
java.util.List<java.lang.String> |
addTemplateExtensions()
|
void |
afterActionInvocation()
Called at the end of the action invocation. |
void |
afterApplicationStart()
Called after the application start. |
void |
afterFixtureLoad()
|
void |
afterInvocation()
Called after an invocation. |
void |
beforeActionInvocation(java.lang.reflect.Method actionMethod)
Called before an 'action' invocation, ie an HTTP request processing. |
void |
beforeDetectingChanges()
|
void |
beforeInvocation()
Called before a Play! invocation. |
java.lang.Object |
bind(java.lang.String name,
java.lang.Class clazz,
java.lang.reflect.Type type,
java.lang.annotation.Annotation[] annotations,
java.util.Map<java.lang.String,java.lang.String[]> params)
Called when play need to bind a Java object from HTTP params |
java.lang.Object |
bind(java.lang.String name,
java.lang.Object o,
java.util.Map<java.lang.String,java.lang.String[]> params)
|
int |
compareTo(PlayPlugin o)
|
void |
compileAll(java.util.List<ApplicationClasses.ApplicationClass> classes)
Let a chance to the plugin to compile it owns classes. |
void |
detectChange()
It's time for the plugin to detect changes. |
void |
enhance(ApplicationClasses.ApplicationClass applicationClass)
Enhance this class |
JsonObject |
getJsonStatus()
Retun the plugin status in JSON format |
java.lang.String |
getStatus()
Retun the plugin status |
void |
invocationFinally()
Called at the end of the invocation. |
Template |
loadTemplate(VirtualFile file)
|
Model.Factory |
modelFactory(java.lang.Class<? extends Model> modelClass)
|
void |
onActionInvocationResult(Result result)
Called when the action method has thrown a result. |
void |
onApplicationReady()
|
void |
onApplicationStart()
Called at application start (and at each reloading) Time to start statefull things. |
void |
onApplicationStop()
Called at application stop (and before each reloading) Time to shutdown statefull things. |
java.util.List<ApplicationClasses.ApplicationClass> |
onClassesChange(java.util.List<ApplicationClasses.ApplicationClass> modified)
|
void |
onConfigurationRead()
Called when the application.cond has been read. |
void |
onEvent(java.lang.String message,
java.lang.Object context)
Event may be sent by plugins or other components |
void |
onInvocationException(java.lang.Throwable e)
Called if an exception occured during the invocation. |
void |
onInvocationSuccess()
|
void |
onLoad()
Called at plugin loading |
void |
onRequestRouting(Router.Route route)
Called when the request has been routed. |
void |
onRoutesLoaded()
Called after routes loading. |
void |
onTemplateCompilation(Template template)
Deprecated. |
static void |
postEvent(java.lang.String message,
java.lang.Object context)
Inter-plugin communication. |
boolean |
rawInvocation(Http.Request request,
Http.Response response)
Give a chance to this plugin to fully manage this request |
void |
routeRequest(Http.Request request)
Let some plugins route themself |
TestEngine.TestResults |
runTest(java.lang.Class<BaseTest> clazz)
|
boolean |
serveStatic(VirtualFile file,
Http.Request request,
Http.Response response)
Let a chance to this plugin to manage a static ressource |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public int index
Constructor Detail |
---|
public PlayPlugin()
Method Detail |
---|
public void onLoad()
public TestEngine.TestResults runTest(java.lang.Class<BaseTest> clazz)
public java.lang.Object bind(java.lang.String name, java.lang.Class clazz, java.lang.reflect.Type type, java.lang.annotation.Annotation[] annotations, java.util.Map<java.lang.String,java.lang.String[]> params)
public java.lang.Object bind(java.lang.String name, java.lang.Object o, java.util.Map<java.lang.String,java.lang.String[]> params)
public java.lang.String getStatus()
public JsonObject getJsonStatus()
public void enhance(ApplicationClasses.ApplicationClass applicationClass) throws java.lang.Exception
applicationClass
-
java.lang.Exception
@Deprecated public void onTemplateCompilation(Template template)
template
- public boolean rawInvocation(Http.Request request, Http.Response response) throws java.lang.Exception
request
- The Play requestresponse
- The Play response
java.lang.Exception
public boolean serveStatic(VirtualFile file, Http.Request request, Http.Response response)
request
- The Play requestresponse
- The Play response
public void beforeDetectingChanges()
public Template loadTemplate(VirtualFile file)
public void detectChange()
public void onApplicationStart()
public void afterApplicationStart()
public void onApplicationStop()
public void beforeInvocation()
public void afterInvocation()
public void onInvocationException(java.lang.Throwable e)
e
- The catched exception.public void invocationFinally()
public void beforeActionInvocation(java.lang.reflect.Method actionMethod)
public void onActionInvocationResult(Result result)
result
- The result object for the request.public void onInvocationSuccess()
public void onRequestRouting(Router.Route route)
route
- The route selected.public void afterActionInvocation()
public void onConfigurationRead()
public void onRoutesLoaded()
public void onEvent(java.lang.String message, java.lang.Object context)
message
- convention: pluginClassShortName.messagecontext
- depends on the pluginpublic java.util.List<ApplicationClasses.ApplicationClass> onClassesChange(java.util.List<ApplicationClasses.ApplicationClass> modified)
public java.util.List<java.lang.String> addTemplateExtensions()
public void compileAll(java.util.List<ApplicationClasses.ApplicationClass> classes)
public void routeRequest(Http.Request request)
request
- public Model.Factory modelFactory(java.lang.Class<? extends Model> modelClass)
public void afterFixtureLoad()
public static void postEvent(java.lang.String message, java.lang.Object context)
public void onApplicationReady()
public int compareTo(PlayPlugin o)
compareTo
in interface java.lang.Comparable<PlayPlugin>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |