01: /*
02: * BEGIN_HEADER - DO NOT EDIT
03: *
04: * The contents of this file are subject to the terms
05: * of the Common Development and Distribution License
06: * (the "License"). You may not use this file except
07: * in compliance with the License.
08: *
09: * You can obtain a copy of the license at
10: * https://open-esb.dev.java.net/public/CDDLv1.0.html.
11: * See the License for the specific language governing
12: * permissions and limitations under the License.
13: *
14: * When distributing Covered Code, include this CDDL
15: * HEADER in each file and include the License file at
16: * https://open-esb.dev.java.net/public/CDDLv1.0.html.
17: * If applicable add the following below this CDDL HEADER,
18: * with the fields enclosed by brackets "[]" replaced with
19: * your own identifying information: Portions Copyright
20: * [year] [name of copyright owner]
21: */
22:
23: /*
24: * @(#)ComponentQuery.java
25: * Copyright 2004-2007 Sun Microsystems, Inc. All Rights Reserved.
26: *
27: * END_HEADER - DO NOT EDIT
28: */
29: package com.sun.jbi;
30:
31: import java.util.List;
32:
33: /**
34: * This interface provides services for query of information about Binding
35: * Components, Service Engines, and Shared Libraries.
36: *
37: * @author Sun Microsystems, Inc.
38: */
39: public interface ComponentQuery {
40: /**
41: * Get a list of component IDs for all registered components of a specified
42: * type.
43: * @param type The ComponentType: { BINDING, ENGINE, SHARED_LIBRARY,
44: * BINDINGS_AND_ENGINES, ALL }. ALL includes allcomponents regardless of their types.
45: * ComponentInfo.BINDINGS_AND_ENGINES includes both bindings and engines.
46: * @return A List of component IDs ( String ) of all registered components
47: * of the requested type. Returns an empty list of no components were found.
48: */
49: List getComponentIds(ComponentType type);
50:
51: /**
52: * Get a list of component IDs for all components of a specified type with
53: * a specified status.
54: * @param type The ComponentType: { BINDING, ENGINE, SHARED_LIBRARY,
55: * BINDINGS_AND_ENGINES, ALL }. ALL includes allcomponents regardless of their types.
56: * ComponentInfo.BINDINGS_AND_ENGINES includes both bindings and engines.
57: * @param status The Component status: ComponentState{LOADED, INSTALLED, STARTED,
58: * STOPPED}
59: * @return A List of component IDs ( String ) of all registered components
60: * of the requested type with the requested status. Returns an empty list if
61: * no components were found.
62: */
63: List<String> getComponentIds(ComponentType type,
64: ComponentState status);
65:
66: /**
67: * Get the ComponentInfo for a particular Component.
68: * @param componentName The unique name of the component being retrieved.
69: * @return The ComponentInfo for the requested component or null if the
70: * component is not registered.
71: */
72: ComponentInfo getComponentInfo(String componentName);
73:
74: /**
75: * Get the ComponentInfo for a particular Shared Library.
76: * @param sharedLibraryName The unique name of the Shared Library being
77: * retrieved.
78: * @return The ComponentInfo for the requested Shared Library or null if the
79: * Shared Library is not registered.
80: */
81: ComponentInfo getSharedLibraryInfo(String sharedLibraryName);
82:
83: /**
84: * Get a list of component IDs that depend upon a specified Shared Library.
85: * @param sharedLibraryName The unique name of the Shared Library.
86: * @return A list of the component IDs of all components that depend upon the
87: * Shared Library. If none are found, the list is empty.
88: */
89: List<String> getDependentComponentIds(String sharedLibraryName);
90:
91: /**
92: * Get the current status of a component.
93: * @param componentName The unique component name.
94: * @return The current status of the component: {INSTALLED, LOADED, STARTED, STOPPED}
95: * @throws javax.jbi.JBIException if the component name is not registered.
96: */
97: ComponentState getStatus(String componentName)
98: throws javax.jbi.JBIException;
99: }
|