Package: ImmutableOsgiConfiguration

ImmutableOsgiConfiguration

nameinstructionbranchcomplexitylinemethod
ImmutableOsgiConfiguration(boolean, int)
M: 24 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 4 C: 0
0%
M: 1 C: 0
0%
getConsolePort()
M: 9 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
isConsoleEnabled()
M: 9 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%

Coverage

1: /*******************************************************************************
2: * Copyright (c) 2008, 2010 VMware Inc.
3: * All rights reserved. This program and the accompanying materials
4: * are made available under the terms of the Eclipse Public License v1.0
5: * which accompanies this distribution, and is available at
6: * http://www.eclipse.org/legal/epl-v10.html
7: *
8: * Contributors:
9: * VMware Inc. - initial contribution
10: *******************************************************************************/
11:
12: package org.eclipse.virgo.kernel.osgi.framework.support;
13:
14: import org.eclipse.virgo.kernel.osgi.framework.OsgiConfiguration;
15:
16: /**
17: * Abstract implementation of {@link OsgiConfiguration}.
18: *
19: * <strong>Concurrent Semantics</strong><br/>
20: *
21: * Thread-safe.
22: *
23: */
24: public final class ImmutableOsgiConfiguration implements OsgiConfiguration {
25:
26: private final boolean consoleEnabled;
27:
28: private final int consolePort;
29:
30: /**
31: * Creates a new <code>OsgiConfiguration</code> with the repository search paths.
32: * @param consoleEnabled whether console is enabled
33: * @param consolePort port number for console
34: */
35: public ImmutableOsgiConfiguration(boolean consoleEnabled, int consolePort) {
36: this.consoleEnabled = consoleEnabled;
37: this.consolePort = consolePort;
38: }
39:
40: /**
41: * {@inheritDoc}
42: */
43: public boolean isConsoleEnabled() {
44: return this.consoleEnabled;
45: }
46:
47: /**
48: * {@inheritDoc}
49: */
50: public int getConsolePort() {
51: return this.consolePort;
52: }
53: }