forked from jooby-project/jooby
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathExtension.java
More file actions
39 lines (35 loc) · 1000 Bytes
/
Extension.java
File metadata and controls
39 lines (35 loc) · 1000 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/**
* Jooby https://jooby.io
* Apache License Version 2.0 https://jooby.io/LICENSE.txt
* Copyright 2014 Edgar Espina
*/
package io.jooby;
import javax.annotation.Nonnull;
/**
* Simple extension contract for adding and reusing commons application infrastructure components
* and/or integrate with external libraries.
*
* Extensions are expected to work via side-effects.
*
* @author edgar
* @since 2.0.0
*/
public interface Extension {
/**
* True when extension needs to run while starting the application. Defaults is false, starts
* immediately.
*
* @return True when extension needs to run while starting the application. Defaults is false,
* starts immediately.
*/
default boolean lateinit() {
return false;
}
/**
* Install, configure additional features to a Jooby application.
*
* @param application Jooby application.
* @throws Exception If something goes wrong.
*/
void install(@Nonnull Jooby application) throws Exception;
}