001: /*
002: * BEGIN_HEADER - DO NOT EDIT
003: *
004: * The contents of this file are subject to the terms
005: * of the Common Development and Distribution License
006: * (the "License"). You may not use this file except
007: * in compliance with the License.
008: *
009: * You can obtain a copy of the license at
010: * https://open-esb.dev.java.net/public/CDDLv1.0.html.
011: * See the License for the specific language governing
012: * permissions and limitations under the License.
013: *
014: * When distributing Covered Code, include this CDDL
015: * HEADER in each file and include the License file at
016: * https://open-esb.dev.java.net/public/CDDLv1.0.html.
017: * If applicable add the following below this CDDL HEADER,
018: * with the fields enclosed by brackets "[]" replaced with
019: * your own identifying information: Portions Copyright
020: * [year] [name of copyright owner]
021: */
022:
023: /*
024: * @(#)EventNotifierBase.java
025: * Copyright 2004-2007 Sun Microsystems, Inc. All Rights Reserved.
026: *
027: * END_HEADER - DO NOT EDIT
028: */
029: package com.sun.jbi;
030:
031: /**
032: * This interface defines enumerators and constants used for constructing
033: * event notifications that are emitted by the runtime.
034: *
035: * @author Mark S White
036: */
037: public interface EventNotifierBase {
038: /**
039: * Events that generate notifications.
040: */
041: enum EventType {
042: Installed, Upgraded, Uninstalled, Deployed, Undeployed, Ready, Started, Stopped, ShutDown
043: }
044:
045: /**
046: * Sources of notifications.
047: */
048: enum SourceType {
049: JBIRuntime, BindingComponent, ServiceEngine, SharedLibrary, ServiceUnit, ServiceAssembly
050: }
051:
052: /**
053: * Common prefix for all notification messages.
054: */
055: static final String JBI_PREFIX = "com.sun.jbi.";
056:
057: /**
058: * Notification types emitted by the runtime.
059: */
060: static final String[] NOTIFICATION_TYPES = {
061: JBI_PREFIX + EventType.Ready + "." + SourceType.JBIRuntime,
062: JBI_PREFIX + EventType.Started + "."
063: + SourceType.JBIRuntime,
064: JBI_PREFIX + EventType.Stopped + "."
065: + SourceType.JBIRuntime,
066: JBI_PREFIX + EventType.Installed + "."
067: + SourceType.SharedLibrary,
068: JBI_PREFIX + EventType.Uninstalled + "."
069: + SourceType.SharedLibrary,
070: JBI_PREFIX + EventType.Installed + "."
071: + SourceType.BindingComponent,
072: JBI_PREFIX + EventType.Started + "."
073: + SourceType.BindingComponent,
074: JBI_PREFIX + EventType.Stopped + "."
075: + SourceType.BindingComponent,
076: JBI_PREFIX + EventType.ShutDown + "."
077: + SourceType.BindingComponent,
078: JBI_PREFIX + EventType.Uninstalled + "."
079: + SourceType.BindingComponent,
080: JBI_PREFIX + EventType.Installed + "."
081: + SourceType.ServiceEngine,
082: JBI_PREFIX + EventType.Started + "."
083: + SourceType.ServiceEngine,
084: JBI_PREFIX + EventType.Stopped + "."
085: + SourceType.ServiceEngine,
086: JBI_PREFIX + EventType.ShutDown + "."
087: + SourceType.ServiceEngine,
088: JBI_PREFIX + EventType.Uninstalled + "."
089: + SourceType.ServiceEngine,
090: JBI_PREFIX + EventType.Deployed + "."
091: + SourceType.ServiceAssembly,
092: JBI_PREFIX + EventType.Started + "."
093: + SourceType.ServiceAssembly,
094: JBI_PREFIX + EventType.Stopped + "."
095: + SourceType.ServiceAssembly,
096: JBI_PREFIX + EventType.ShutDown + "."
097: + SourceType.ServiceAssembly,
098: JBI_PREFIX + EventType.Undeployed + "."
099: + SourceType.ServiceAssembly,
100: JBI_PREFIX + EventType.Deployed + "."
101: + SourceType.ServiceUnit,
102: JBI_PREFIX + EventType.Started + "."
103: + SourceType.ServiceUnit,
104: JBI_PREFIX + EventType.Stopped + "."
105: + SourceType.ServiceUnit,
106: JBI_PREFIX + EventType.ShutDown + "."
107: + SourceType.ServiceUnit,
108: JBI_PREFIX + EventType.Undeployed + "."
109: + SourceType.ServiceUnit };
110:
111: /**
112: * Class name for notifications emitted by the runtime.
113: */
114: static final String NOTIFICATION_CLASS_NAME = "javax.management.Notification";
115:
116: /**
117: * Desription for notifications emitted by the runtime.
118: */
119: static final String NOTIFICATION_DESCRIPTION = "JBI runtime event";
120: }
|