Table of Contents
This document provides all information to download, install, run and test the OpenORB Time Service.
The Time Service is specified to provide a way to define time concepts in the CORBA distributed environment. OpenORB Time is a fully compliant implementation of the OMG Time Service.
You need the OpenORB and the Event Service distributions to run the Time Service.
The Time Service distribution contains a Ant script. If you use the 'build.bat' ( for windows ) or 'build.sh' ( for unix ) all required dependencies and classpath are provided.
Thus, to compile the OpenORB Time Service, we advise you to enter the following from the command line: 'build.bat' or 'sh build.sh'
You will find the openorb_time-{version}.jar file in the dist directory.
You will find the openorb_time_examples-{version}.jar file in the dist directory.
This chapter explains how to install the Time Service. We remind you that OpenORB and OpenORB Event Service must be installed before proceeding to the next steps.
Table of Contents
The CORBA specification does not identify the TimeService as a resolvable object through an initial reference.
The TimeService can be retrieved by resolving the COS/TimeService/TimeService NamingService binding. This will return a reference to the org.omg.CosTime.TimeService interface.
The following code will resolve the TimeService:
org.omg.CORBA.Object obj = orb.string_to_object("corbaname:rir:#COS/TimeService/TimeService"); org.omg.CosTime.TimeService time = org.omg.CosTime.TimeServiceHelper.narrow( obj );
The TimerEventHandler can be retrieved by resolving the COS/TimeService/TimerEventHandler NamingService binding. This will return a reference to the org.omg.CosTimerEvent.TimerEventHandler interface.
The following code will resolve the TimerEventHandler:
org.omg.CORBA.Object obj = orb.string_to_object("corbaname:rir:#COS/TimeService/TimerEventHandler"); org.omg.CosTimerEvent.TimerEventHandler timer = org.omg.CosTimerEvent.TimerEventHandlerHelper.narrow( obj );