Base interface for reactive services written in Java deployed in a Vert.x instance @author Julien Viet
| 18 | * @author <a href="mailto:julien@julienviet.com">Julien Viet</a> |
| 19 | */ |
| 20 | @FunctionalInterface |
| 21 | public interface Deployable { |
| 22 | |
| 23 | /** |
| 24 | * Start the deployable. |
| 25 | * <p> |
| 26 | * Vert.x calls this method when deploying this deployable. You do not call it yourself. |
| 27 | * |
| 28 | * @param context the Vert.x context assigned to this deployable |
| 29 | * @return a future signalling the start-up completion |
| 30 | */ |
| 31 | Future<?> deploy(Context context) throws Exception; |
| 32 | |
| 33 | /** |
| 34 | * Stop the deployable. |
| 35 | * <p> |
| 36 | * Vert.x calls this method when undeploying this deployable. You do not call it yourself. |
| 37 | * |
| 38 | * @param context the Vert.x context assigned to this deployable |
| 39 | * @return a future signalling the clean-up completion |
| 40 | */ |
| 41 | default Future<?> undeploy(Context context) throws Exception { |
| 42 | return ((ContextInternal)context).succeededFuture(); |
| 43 | } |
| 44 | } |
no outgoing calls
no test coverage detected