Package org.omg.CORBA

Examples of org.omg.CORBA.Any.insert_long()


     * @jmx.managed-attribute access = "read-write"
     */
    public void setMaxEventsPerConsumer(int max)
    {
        final Any any = getORB().create_any();
        any.insert_long(max);
        final Property prop = new Property(MaxEventsPerConsumer.value, any);
        qosSettings_.set_qos(new Property[] { prop });
    }

    /**
 
View Full Code Here


        else if (_numberOfConsumers > _maxNumberOfConsumers)
        {
            // too many consumers
            numberOfConsumers_.decrementAndGet();
            Any _any = orb_.create_any();
            _any.insert_long(_maxNumberOfConsumers);

            AdminLimit _limit = new AdminLimit("consumer limit", _any);

            throw new AdminLimitExceeded("Consumer creation request exceeds AdminLimit.", _limit);
        }
View Full Code Here

        {
            // too many suppliers
            numberOfSuppliers_.decrementAndGet();

            Any _any = orb_.create_any();
            _any.insert_long(_maxNumberOfSuppliers);

            AdminLimit _limit = new AdminLimit("supplier limit", _any);

            throw new AdminLimitExceeded("supplier creation request exceeds AdminLimit.", _limit);
        }
View Full Code Here

       try
       {
          int _maxConsumersDefault = config.getAttributeAsInteger(Attributes.MAX_NUMBER_CONSUMERS,
                                                                  Default.DEFAULT_MAX_NUMBER_CONSUMERS);
          Any _maxConsumersDefaultAny = sORB.create_any();
          _maxConsumersDefaultAny.insert_long( _maxConsumersDefault );

          //////////////////////////////

          int _maxSuppliersDefault =
             config.getAttributeAsInteger(Attributes.MAX_NUMBER_SUPPLIERS,
View Full Code Here

          int _maxSuppliersDefault =
             config.getAttributeAsInteger(Attributes.MAX_NUMBER_SUPPLIERS,
                                          Default.DEFAULT_MAX_NUMBER_SUPPLIERS);

          Any _maxSuppliersDefaultAny = sORB.create_any();
          _maxSuppliersDefaultAny.insert_long(_maxSuppliersDefault);

          //////////////////////////////

          int _maxQueueLength =
             config.getAttributeAsInteger(Attributes.MAX_QUEUE_LENGTH,
View Full Code Here

          int _maxQueueLength =
             config.getAttributeAsInteger(Attributes.MAX_QUEUE_LENGTH,
                                          Default.DEFAULT_MAX_QUEUE_LENGTH);

          Any _maxQueueLengthAny = sORB.create_any();
          _maxQueueLengthAny.insert_long(_maxQueueLength);

          //////////////////////////////

          boolean _rejectNewEvents =
             config.getAttribute(Attributes.REJECT_NEW_EVENTS,
View Full Code Here

        default:
            throw new EvaluationException("Neither array nor sequence");
        }

        Any _any = orb_.create_any();
        _any.insert_long(_length);

        return _any;
    }

    private String getDefaultUnionMemberName(TypeCode unionTypeCode) throws EvaluationException
View Full Code Here

            Any _any = orb_.create_any();

            switch (unionTypeCode.discriminator_type().kind().value()) {

            case TCKind._tk_long:
                _any.insert_long(discriminator);
                break;

            case TCKind._tk_ulong:
                _any.insert_ulong(discriminator);
                break;
View Full Code Here

      String msg = "Value inserted into DynAny object is not equal to value ";
      msg += "extracted from same DynAny object";

      Any inAny = orb.create_any();
      inAny.insert_long (777);

      dynAny.insert_any (inAny);
      Any outAny = dynAny.get_any();

      assertTrue (msg, inAny.equal(outAny));
View Full Code Here

    public void testInsertMismatch_any () throws Exception
   {
      TypeCode tc     = orb.get_primitive_tc (org.omg.CORBA.TCKind.tk_boolean);
      DynAny   dynAny = createDynAnyFromTypeCode (tc);
      Any inAny = orb.create_any();
      inAny.insert_long(700);

      try
      {
          dynAny.insert_any (inAny);
          fail ("should have thrown TypeMismatch");
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.