Package org.omg.TimeBase

Examples of org.omg.TimeBase.UtcT


        // Compute the deadlines for this request based on any absolute or
        // relative timing policies that have been specified.  Compute this
        // now, because it is the earliest possible time, and therefore any
        // relative timeouts will cover the entire invocation.

        UtcT requestEndTime = getRequestEndTime();
        long requestTimeout = getRelativeRequestTimeout();

        if ((requestTimeout != 0) || (requestEndTime != null)) {
            requestEndTime = Time.earliest(Time.corbaFuture (requestTimeout),
                                           requestEndTime);
            if (Time.hasPassed(requestEndTime))
                throw new TIMEOUT("Request End Time exceeded prior to invocation",
                                  0, CompletionStatus.COMPLETED_NO);
        }

        UtcT replyEndTime     = getReplyEndTime();
        long roundtripTimeout = getRelativeRoundtripTimeout();

        if ((roundtripTimeout != 0) || (replyEndTime != null)) {
            replyEndTime = Time.earliest(Time.corbaFuture (roundtripTimeout),
                                         replyEndTime);
View Full Code Here


    public void testVariableCurtime() throws Exception
    {
        runEvaluation(testPerson_, "$curtime._repos_id == 'IDL:omg.org/TimeBase/UtcT:1.0'");

        Any _timeAny = getORB().create_any();
        UtcT _time = org.jacorb.util.Time.corbaTime();
        UtcTHelper.insert(_timeAny, _time);

        runEvaluation(_timeAny, "$curtime._repos_id == $._repos_id");
        runEvaluation(_timeAny, "$.time <= $curtime.time");
        runEvaluation(_timeAny, "$.time + 1 >= $.time");
View Full Code Here

        structuredEvent_.header.variable_header = new Property[1];

        Date _now = new Date();

        Any _startTimeAny = getORB().create_any();
        UtcT _startTime = Time.corbaTime(_now);
        UtcTHelper.insert(_startTimeAny, _startTime);

        structuredEvent_.header.variable_header[0] = new Property(StartTime.value, _startTimeAny);

        Message _event = messageFactory_.newMessage(structuredEvent_, proxyConsumerMock_);
View Full Code Here

     * Converts the given unixTime into a CORBA UtcT.
     * @param unixTime the number of milliseconds since 1970/01/01 00:00 UTC.
     */
    public static UtcT corbaTime(long unixTime)
    {
        UtcT result = new UtcT();

        result.time = (unixTime * 10000) + UNIX_OFFSET;

        // unixTime is always UTC.
        // Therefore, no time zone offset.
View Full Code Here

        if (corbaUnits < 0)
        {
            return null;
        }

        UtcT result = corbaTime();
        result.time = result.time + corbaUnits;
        return result;
    }
View Full Code Here

        // Compute the deadlines for this request based on any absolute or
        // relative timing policies that have been specified.  Compute this
        // now, because it is the earliest possible time, and therefore any
        // relative timeouts will cover the entire invocation.

        UtcT requestEndTime = getRequestEndTime();
        long requestTimeout = getRelativeRequestTimeout();

        if ((requestTimeout != 0) || (requestEndTime != null))
        {
            requestEndTime = Time.earliest(Time.corbaFuture (requestTimeout),
                                           requestEndTime);
            if (Time.hasPassed(requestEndTime))
            {
                throw new TIMEOUT("Request End Time exceeded prior to invocation",
                                  0, CompletionStatus.COMPLETED_NO);
            }
        }

        UtcT replyEndTime     = getReplyEndTime();
        long roundtripTimeout = getRelativeRoundtripTimeout();

        if ((roundtripTimeout != 0) || (replyEndTime != null))
        {
            replyEndTime = Time.earliest(Time.corbaFuture (roundtripTimeout),
View Full Code Here

    public EvaluationResult evaluate(EvaluationContext context) throws EvaluationException
    {
        EvaluationResult _result = new EvaluationResult();

        UtcT _curtime = context.getCurrentTime();

        Any _curAny = orb_.create_any();

        UtcTHelper.insert(_curAny, _curtime);
View Full Code Here

        structuredEvent_.header.variable_header = new Property[1];

        Date _now = new Date();

        Any _startTimeAny = getORB().create_any();
        UtcT _startTime = Time.corbaTime(_now);
        UtcTHelper.insert(_startTimeAny, _startTime);

        structuredEvent_.header.variable_header[0] = new Property(StartTime.value, _startTimeAny);

        Message _event = messageFactory_.newMessage(structuredEvent_, proxyConsumerMock_);
View Full Code Here

        testStructured_.header.variable_header = new Property[1];

        Date _now = new Date();

        Any _any = getORB().create_any();
        UtcT _utc = Time.corbaTime(_now);
        UtcTHelper.insert(_any, _utc);

        testStructured_.header.variable_header[0] = new Property(StopTime.value, _any);

        MockControl proxyConsumerControl = MockControl.createNiceControl(IProxyConsumer.class);
View Full Code Here

    public void testVariableCurtime() throws Exception
    {
        runEvaluation(testPerson_, "$curtime._repos_id == 'IDL:omg.org/TimeBase/UtcT:1.0'");

        Any _timeAny = getORB().create_any();
        UtcT _time = org.jacorb.util.Time.corbaTime();
        UtcTHelper.insert(_timeAny, _time);

        runEvaluation(_timeAny, "$curtime._repos_id == $._repos_id");
        runEvaluation(_timeAny, "$.time <= $curtime.time");
        runEvaluation(_timeAny, "$.time + 1 >= $.time");
View Full Code Here

TOP

Related Classes of org.omg.TimeBase.UtcT

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.