KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > ist > coach > coachEmfServicesComponents > AlarmChannelProviderComposition > objectDeletionSegImpl


1 /*====================================================================
2
3 This file was produced by the OpenCCM CIF_JIMPL generator.
4
5 OpenCCM: The Open CORBA Component Model Platform
6 Copyright (C) 2000-2003 INRIA - USTL - LIFL - GOAL
7 Contact: openccm@objectweb.org
8
9 This library is free software; you can redistribute it and/or
10 modify it under the terms of the GNU Lesser General Public
11 License as published by the Free Software Foundation; either
12 version 2.1 of the License, or any later version.
13
14 This library is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 Lesser General Public License for more details.
18
19 You should have received a copy of the GNU Lesser General Public
20 License along with this library; if not, write to the Free Software
21 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
22 USA
23
24 Initial developer(s): Christophe Demarey.
25 Contributor(s): ______________________________________.
26
27 ====================================================================*/

28
29 package ist.coach.coachEmfServicesComponents.AlarmChannelProviderComposition;
30 import ist.coach.coachEmfCommon.Utils;
31 import ist.coach.coachEmfServices.EmfBasicLog.*;
32
33 /**
34  * This is the CIDL-based implementation of the
35  * OMG IDL3 CIDL:coach.ist/coachEmfServicesComponents/AlarmChannelProviderComposition/AlarmChannelProviderHome_impl/AlarmChannelProvider_impl/objectDeletionSeg:1.0 segment type.
36  *
37  * @author OpenCCM CIF_Jimpl Compiler.
38  */

39 public class objectDeletionSegImpl
40      extends ist.coach.coachEmfServicesComponents.AlarmChannelProviderComposition.objectDeletionSeg
41 {
42     // ==================================================================
43
//
44
// Internal states.
45
//
46
// ==================================================================
47

48     // ==================================================================
49
//
50
// Constructors.
51
//
52
// ==================================================================
53

54     public objectDeletionSegImpl()
55     {
56     }
57
58     // ==================================================================
59
//
60
// Methods.
61
//
62
// ==================================================================
63

64     /**
65      * Implementation of the ::itut_q816Components::CCM_ObjectDeletionConsumer::push operation.
66      */

67     public void
68     push(ist.coach.itut_q816Components.ObjectDeletion event)
69     {
70        //
71
// DONE : implement
72
//
73
String JavaDoc[] excludedEventTypes = get_main_segment().excludedeventTypes();
74         for (int i = 0; i < excludedEventTypes.length; i++) {
75                 if (excludedEventTypes[i].equals("ObjectDeletion"))
76                     return;
77         }
78         String JavaDoc[] excludedEventSources = get_main_segment().excludedSourceClasses();
79         for (int i = 0; i < excludedEventSources.length; i++) {
80                 if (excludedEventSources[i].equals(event.sourceClass))
81                     return;
82         }
83         String JavaDoc[] eventTypes = get_main_segment().eventTypes();
84         boolean eventSupported = false;
85         for (int i = 0; i < eventTypes.length; i++) {
86                 if (eventTypes[i].equals("ObjectDeletion")) {
87                     eventSupported = true;
88                     break;
89                 }
90         }
91         if (! eventSupported) return;
92
93         String JavaDoc[] eventSources = get_main_segment().sourceClasses();
94         boolean eventSourceSupported = false;
95         for (int i = 0; i < eventSources.length; i++) {
96                 if (eventSources[i].equals(event.sourceClass)) {
97                     eventSourceSupported = true;
98                     break;
99                 }
100         }
101         if (!eventSourceSupported) return;
102         get_context().push_objectDeletion_alarm(event);
103         BasicLog logSupport = get_context().get_connection_basic_log();
104         Utils.pretty_log(logSupport, Utils.name2string(event.source),
105                 event.sourceClass,
106             (short) LogSeverity._Info,
107             "ObjectDeletion " + event.notificationIdentifier);
108     }
109 }
110
Popular Tags