Package: OsgiFrameworkLogEvents

OsgiFrameworkLogEvents

nameinstructionbranchcomplexitylinemethod
OsgiFrameworkLogEvents(String, int, int, Level)
M: 28 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 3 C: 0
0%
M: 1 C: 0
0%
getEventCode()
M: 10 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
getLevel()
M: 10 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
static {...}
M: 64 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 6 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;
13:
14: import org.eclipse.virgo.nano.serviceability.LogEventDelegate;
15: import org.eclipse.virgo.medic.eventlog.Level;
16: import org.eclipse.virgo.medic.eventlog.LogEvent;
17:
18: /**
19: * {@link LogEvent} for the OSGi provisioning bundle.
20: * <p/>
21: *
22: * <strong>Concurrent Semantics</strong><br />
23: *
24: * Threadsafe.
25: *
26: */
27: public enum OsgiFrameworkLogEvents implements LogEvent {
28:
29: REGION_IMPORTS_PARSE_FAILED(1, Level.ERROR), //
30: REGION_IMPORT_NO_MATCH(2, Level.WARNING), //
31: // 3 has been moved to the user region bundle and is unused here.
32: // 4 has been moved to the user region bundle and is unused here.
33: USER_REGION_CONFIGURATION_UNAVAILABLE(10, Level.ERROR),
34: OSGI_CONSOLE_PORT(100, Level.INFO), //
35: OSGI_CONSOLE_PORT_IN_USE(101, Level.ERROR);
36:
37: private static final String PREFIX = "OF";
38:
39: private final LogEventDelegate delegate;
40:
41: private OsgiFrameworkLogEvents(int code, Level level) {
42: this.delegate = new LogEventDelegate(PREFIX, code, level);
43: }
44:
45: /**
46: * {@inheritDoc}
47: */
48: public String getEventCode() {
49: return this.delegate.getEventCode();
50: }
51:
52: /**
53: * {@inheritDoc}
54: */
55: public Level getLevel() {
56: return this.delegate.getLevel();
57: }
58: }