Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
RegistryComponent |
|
| 1.0;1 |
1 | /* | |
2 | * $Id: RegistryComponent.java 7976 2007-08-21 14:26:13Z dirk.olmes $ | |
3 | * -------------------------------------------------------------------------------------- | |
4 | * Copyright (c) MuleSource, Inc. All rights reserved. http://www.mulesource.com | |
5 | * | |
6 | * The software in this package is published under the terms of the CPAL v1.0 | |
7 | * license, a copy of which has been included with this distribution in the | |
8 | * LICENSE.txt file. | |
9 | */ | |
10 | ||
11 | package org.mule.registry; | |
12 | ||
13 | import java.util.List; | |
14 | ||
15 | import javax.management.ObjectName; | |
16 | ||
17 | /** | |
18 | * @author <a href="mailto:gnt@codehaus.org">Guillaume Nodet</a> | |
19 | */ | |
20 | public interface RegistryComponent extends Entry | |
21 | { | |
22 | ||
23 | ComponentType getType(); | |
24 | ||
25 | void restoreState() throws RegistryException; | |
26 | ||
27 | void saveAndShutdown() throws RegistryException; | |
28 | ||
29 | /** | |
30 | * Start the item. | |
31 | * | |
32 | * @exception RegistryException if the item fails to start. | |
33 | */ | |
34 | void start() throws RegistryException; | |
35 | ||
36 | /** | |
37 | * Stop the item. This suspends current messaging activities. | |
38 | * | |
39 | * @exception RegistryException if the item fails to stop. | |
40 | */ | |
41 | void stop() throws RegistryException; | |
42 | ||
43 | /** | |
44 | * Shut down the item. The releases resources, preparatory to uninstallation. | |
45 | * | |
46 | * @exception RegistryException if the item fails to shut down. | |
47 | */ | |
48 | void shutDown() throws RegistryException; | |
49 | ||
50 | /** | |
51 | * Retrieves the libraries that this component uses. | |
52 | * | |
53 | * @return | |
54 | */ | |
55 | Library[] getLibraries(); | |
56 | ||
57 | /** | |
58 | * Units deployed to this component | |
59 | * | |
60 | * @return | |
61 | */ | |
62 | Unit[] getUnits(); | |
63 | ||
64 | /** | |
65 | * | |
66 | */ | |
67 | List getClassPathElements(); | |
68 | ||
69 | void setClassPathElements(List elements); | |
70 | ||
71 | boolean isClassLoaderParentFirst(); | |
72 | ||
73 | boolean isTransient(); | |
74 | ||
75 | void setTransient(boolean isTransient); | |
76 | ||
77 | /** | |
78 | * Return the component implementation. | |
79 | * | |
80 | * @return | |
81 | */ | |
82 | Object getComponent(); | |
83 | ||
84 | void setComponent(Object component); | |
85 | ||
86 | /** | |
87 | * Return the descriptor for this component. | |
88 | * | |
89 | * @return | |
90 | */ | |
91 | RegistryDescriptor getDescriptor() throws RegistryException; | |
92 | ||
93 | void setDescriptor(RegistryDescriptor descriptor) throws RegistryException; | |
94 | ||
95 | /** | |
96 | * Return the ObjectName under which the lifecycle mbean is registered. | |
97 | * | |
98 | * @return | |
99 | */ | |
100 | ObjectName getObjectName(); | |
101 | ||
102 | /** | |
103 | * Return the private component workspace | |
104 | * | |
105 | * @return | |
106 | */ | |
107 | String getWorkspaceRoot(); | |
108 | ||
109 | void setWorkspaceRoot(String workspaceRoot); | |
110 | ||
111 | /** | |
112 | * Install this component. | |
113 | * | |
114 | * @throws RegistryException | |
115 | */ | |
116 | void install() throws RegistryException; | |
117 | ||
118 | /** | |
119 | * Uninstall this component. | |
120 | * | |
121 | * @throws RegistryException | |
122 | */ | |
123 | void uninstall() throws RegistryException; | |
124 | ||
125 | Registry getRegistry(); | |
126 | ||
127 | ObjectName initComponent() throws Exception; | |
128 | ||
129 | void addUnit(Unit unit); | |
130 | ||
131 | void removeUnit(Unit unit); | |
132 | } |