|
Play Framework/Scala example source code file (Plugin.java)
The Plugin.java Play Framework example source code
/*
* Copyright (C) 2009-2013 Typesafe Inc. <http://www.typesafe.com>
*/
package play;
/**
* A Play plugin.
*
* A plugin must define a single argument constructor that accepts an {@link play.Application}, for example:
*
* <pre>
* public class MyPlugin extends Plugin {
* private final Application app;
* public MyPlugin(Application app) {
* this.app = app;
* }
* public void onStart() {
* Logger.info("Plugin started!");
* }
* }
* </pre>
*/
public class Plugin implements play.api.Plugin {
/**
* Called when the application starts.
*/
public void onStart() {
}
/**
* Called when the application stops.
*/
public void onStop() {
}
/**
* Is this plugin enabled.
*/
public boolean enabled() {
return true;
}
}
Other Play Framework source code examplesHere is a short list of links related to this Play Framework Plugin.java source code file: |
| ... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2024 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.