KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > hivemind > ServiceImplementationFactoryParameters


1 // Copyright 2004, 2005 The Apache Software Foundation
2
//
3
// Licensed under the Apache License, Version 2.0 (the "License");
4
// you may not use this file except in compliance with the License.
5
// You may obtain a copy of the License at
6
//
7
// http://www.apache.org/licenses/LICENSE-2.0
8
//
9
// Unless required by applicable law or agreed to in writing, software
10
// distributed under the License is distributed on an "AS IS" BASIS,
11
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
// See the License for the specific language governing permissions and
13
// limitations under the License.
14

15 package org.apache.hivemind;
16
17 import java.util.List JavaDoc;
18
19 import org.apache.commons.logging.Log;
20 import org.apache.hivemind.internal.Module;
21
22 /**
23  * A wrapper for the parameters needed by {@link org.apache.hivemind.ServiceImplementationFactory}.
24  *
25  * @author Howard M. Lewis Ship
26  * @since 1.1
27  */

28 public interface ServiceImplementationFactoryParameters
29 {
30     /**
31      * The fully qualified id of the service.
32      */

33
34     public String JavaDoc getServiceId();
35
36     /**
37      * The interface defined for the service.
38      */

39     public Class JavaDoc getServiceInterface();
40
41     /**
42      * The log used for any output related to the service (or the construction of the service).
43      */

44
45     public Log getLog();
46
47     /**
48      * An {@link ErrorLog} instance used for reporting recoverable errors related to the service (or
49      * the construction of the service).
50      */

51
52     public ErrorLog getErrorLog();
53
54     /**
55      * The module containing the service constructor. Primarily used to locate other services (or
56      * configurations) using simple (non-qualified) ids.
57      */

58     public Module getInvokingModule();
59
60     /**
61      * The parameters passed to the factory to guide the construction of the service. In most cases,
62      * there will only be a single element in the list.
63      * Since HiveMind 2.0 schemas and thus parameters are no longer restricted to lists
64      * as root element. The parameters can be contained in any other type.
65      *
66      * @deprecated use #getParametersContainer instead
67      */

68     public List JavaDoc getParameters();
69     
70     /**
71      * The parameters passed to the factory to guide the construction of the service.
72      * The concrete type depends on the underlying schema definition.
73      */

74     public Object JavaDoc getParametersContainer();
75
76     /**
77      * Returns the first parameter passed to the factory. Works only if the parameters
78      * are contained in a list. If no parameters exist, returns null.
79      */

80     public Object JavaDoc getFirstParameter();
81
82 }
Popular Tags