1 |
| |
2 |
| |
3 |
| |
4 |
| |
5 |
| |
6 |
| |
7 |
| |
8 |
| |
9 |
| |
10 |
| |
11 |
| |
12 |
| |
13 |
| |
14 |
| |
15 |
| package org.apache.hivemind.impl; |
16 |
| |
17 |
| import java.util.List; |
18 |
| |
19 |
| import org.apache.commons.logging.Log; |
20 |
| import org.apache.hivemind.ServiceImplementationFactoryParameters; |
21 |
| import org.apache.hivemind.ErrorLog; |
22 |
| import org.apache.hivemind.internal.Module; |
23 |
| import org.apache.hivemind.internal.ServicePoint; |
24 |
| import org.apache.hivemind.util.Defense; |
25 |
| |
26 |
| |
27 |
| |
28 |
| |
29 |
| |
30 |
| |
31 |
| |
32 |
| |
33 |
| public class ServiceImplementationFactoryParametersImpl implements |
34 |
| ServiceImplementationFactoryParameters |
35 |
| { |
36 |
| private ServicePoint _servicePoint; |
37 |
| |
38 |
| private Module _invokingModule; |
39 |
| |
40 |
| private List _parameters; |
41 |
| |
42 |
793
| public ServiceImplementationFactoryParametersImpl(ServicePoint servicePoint,
|
43 |
| Module invokingModule, List parameters) |
44 |
| { |
45 |
793
| Defense.notNull(servicePoint, "servicePoint");
|
46 |
793
| Defense.notNull(invokingModule, "invokingModule");
|
47 |
793
| Defense.notNull(parameters, "parameters");
|
48 |
| |
49 |
793
| _servicePoint = servicePoint;
|
50 |
793
| _invokingModule = invokingModule;
|
51 |
793
| _parameters = parameters;
|
52 |
| } |
53 |
| |
54 |
| |
55 |
| |
56 |
| |
57 |
| |
58 |
1
| public boolean equals(Object other)
|
59 |
| { |
60 |
1
| ServiceImplementationFactoryParametersImpl p = (ServiceImplementationFactoryParametersImpl) other;
|
61 |
| |
62 |
1
| return _servicePoint == p._servicePoint && _invokingModule == p._invokingModule
|
63 |
| && _parameters.equals(p._parameters); |
64 |
| } |
65 |
| |
66 |
1097
| public String getServiceId()
|
67 |
| { |
68 |
1097
| return _servicePoint.getExtensionPointId();
|
69 |
| } |
70 |
| |
71 |
0
| public Class getServiceInterface()
|
72 |
| { |
73 |
0
| return _servicePoint.getServiceInterface();
|
74 |
| } |
75 |
| |
76 |
1564
| public Log getLog()
|
77 |
| { |
78 |
1564
| return _servicePoint.getLog();
|
79 |
| } |
80 |
| |
81 |
128
| public ErrorLog getErrorLog()
|
82 |
| { |
83 |
128
| return _servicePoint.getErrorLog();
|
84 |
| } |
85 |
| |
86 |
1973
| public Module getInvokingModule()
|
87 |
| { |
88 |
1973
| return _invokingModule;
|
89 |
| } |
90 |
| |
91 |
0
| public List getParameters()
|
92 |
| { |
93 |
0
| return _parameters;
|
94 |
| } |
95 |
| |
96 |
783
| public Object getFirstParameter()
|
97 |
| { |
98 |
783
| return _parameters.isEmpty() ? null : _parameters.get(0);
|
99 |
| } |
100 |
| } |