Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
Initialisable |
|
| 1.0;1 |
1 | /* | |
2 | * Copyright (c) MuleSoft, Inc. All rights reserved. http://www.mulesoft.com | |
3 | * The software in this package is published under the terms of the CPAL v1.0 | |
4 | * license, a copy of which has been included with this distribution in the | |
5 | * LICENSE.txt file. | |
6 | */ | |
7 | package org.mule.api.lifecycle; | |
8 | ||
9 | /** | |
10 | * <code>Initialisable</code> is a lifecycle interface that gets called at the | |
11 | * initialise lifecycle stage of the implementing service. | |
12 | */ | |
13 | public interface Initialisable | |
14 | { | |
15 | String PHASE_NAME = "initialise"; | |
16 | ||
17 | /** | |
18 | * Method used to perform any initialisation work. If a fatal error occurs during | |
19 | * initialisation an <code>InitialisationException</code> should be thrown, | |
20 | * causing the Mule instance to shutdown. If the error is recoverable, say by | |
21 | * retrying to connect, a <code>RecoverableException</code> should be thrown. | |
22 | * There is no guarantee that by throwing a Recoverable exception that the Mule | |
23 | * instance will not shut down. | |
24 | * | |
25 | * @throws InitialisationException if a fatal error occurs causing the Mule instance to shutdown | |
26 | * @throws RecoverableException if an error occurs that can be recovered from | |
27 | */ | |
28 | void initialise() throws InitialisationException; | |
29 | } |