summaryrefslogtreecommitdiff
path: root/TAO/examples
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2017-08-31 12:15:35 +0200
committerJohnny Willemsen <jwillemsen@remedy.nl>2017-08-31 12:15:35 +0200
commit9770e4def8b689f87b820bb1a464fb1a516f798d (patch)
treeb4e34d5822dd9c80cbfb32e18974ab571ea10c50 /TAO/examples
parent764d3a74cf80e3a3d439347fbaaf9077b0f93d42 (diff)
downloadATCD-9770e4def8b689f87b820bb1a464fb1a516f798d.tar.gz
Removed left over Id tags
Diffstat (limited to 'TAO/examples')
-rw-r--r--TAO/examples/Advanced/TO-DO3
-rw-r--r--TAO/examples/Advanced/ch_12/CHANGES42
-rw-r--r--TAO/examples/Advanced/ch_18/CHANGES48
-rw-r--r--TAO/examples/Advanced/ch_21/CHANGES56
-rw-r--r--TAO/examples/Advanced/ch_3/CHANGES16
-rw-r--r--TAO/examples/Advanced/ch_8_and_10/CHANGES32
-rw-r--r--TAO/examples/RTCORBA/Activity/svc.conf.client6
-rw-r--r--TAO/examples/RTCORBA/Activity/svc.conf.server2
-rw-r--r--TAO/examples/RTScheduling/Fixed_Priority_Scheduler/svc.conf.client2
-rw-r--r--TAO/examples/RTScheduling/Fixed_Priority_Scheduler/svc.conf.server2
-rw-r--r--TAO/examples/RTScheduling/MIF_Scheduler/svc.conf.client2
-rw-r--r--TAO/examples/RTScheduling/MIF_Scheduler/svc.conf.server2
-rw-r--r--TAO/examples/Simulator/DOVEBrowser/PushConsumer.java.JDK1.280
-rw-r--r--TAO/examples/Simulator/DOVEBrowser/PushConsumerFactory.java.JDK1.286
14 files changed, 173 insertions, 206 deletions
diff --git a/TAO/examples/Advanced/TO-DO b/TAO/examples/Advanced/TO-DO
index 76d0b1fbc55..589c040573a 100644
--- a/TAO/examples/Advanced/TO-DO
+++ b/TAO/examples/Advanced/TO-DO
@@ -1,6 +1,3 @@
-$Id$
-______________________________________________________________________________
-
This is a 'To Do' list for the TAO versions of the Henning and Vinoski
examples ($TAO_ROOT/examples/Advanced). It is an ongoing effort to get
these examples working with TAO, 'out of the box' with as few changes as
diff --git a/TAO/examples/Advanced/ch_12/CHANGES b/TAO/examples/Advanced/ch_12/CHANGES
index 4a09d079b18..09c580e0afa 100644
--- a/TAO/examples/Advanced/ch_12/CHANGES
+++ b/TAO/examples/Advanced/ch_12/CHANGES
@@ -1,32 +1,30 @@
-$Id$
-
-Changelog for chapter 8 and 10 example in "Advanced CORBA
-Programming with C++" by Michi Henning and Steve Vinoski,
-Copyright 1999, Addison-Wesley, Reading, MA. The following
-changes have been made to the book's source code to make the
+Changelog for chapter 8 and 10 example in "Advanced CORBA
+Programming with C++" by Michi Henning and Steve Vinoski,
+Copyright 1999, Addison-Wesley, Reading, MA. The following
+changes have been made to the book's source code to make the
example work with TAO and with various platforms and compilers.
_______________________________________________________________________________
ESSENTIAL CHANGES:
- 1. Changed filename extensions from .hh and .cc to .h
+ 1. Changed filename extensions from .hh and .cc to .h
and .cpp, and made all necessary changes in file content.
2. a) Commented-out "#include <corba/poaS.h>" in server.h
-
+
b) Added #include "icp.h" to server.h.
-
+
c) Unnecessary standard includes of <iostreams.h>, <assert.h>,
- <fstream.h> and <stdlib.h> must be removed or moved to follow the
+ <fstream.h> and <stdlib.h> must be removed or moved to follow the
local includes in server.h, server.cpp, client.cpp, and icp.cpp.
- d) The following files may need their includes further rearranged
- to avoid warnings and errors (g++). The following orderings
- seem to work fine:
- - server.cpp: "server.h", <algorithm>, "icp.h", <strstream.h>
+ d) The following files may need their includes further rearranged
+ to avoid warnings and errors (g++). The following orderings
+ seem to work fine:
+ - server.cpp: "server.h", <algorithm>, "icp.h", <strstream.h>
- server.h: "CCSS.h", "icp.h", <map>, <list>
- 3. Added CORBA_Environment variable to
- DeviceLocator::preinvoke() and ::postinvoke()
+ 3. Added CORBA_Environment variable to
+ DeviceLocator::preinvoke() and ::postinvoke()
in server.h and server.cpp to match the signatures of parent
methods in TAO's ServanLocator class.
@@ -34,18 +32,18 @@ ESSENTIAL CHANGES:
operator<<(ostream & os, const CCS::Controller::EChange & ec)
definition in server.cpp and client.cpp.
- 5. commented-out "delete this;" from method
+ 5. commented-out "delete this;" from method
Thermometer_impl::remove() in server.cpp.
(Change should soon be reflected in authors' code)
_______________________________________________________________________________
ADDITIONAL CHANGES:
6. Added .in() to _var parameters wherever needed:
- -client.cpp:
+ -client.cpp:
4 times in operator<<(ostream, CCS::Thermometer_ptr)
6 times in main(). 5 are is_nil(), 1 is _narrow()
2 additions in main() of .inout to _var parameters to set_temp(..).
- -server.cpp,
+ -server.cpp,
2 changes in make_dref()
2 changes in Controller_impl::Controller_impl()
4 changes in Controller_impl::~Controller_impl()
@@ -56,10 +54,10 @@ ADDITIONAL CHANGES:
7 changes in main()
7. created needed file at /tmp/CCS_DB. (location is hard-coded)
- To run, move CCS_DB from this directory to /tmp on the
+ To run, move CCS_DB from this directory to /tmp on the
local machine.
- 8. fixed warnings by commented out unused parameters in
+ 8. fixed warnings by commented out unused parameters in
-DeviceLocator_impl::postinvoke(..) in server.h
-DeviceLocator_impl::preinvoke(..) in server.cpp
@@ -72,7 +70,7 @@ ADDITIONAL CHANGES:
______________________________________________________________________________
To Do:
- - fix error on 2 cases of fstream.close()
+ - fix error on 2 cases of fstream.close()
in server.cpp and icp.cpp
diff --git a/TAO/examples/Advanced/ch_18/CHANGES b/TAO/examples/Advanced/ch_18/CHANGES
index 404883d09de..b729befa84a 100644
--- a/TAO/examples/Advanced/ch_18/CHANGES
+++ b/TAO/examples/Advanced/ch_18/CHANGES
@@ -1,36 +1,34 @@
-$Id$
-
-Changelog for chapter 8 and 10 example in "Advanced CORBA
-Programming with C++" by Michi Henning and Steve Vinoski,
-Copyright 1999, Addison-Wesley, Reading, MA. The following
-changes have been made to the book's source code to make the
+Changelog for chapter 8 and 10 example in "Advanced CORBA
+Programming with C++" by Michi Henning and Steve Vinoski,
+Copyright 1999, Addison-Wesley, Reading, MA. The following
+changes have been made to the book's source code to make the
example work with TAO and with various platforms and compilers.
_______________________________________________________________________________
ESSENTIAL CHANGES:
- 1. Changed filename extensions from .hh and .cc to .h
+ 1. Changed filename extensions from .hh and .cc to .h
and .cpp, and made all necessary changes in file content.
2. a) Commented-out "#include <corba/poaS.h>" in server.h
-
+
b) Added #include "icp.h" to server.h.
-
+
c) changed #include <CosNaming.h> to <orbsvcs/CosNamingC.h>
in server.cpp and client.cpp
d) Unnecessary standard includes of <iostreams.h>, <assert.h>,
- <fstream.h> and <stdlib.h> must be removed or moved to follow the
+ <fstream.h> and <stdlib.h> must be removed or moved to follow the
local includes in server.h, server.cpp, client.cpp, and icp.cpp.
-
- e) The following files may need their includes further rearranged
- to avoid warnings and errors (g++). The following orderings
- seem to work fine:
- - server.cpp: "server.h", <algorithm>, "icp.h",
- <orbsvcs/CosNamingC.h>, <strstream.h>
+
+ e) The following files may need their includes further rearranged
+ to avoid warnings and errors (g++). The following orderings
+ seem to work fine:
+ - server.cpp: "server.h", <algorithm>, "icp.h",
+ <orbsvcs/CosNamingC.h>, <strstream.h>
- server.h: "CCSS.h", "icp.h", <map>, <list>
- 3. Added CORBA_Environment variable to
- DeviceLocator::preinvoke() and ::postinvoke()
+ 3. Added CORBA_Environment variable to
+ DeviceLocator::preinvoke() and ::postinvoke()
in server.h and server.cpp to match the signatures of parent
methods in TAO's ServanLocator class.
@@ -38,20 +36,20 @@ ESSENTIAL CHANGES:
operator<<(ostream & os, const CCS::Controller::EChange & ec)
definition in server.cpp and client.cpp.
- 5. commented-out "delete this;" from method
+ 5. commented-out "delete this;" from method
Thermometer_impl::remove() in server.cpp.
(Change should soon be reflected in authors' code)
_______________________________________________________________________________
ADDITIONAL CHANGES:
6. Added .in() to _var parameters wherever needed:
- -client.cpp:
+ -client.cpp:
4 times in operator<<(ostream, CCS::Thermometer_ptr)
3 times in resolve_init()
- 3 times in resolve_name()
+ 3 times in resolve_name()
5 times in main()
Also added .inout() 2 times in main() for parameters to set_temp()
-
+
-server.cpp:
3 changes in resolve_init()
2 changes in make_dref()
@@ -64,10 +62,10 @@ ADDITIONAL CHANGES:
7 change in main()
7. created needed file at /tmp/CCS_DB. (location is hard-coded)
- To run, move CCS_DB from this directory to /tmp on the
+ To run, move CCS_DB from this directory to /tmp on the
local machine.
- 8. fixed warnings by commented out unused parameters in
+ 8. fixed warnings by commented out unused parameters in
-DeviceLocator_impl::postinvoke(..) in server.h
-DeviceLocator_impl::preinvoke(..) in server.cpp
@@ -79,7 +77,7 @@ ADDITIONAL CHANGES:
_______________________________________________________________________________
To Do:
- - fix error on 4 cases of fstream.close()
+ - fix error on 4 cases of fstream.close()
in server.cpp and icp.cpp, now commented-out
diff --git a/TAO/examples/Advanced/ch_21/CHANGES b/TAO/examples/Advanced/ch_21/CHANGES
index 97a72853ed8..ec79d72c2d7 100644
--- a/TAO/examples/Advanced/ch_21/CHANGES
+++ b/TAO/examples/Advanced/ch_21/CHANGES
@@ -1,36 +1,34 @@
-$Id$
-
-Changelog for chapter 8 and 10 example in "Advanced CORBA
-Programming with C++" by Michi Henning and Steve Vinoski,
-Copyright 1999, Addison-Wesley, Reading, MA. The following
-changes have been made to the book's source code to make the
+Changelog for chapter 8 and 10 example in "Advanced CORBA
+Programming with C++" by Michi Henning and Steve Vinoski,
+Copyright 1999, Addison-Wesley, Reading, MA. The following
+changes have been made to the book's source code to make the
example work with TAO and with various platforms and compilers.
______________________________________________________________________________
ESSENTIAL CHANGES:
- 1. Changed filename extensions from .hh and .cc to .h
+ 1. Changed filename extensions from .hh and .cc to .h
and .cpp, and made all necessary changes in file content.
2. a) Commented-out "#include <corba/poaS.h>" in server.h
-
+
b) Added #include "icp.h" to server.h.
-
+
c) Unnecessary includes of <iostreams.h>, <assert.h>,
- <fstream.h> and <stdlib.h> must be removed or moved to
- follow all other includes in server.h, server.cpp,
+ <fstream.h> and <stdlib.h> must be removed or moved to
+ follow all other includes in server.h, server.cpp,
client.cpp, and icp.cpp.
-
- d) The following files may need their includes further rearranged
- to avoid warnings and errors (g++). The following orderings
- seem to work fine:
- - server.cpp: "server.h", <algorithm>, "icp.h",
- <strstream.h>
+
+ d) The following files may need their includes further rearranged
+ to avoid warnings and errors (g++). The following orderings
+ seem to work fine:
+ - server.cpp: "server.h", <algorithm>, "icp.h",
+ <strstream.h>
- server.h: "CCSS.h", "icp.h",<ace/Synch_T.h>, <map>,
set, <list>
- icp.cpp: <string>, <map>, <algorithm>, <stdlib.h>,
- "icp.h"
+ "icp.h"
- 3. Added CORBA_Environment variable to
- DeviceLocator::preinvoke() and ::postinvoke()
+ 3. Added CORBA_Environment variable to
+ DeviceLocator::preinvoke() and ::postinvoke()
in server.h and server.cpp to match the signatures of parent
methods in TAO's ServantLocator class.
@@ -38,23 +36,23 @@ ESSENTIAL CHANGES:
operator<<(ostream & os, const CCS::Controller::EChange & ec)
definition in server.cpp and client.cpp.
- 5. commented-out "delete this;" from method
+ 5. commented-out "delete this;" from method
Thermometer_impl::remove() in server.cpp.
(Change should soon be reflected in authors' code)
6. member initializers reordeder in Thermometer_impl::
- Thermometer_impl() in server.cpp to match the declaration order
- in server.h
+ Thermometer_impl() in server.cpp to match the declaration order
+ in server.h
______________________________________________________________________________
ADDITIONAL CHANGES:
7. Added .in() to _var parameters wherever needed:
- -client.cpp:
+ -client.cpp:
4 times in operator<<(ostream, CCS::Thermometer_ptr)
6 times in main(). 5 are is_nil(), 1 is _narrow()
- 2 times added .inout() to _var parameters in main() for calls
+ 2 times added .inout() to _var parameters in main() for calls
to set_tmp(..)
- -server.cpp,
+ -server.cpp,
2 changes in make_dref()
3 changes in Controller_impl::Controller_impl()
4 changes in Controller_impl::~Controller_impl()
@@ -65,10 +63,10 @@ ADDITIONAL CHANGES:
7 changes in main()
8. created needed file at /tmp/CCS_DB. (location is hard-coded)
- To run, move CCS_DB from this directory to /tmp on the
+ To run, move CCS_DB from this directory to /tmp on the
local machine.
- 9. fixed warnings by commented out unused parameters in
+ 9. fixed warnings by commented out unused parameters in
-DeviceLocator_impl::postinvoke(..) in server.h
-DeviceLocator_impl::preinvoke(..) in server.cpp
@@ -80,7 +78,7 @@ ADDITIONAL CHANGES:
______________________________________________________________________________
To Do:
- - fix error on 2 cases of fstream.close()
+ - fix error on 2 cases of fstream.close()
in server.cpp and icp.cpp
____________________________________________________________
diff --git a/TAO/examples/Advanced/ch_3/CHANGES b/TAO/examples/Advanced/ch_3/CHANGES
index 4185ef533a8..3ac18b3e7a0 100644
--- a/TAO/examples/Advanced/ch_3/CHANGES
+++ b/TAO/examples/Advanced/ch_3/CHANGES
@@ -1,19 +1,17 @@
-$Id$
-
-Changelog for chapter 3 example in "Advanced CORBA Programming
-with C++" by Michi Henning and Steve Vinoski, Copyright 1999,
+Changelog for chapter 3 example in "Advanced CORBA Programming
+with C++" by Michi Henning and Steve Vinoski, Copyright 1999,
Addison-Wesley, Reading, MA. The following changes have been made
-to the book's source code to make the example work with TAO and
+to the book's source code to make the example work with TAO and
with various platforms and compilers.
______________________________________________________________________________
ESSENTIAL CHANGES:
- 1. changed filenames .cc to .cpp and .hh h, and modified #includes in
+ 1. changed filenames .cc to .cpp and .hh h, and modified #includes in
client.cpp server.cpp and server.h appropriately.
2. a) changed #include "time.h" to #include "timeC.h" in client.cpp
- b) Moved standard #includes below local #includes, and commented-out
+ b) Moved standard #includes below local #includes, and commented-out
unnecessary #includes to avoid warnings and errors (g++)
-client.cpp now reads:
#include "timeC.h"
@@ -26,9 +24,9 @@ ESSENTIAL CHANGES:
______________________________________________________________________________
ADDITIONAL CHANGES:
- 3. added .in() to _var type parameters
+ 3. added .in() to _var type parameters
-3 times in client.cpp for calls to is_nil() and _narrow()
- -3 times in main() in server.cpp for calls to _narrow(),
+ -3 times in main() in server.cpp for calls to _narrow(),
object_to_string, and <<
diff --git a/TAO/examples/Advanced/ch_8_and_10/CHANGES b/TAO/examples/Advanced/ch_8_and_10/CHANGES
index b1454a1983d..2e01836d490 100644
--- a/TAO/examples/Advanced/ch_8_and_10/CHANGES
+++ b/TAO/examples/Advanced/ch_8_and_10/CHANGES
@@ -1,23 +1,21 @@
-$Id$
-
-Changelog for chapter 8 and 10 example in "Advanced CORBA
-Programming with C++" by Michi Henning and Steve Vinoski,
-Copyright 1999, Addison-Wesley, Reading, MA. The following
-changes have been made to the book's source code to make the
+Changelog for chapter 8 and 10 example in "Advanced CORBA
+Programming with C++" by Michi Henning and Steve Vinoski,
+Copyright 1999, Addison-Wesley, Reading, MA. The following
+changes have been made to the book's source code to make the
example work with TAO and with various platforms and compilers.
_______________________________________________________________________________
ESSENTIAL CHANGES:
- 1. Changed filenames from .cc to .cpp and .hh to.h,
+ 1. Changed filenames from .cc to .cpp and .hh to.h,
and modified #includes appropriatly
- 2. a) Unnecessary standard includes of <iostreams.h> and <assert.h> must
+ 2. a) Unnecessary standard includes of <iostreams.h> and <assert.h> must
be removed or moved to follow the local includes in
server.h, server.cpp, client.cpp, and icp.cpp.
-
- b) The following files may need their includes further rearranged
- to avoid warnings and errors (g++). The following orderings
- seem to work fine:
+
+ b) The following files may need their includes further rearranged
+ to avoid warnings and errors (g++). The following orderings
+ seem to work fine:
-server.cpp: "server.h", <algorithm>, "icp.h"
-server.h: "CCSS.h", <map>
@@ -28,15 +26,15 @@ ESSENTIAL CHANGES:
_______________________________________________________________________________
ADDITIONAL CHANGES:
4. Added .in() to _var parameters wherever needed:
- -client.cpp:
+ -client.cpp:
-4 changes in operator<<(ostream & os, CCS::Thermometer_ptr t)
-6 changes in main(): 5 calls to is_nil(), 1 call to _narrow
- -2 additions in main() of .inout() to _var parameters of set_temp().
+ -2 additions in main() of .inout() to _var parameters of set_temp().
Note: .inout() is functionally the same as .in() in this case
-
- -server.cpp:
+
+ -server.cpp:
3 changes in main()
-
+
_______________________________________________________________________________
TO DO:
-discrepancy in temperatures in my output vs. sample output
diff --git a/TAO/examples/RTCORBA/Activity/svc.conf.client b/TAO/examples/RTCORBA/Activity/svc.conf.client
index 89ae701d721..d1596c2752b 100644
--- a/TAO/examples/RTCORBA/Activity/svc.conf.client
+++ b/TAO/examples/RTCORBA/Activity/svc.conf.client
@@ -1,14 +1,8 @@
-# $Id$
-
# -- E X A M P L E conf. file --
# Note! priority values are for Linux
-
-
static RT_ORB_Loader "-ORBSchedPolicy SCHED_RR -ORBScopePolicy PROCESS -ORBPriorityMapping direct"
-
-
static Builder "-TaskCount 2 -ThreadTask -JobName job_10 -Priority 10 -Period 1 -ExecTime 10000 -Phase 0 -Iter 20 -Load 1000 -ThreadTask -JobName job_80 -Priority 80 -Period 1 -ExecTime 10000 -Phase 0 -Iter 20 -Load 1000"
diff --git a/TAO/examples/RTCORBA/Activity/svc.conf.server b/TAO/examples/RTCORBA/Activity/svc.conf.server
index 20de7d0b1d7..f5944646c05 100644
--- a/TAO/examples/RTCORBA/Activity/svc.conf.server
+++ b/TAO/examples/RTCORBA/Activity/svc.conf.server
@@ -1,5 +1,3 @@
-# $Id$
-
# -- E X A M P L E conf. file --
# Note! priority values are for Linux
diff --git a/TAO/examples/RTScheduling/Fixed_Priority_Scheduler/svc.conf.client b/TAO/examples/RTScheduling/Fixed_Priority_Scheduler/svc.conf.client
index 0071cce9b32..f16ccd6fcd0 100644
--- a/TAO/examples/RTScheduling/Fixed_Priority_Scheduler/svc.conf.client
+++ b/TAO/examples/RTScheduling/Fixed_Priority_Scheduler/svc.conf.client
@@ -1,5 +1,3 @@
-# $Id$
-
# -- E X A M P L E conf. file --
# Note! priority values are for Linux
diff --git a/TAO/examples/RTScheduling/Fixed_Priority_Scheduler/svc.conf.server b/TAO/examples/RTScheduling/Fixed_Priority_Scheduler/svc.conf.server
index 9a1afac76d6..baee8854a83 100644
--- a/TAO/examples/RTScheduling/Fixed_Priority_Scheduler/svc.conf.server
+++ b/TAO/examples/RTScheduling/Fixed_Priority_Scheduler/svc.conf.server
@@ -1,5 +1,3 @@
-# $Id$
-
# -- E X A M P L E conf. file --
# Note! priority values are for Linux
diff --git a/TAO/examples/RTScheduling/MIF_Scheduler/svc.conf.client b/TAO/examples/RTScheduling/MIF_Scheduler/svc.conf.client
index fffd9361166..90735c209d1 100644
--- a/TAO/examples/RTScheduling/MIF_Scheduler/svc.conf.client
+++ b/TAO/examples/RTScheduling/MIF_Scheduler/svc.conf.client
@@ -1,5 +1,3 @@
-# $Id$
-
# -- E X A M P L E conf. file --
# Note! priority values are for Linux
diff --git a/TAO/examples/RTScheduling/MIF_Scheduler/svc.conf.server b/TAO/examples/RTScheduling/MIF_Scheduler/svc.conf.server
index 20d54c64778..97bcc0114a0 100644
--- a/TAO/examples/RTScheduling/MIF_Scheduler/svc.conf.server
+++ b/TAO/examples/RTScheduling/MIF_Scheduler/svc.conf.server
@@ -1,5 +1,3 @@
-# $Id$
-
# -- E X A M P L E conf. file --
# Note! priority values are for Linux
diff --git a/TAO/examples/Simulator/DOVEBrowser/PushConsumer.java.JDK1.2 b/TAO/examples/Simulator/DOVEBrowser/PushConsumer.java.JDK1.2
index 49a665569c3..53e611055a5 100644
--- a/TAO/examples/Simulator/DOVEBrowser/PushConsumer.java.JDK1.2
+++ b/TAO/examples/Simulator/DOVEBrowser/PushConsumer.java.JDK1.2
@@ -1,8 +1,6 @@
-// $Id$
-//
// ============================================================================
//
-//
+//
// = FILENAME
// PushConsumer.java
//
@@ -12,14 +10,14 @@
// = DESCRIPTION
// This is a Push Consumer which takes the data field of the
// event and updates with it a Data Handler.
-//
+//
//
// ============================================================================
public class PushConsumer extends RtecEventComm._PushConsumerImplBase
{
-
+
public static final int ACE_ES_EVENT_ANY = 0;
public static final int ACE_ES_EVENT_SHUTDOWN = 1;
public static final int ACE_ES_EVENT_ACT = 2;
@@ -41,22 +39,22 @@ public class PushConsumer extends RtecEventComm._PushConsumerImplBase
private RtecEventChannelAdmin.EventChannel channel_admin_;
private RtecEventChannelAdmin.ConsumerAdmin consumer_admin_;
private RtecEventChannelAdmin.ProxyPushSupplier suppliers_;
-
+
public PushConsumer (org.omg.CORBA.ORB orb, DataHandler dataHandler)
{
orb_ = orb;
dataHandler_ = dataHandler;
}
-
-
+
+
public void push (RtecEventComm.Event[] events)
{
- if (total_received_ < 5)
+ if (total_received_ < 5)
System.out.println ("Demo Consumer: Received an event! ->Number: " + total_received_);
else if (total_received_ == 5)
System.out.println ("Demo Consumer: Everything is fine. Going to be mute.");
-
-
+
+
if (events.length == 0)
{
System.err.println ("No events");
@@ -64,81 +62,81 @@ public class PushConsumer extends RtecEventComm._PushConsumerImplBase
else
{
total_received_++;
-
+
for (int i = 0; i < events.length; ++i)
{
- if(events[i].type_ == ACE_ES_EVENT_NOTIFICATION)
+ if(events[i].type_ == ACE_ES_EVENT_NOTIFICATION)
{
try
{
dataHandler_.update (events[i].data_.any_value);
}
- catch(org.omg.CORBA.SystemException e)
+ catch(org.omg.CORBA.SystemException e)
{
System.err.println(e);
}
- }
+ }
}
}
}
-
- public void disconnect_push_consumer()
+
+ public void disconnect_push_consumer()
{
System.out.println ("Demo Consumer: Have to disconnect!");
}
-
+
public void open_consumer (RtecEventChannelAdmin.EventChannel event_channel,
RtecScheduler.Scheduler scheduler,
String name)
{
-
- try
+
+ try
{
-
+
// Define Real-time information
-
+
rt_info_ = scheduler.create (name);
-
+
scheduler.set (rt_info_,
RtecScheduler.Criticality.VERY_LOW_CRITICALITY,
- new TimeBase.ulonglong (0,0),
+ new TimeBase.ulonglong (0,0),
new TimeBase.ulonglong (0,0),
new TimeBase.ulonglong (0,0),
2500000, // period
RtecScheduler.Importance.VERY_LOW_IMPORTANCE,
new TimeBase.ulonglong (0,0),
1,
- RtecScheduler.Info_Type.OPERATION);
-
+ RtecScheduler.Info_Type.OPERATION);
+
// Register for Notification and Shutdown events
- RtecEventComm.Event notification_event =
- new RtecEventComm.Event (ACE_ES_EVENT_NOTIFICATION, 0,
+ RtecEventComm.Event notification_event =
+ new RtecEventComm.Event (ACE_ES_EVENT_NOTIFICATION, 0,
1, // ttl
new TimeBase.ulonglong (0,0),
new TimeBase.ulonglong (0,0),
new TimeBase.ulonglong (0,0),
new RtecEventComm.EventData (orb_.create_any ()));
-
- RtecEventChannelAdmin.Dependency dependencies[] = new RtecEventChannelAdmin.Dependency[1];
+
+ RtecEventChannelAdmin.Dependency dependencies[] = new RtecEventChannelAdmin.Dependency[1];
dependencies[0] = new RtecEventChannelAdmin.Dependency (notification_event, rt_info_);
-
+
RtecEventChannelAdmin.ConsumerQOS qos = new RtecEventChannelAdmin.ConsumerQOS (dependencies,
- false);
-
+ false);
+
// The channel administrator is the event channel we got from the invocation
// of this routine
channel_admin_ = event_channel;
-
+
// Connect as a consumer
consumer_admin_ = channel_admin_.for_consumers ();
-
+
// Obtain a reference to the proxy push supplier
suppliers_ = consumer_admin_.obtain_push_supplier ();
-
+
suppliers_.connect_push_consumer (this, qos);
-
+
System.out.println ("Registered the consumer successfully.");
-
+
}
catch (RtecEventChannelAdmin.TypeError e)
{
@@ -161,11 +159,11 @@ public class PushConsumer extends RtecEventComm._PushConsumerImplBase
System.err.println ("Demo_Consumer.open_consumer: Duplicate names");
System.err.println (e);
}
- catch(org.omg.CORBA.SystemException e)
+ catch(org.omg.CORBA.SystemException e)
{
System.err.println(e);
- }
- }
+ }
+ }
}
diff --git a/TAO/examples/Simulator/DOVEBrowser/PushConsumerFactory.java.JDK1.2 b/TAO/examples/Simulator/DOVEBrowser/PushConsumerFactory.java.JDK1.2
index b6039ee72d9..b718b984a7f 100644
--- a/TAO/examples/Simulator/DOVEBrowser/PushConsumerFactory.java.JDK1.2
+++ b/TAO/examples/Simulator/DOVEBrowser/PushConsumerFactory.java.JDK1.2
@@ -1,7 +1,5 @@
-// $Id$
-//
// ============================================================================
-//
+//
// = FILENAME
// PushConsumerFactory.java
//
@@ -14,24 +12,24 @@
// ============================================================================
-public class PushConsumerFactory
+public class PushConsumerFactory
{
-
+
private org.omg.CORBA.ORB orb_;
private org.omg.CORBA.Object naming_service_object_;
private DataHandler dataHandler_;
private Navigation navigation_;
private Weapons weapons_;
-
-
- public PushConsumerFactory (DataHandler dataHandler,
- String nameServiceIOR,
+
+
+ public PushConsumerFactory (DataHandler dataHandler,
+ String nameServiceIOR,
String[] args,
java.applet.Applet applet)
{
- try {
+ try {
dataHandler_ = dataHandler;
-
+
// if the DOVE Browser is running as an Applet
if (applet != null) {
orb_ = org.omg.CORBA.ORB.init (applet, null);
@@ -39,16 +37,16 @@ public class PushConsumerFactory
else { // not running as an Applet, but as an normal Application
orb_ = org.omg.CORBA.ORB.init (args, null);
}
-
+
// Get the Naming Service initial reference
-
+
// Name Service Lookup cannot be used when running as an Applet
if (nameServiceIOR == null && applet != null) {
System.out.println (" Name Service Lookup cannot be used when running as an Applet! Quit!");
System.exit (1);
}
-
- if (nameServiceIOR == null) { // only used when running via "java" or "vbj"
+
+ if (nameServiceIOR == null) { // only used when running via "java" or "vbj"
System.out.println ("Using the lookup protocol!");
NS_Resolve ns_resolve = new NS_Resolve ();
naming_service_object_ = ns_resolve.resolve_name_service (orb_);
@@ -57,33 +55,33 @@ public class PushConsumerFactory
System.out.println ("Using the following IOR: " + nameServiceIOR);
naming_service_object_ = orb_.string_to_object (nameServiceIOR);
}
-
- }
+
+ }
catch(org.omg.CORBA.SystemException e) {
System.err.println ("PushConsumerFactory constructor: ORB and Name Service initialization");
System.err.println(e);
- }
-
+ }
+
}
-
- public class Object_is_null_exception extends Exception
+
+ public class Object_is_null_exception extends Exception
{
Object_is_null_exception (String s)
{
super (s);
}
}
-
+
public void run ()
{
try
{
-
+
// Get the Naming Context to allow resolving the EventService and
// ScheduleService
- CosNaming.NamingContext naming_context =
+ CosNaming.NamingContext naming_context =
CosNaming.NamingContextHelper.narrow (naming_service_object_);
-
+
if (naming_context == null)
{
System.err.println ("The Naming Context is null");
@@ -101,8 +99,8 @@ public class PushConsumerFactory
{
throw new Object_is_null_exception("EventService Object is null");
}
-
- RtecEventChannelAdmin.EventChannel event_channel =
+
+ RtecEventChannelAdmin.EventChannel event_channel =
RtecEventChannelAdmin.EventChannelHelper.narrow (event_channel_object);
System.out.println ("Reference to the Event Service is ok.");
@@ -111,39 +109,39 @@ public class PushConsumerFactory
CosNaming.NameComponent[] s_name_components = new CosNaming.NameComponent[1];
s_name_components[0] = new CosNaming.NameComponent ("ScheduleService","");
- org.omg.CORBA.Object scheduler_object = naming_context.resolve (s_name_components);
-
+ org.omg.CORBA.Object scheduler_object = naming_context.resolve (s_name_components);
+
if (scheduler_object == null)
{
throw new Object_is_null_exception("ScheduleService Object is null");
}
-
- RtecScheduler.Scheduler scheduler =
+
+ RtecScheduler.Scheduler scheduler =
RtecScheduler.SchedulerHelper.narrow (scheduler_object);
-
+
System.out.println ("Reference to the Naming Service is ok.");
-
-
+
+
// Start the consumer
System.out.println ("Instantiating the Push Consumer.");
PushConsumer pushConsumer = new PushConsumer (orb_, dataHandler_);
System.out.println ("Initializing the Push Consumer.");
pushConsumer.open_consumer (event_channel, scheduler, "demo_consumer");
-
+
// Tell the CORBA environment that we are ready
-
+
orb_.connect (pushConsumer);
-
- System.out.println ("Going into the event dispatching loop.");
-
+ System.out.println ("Going into the event dispatching loop.");
+
+
java.lang.Object sync = new java.lang.Object();
synchronized (sync) {
sync.wait();
}
}
catch (java.lang.InterruptedException e)
- {
+ {
}
catch (CosNaming.NamingContextPackage.CannotProceed e)
{
@@ -158,18 +156,18 @@ public class PushConsumerFactory
catch (CosNaming.NamingContextPackage.NotFound e)
{
System.err.println ("CosNaming.NamingContextPackage.NotFound");
- System.err.println (e);
+ System.err.println (e);
}
catch (Object_is_null_exception e)
{
System.err.println (e);
}
- catch(org.omg.CORBA.SystemException e)
+ catch(org.omg.CORBA.SystemException e)
{
System.err.println ("PushConsumerFactory.run: Failure");
System.err.println(e);
- }
- }
+ }
+ }
} // public class PushConsumerFactory