|
|||||||||||||||||||
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 | |||||||||||||||
StartupImpl.java | 100% | 100% | 100% | 100% |
|
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.impl;
|
|
16 |
|
|
17 |
import java.util.Iterator;
|
|
18 |
import java.util.List;
|
|
19 |
|
|
20 |
/**
|
|
21 |
* Startup service for HiveMind. This implementation uses the
|
|
22 |
* <code>hivemind.Startup</code> configuration point to start other
|
|
23 |
* services.
|
|
24 |
*
|
|
25 |
* @author Howard Lewis Ship
|
|
26 |
*/
|
|
27 |
public class StartupImpl extends BaseLocatable implements Runnable |
|
28 |
{ |
|
29 |
private List _runnables;
|
|
30 |
|
|
31 | 103 |
public void run() |
32 |
{ |
|
33 | 103 |
Iterator i = _runnables.iterator(); |
34 | 103 |
while (i.hasNext())
|
35 |
{ |
|
36 | 104 |
Runnable r = (Runnable) i.next(); |
37 |
|
|
38 | 104 |
r.run(); |
39 |
} |
|
40 |
} |
|
41 |
|
|
42 | 103 |
public void setRunnables(List list) |
43 |
{ |
|
44 | 103 |
_runnables = list; |
45 |
} |
|
46 |
|
|
47 |
} |
|
48 |
|
|