KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > ist > coach > coachEmfClientComponents > ManagedObjectClientComposition > objectCreationSegImpl


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.coachEmfClientComponents.ManagedObjectClientComposition;
30
31 import java.text.DateFormat JavaDoc;
32 import ist.coach.coachEmfCommon.Utils;
33
34 /**
35  * This is the CIDL-based implementation of the
36  * OMG IDL3 CIDL:coach.ist/coachEmfClientComponents/ManagedObjectClientComposition/ManagedObjectClientHome_impl/ManagedObjectClient_impl/objectCreationSeg:1.0 segment type.
37  *
38  * @author OpenCCM CIF_Jimpl Compiler.
39  */

40 public class objectCreationSegImpl
41      extends ist.coach.coachEmfClientComponents.ManagedObjectClientComposition.objectCreationSeg
42 {
43     // ==================================================================
44
//
45
// Internal states.
46
//
47
// ==================================================================
48

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

55     public objectCreationSegImpl()
56     {
57
58     }
59
60     // ==================================================================
61
//
62
// Methods.
63
//
64
// ==================================================================
65

66     /**
67      * Implementation of the ::itut_q816Components::CCM_ObjectCreationConsumer::push operation.
68      */

69     public void
70     push(ist.coach.itut_q816Components.ObjectCreation event)
71     {
72     /*************************
73         System.err.println("---->ObjectCreation received: ");
74         System.err.println("Source Object Name = " + Utils.name2string(event.source));
75         System.err.println("Source Object Type = " + event.sourceClass);
76         System.err.println("Notification Id = " + String.valueOf(
77                     event.notificationIdentifier));
78         System.err.println("Time = " + String.valueOf(event.eventTime.time));
79 ********************************/

80         java.util.Date JavaDoc event_date = new java.util.Date JavaDoc(event.eventTime.time);
81         DateFormat JavaDoc df = DateFormat.getDateTimeInstance(DateFormat.DEFAULT, DateFormat.DEFAULT);
82         String JavaDoc time_str = df.format(event_date);
83
84         ManagedObjectClientImpl main_segment = (ManagedObjectClientImpl) get_main_segment();
85         main_segment.ui_client.print_alarm(time_str,
86                 ist.coach.coachEmfClientComponents.gui.GuiMessages.object_creation_alarm,
87                 Utils.name2string(event.source), event.sourceClass,
88                 String.valueOf(event.notificationIdentifier), " ");
89     }
90
91 }
92
Popular Tags