|
|||||||||||||||||||
30 day Evaluation Version distributed via the Maven Jar Repository. Clover is not free. You have 30 days to evaluate it. Please visit http://www.thecortex.net/clover to obtain a licensed version of Clover | |||||||||||||||||||
Source file | Conditionals | Statements | Methods | TOTAL | |||||||||||||||
ServiceImplementationFactory.java | - | - | - | - |
|
1 |
// Copyright 2004 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;
|
|
18 |
|
|
19 |
import org.apache.hivemind.internal.Module;
|
|
20 |
|
|
21 |
/**
|
|
22 |
* Interface for an object that can create a service's core implementation.
|
|
23 |
*
|
|
24 |
* @author Howard Lewis Ship
|
|
25 |
*/
|
|
26 |
public interface ServiceImplementationFactory |
|
27 |
{ |
|
28 |
/**
|
|
29 |
* Creates a core implementation object for a particular service extension point.
|
|
30 |
* Typically, the factory creates an instance and modifies it to implement
|
|
31 |
* the necessary interface (in much the same way that an
|
|
32 |
* {@link ServiceInterceptorFactory} would).
|
|
33 |
*
|
|
34 |
* @param serviceId the id of the service extension point for which a core service implementation
|
|
35 |
* should be created
|
|
36 |
* @param serviceInterface the interface for the service
|
|
37 |
* @param invokingModule the module containing the service extension which invokes
|
|
38 |
* the factory
|
|
39 |
* @param parameters the parameters passed to the factory (possibly converted, if
|
|
40 |
* the factory has a parameter schema). May be empty but won't be null.
|
|
41 |
*/
|
|
42 |
public Object createCoreServiceImplementation(
|
|
43 |
String serviceId, |
|
44 |
Class serviceInterface, |
|
45 |
// TODO: Can we use something else here? Module is in internal and it would be best
|
|
46 |
// to not expose it.
|
|
47 |
Module invokingModule, |
|
48 |
List parameters); |
|
49 |
} |
|
50 |
|
|