|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectplay.PlayPlugin
public abstract class PlayPlugin
A framework plugin
| Field Summary | |
|---|---|
int |
index
Plugin priority (0 for highest priority) |
| Constructor Summary | |
|---|---|
PlayPlugin()
|
|
| Method Summary | |
|---|---|
void |
afterActionInvocation()
Called at the end of the action invocation. |
void |
afterApplicationStart()
Called after the application start. |
void |
afterInvocation()
Called after an invocation. |
void |
beforeActionInvocation(Method actionMethod)
Called before an 'action' invocation, ie an HTTP request processing. |
void |
beforeDetectingChanges()
|
void |
beforeInvocation()
Called before a Play! invocation. |
Object |
bind(String name,
Class clazz,
Type type,
Map<String,String[]> params)
Called when play need to bind a Java object from HTTP params |
int |
compareTo(PlayPlugin o)
|
void |
compileAll(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 |
com.google.gson.JsonObject |
getJsonStatus()
Retun the plugin status in JSON format |
String |
getStatus()
Retun the plugin status |
void |
invocationFinally()
Called at the end of the invocation. |
void |
onActionInvocationResult(Result result)
Called when the action method has thrown a result. |
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. |
void |
onConfigurationRead()
Called when the application.cond has been read. |
void |
onEvent(String message,
Object context)
Event may be sent by plugins or other components |
void |
onInvocationException(Throwable e)
Called if an exception occured during the invocation. |
void |
onLoad()
Called at plugin loading |
void |
onRoutesLoaded()
Called after routes loading. |
static void |
postEvent(String message,
Object context)
Inter-plugin communication. |
boolean |
rawInvocation(Http.Request request,
Http.Response response)
Let a chance to this plugin to fully manage this request |
void |
routeRequest(Http.Request request)
Let some plugins route themself |
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 Object bind(String name,
Class clazz,
Type type,
Map<String,String[]> params)
public String getStatus()
public com.google.gson.JsonObject getJsonStatus()
public void enhance(ApplicationClasses.ApplicationClass applicationClass)
throws Exception
applicationClass -
Exception
public boolean rawInvocation(Http.Request request,
Http.Response response)
throws Exception
request - The Play requestresponse - The Play response
Exception
public boolean serveStatic(VirtualFile file,
Http.Request request,
Http.Response response)
request - The Play requestresponse - The Play response
public void beforeDetectingChanges()
public void detectChange()
public void onApplicationStart()
public void afterApplicationStart()
public void onApplicationStop()
public void beforeInvocation()
public void afterInvocation()
public void onInvocationException(Throwable e)
e - The catched exception.public void invocationFinally()
public void beforeActionInvocation(Method actionMethod)
public void onActionInvocationResult(Result result)
result - The result object for the request.public void afterActionInvocation()
public void onConfigurationRead()
public void onRoutesLoaded()
public void onEvent(String message,
Object context)
message - convention: pluginClassShortName.messagecontext - depends on the pluginpublic void compileAll(List<ApplicationClasses.ApplicationClass> classes)
public void routeRequest(Http.Request request)
request -
public static void postEvent(String message,
Object context)
public int compareTo(PlayPlugin o)
compareTo in interface Comparable<PlayPlugin>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||