/** * Insert a java primitive into an Any. * The primitive is assumed to be wrapped in one of the primitive * wrapper classes. */ public static void insertAnyPrimitive(Any any, Object primitive) { Class type = primitive.getClass(); if (type == Boolean.class) any.insert_boolean(((Boolean) primitive).booleanValue()); else if (type == Character.class) any.insert_wchar(((Character) primitive).charValue()); else if (type == Byte.class) any.insert_octet(((Byte) primitive).byteValue()); else if (type == Short.class) any.insert_short(((Short) primitive).shortValue()); else if (type == Integer.class) any.insert_long(((Integer) primitive).intValue()); else if (type == Long.class) any.insert_longlong(((Long) primitive).longValue()); else if (type == Float.class) any.insert_float(((Float) primitive).floatValue()); else if (type == Double.class) any.insert_double(((Double) primitive).doubleValue()); else throw IIOPLogger.ROOT_LOGGER.notAPrimitive(type.getName()); }
public void establish_components(IORInfo info) { try { // Invocation Policy = EITHER Any any = ORB.init().create_any(); any.insert_short(EITHER); byte[] taggedComponentData = codec.encode_value(any); info.add_ior_component(new TaggedComponent(TAG_INV_POLICY, taggedComponentData)); // OTS Policy = ADAPTS any = ORB.init().create_any(); any.insert_short(ADAPTS); taggedComponentData = codec.encode_value(any); info.add_ior_component(new TaggedComponent(TAG_OTS_POLICY, taggedComponentData)); } catch (InvalidTypeForEncoding e) { throw IIOPLogger.ROOT_LOGGER.errorEncodingContext(e); } } }
public static void insert (org.omg.CORBA.Any any, short s) { any.insert_short(s); }
public static void insert (org.omg.CORBA.Any any, short s) { any.insert_short(s); }
public static void insert (org.omg.CORBA.Any any, short s) { any.insert_short(s); }
public static void insert (org.omg.CORBA.Any any, short s) { any.insert_short(s); }
public static void insert (org.omg.CORBA.Any any, short s) { any.insert_short(s); }
public static void insert (org.omg.CORBA.Any any, short s) { any.insert_short(s); }
public static void insert (org.omg.CORBA.Any any, short s) { any.insert_short(s); }
public static void insert (org.omg.CORBA.Any any, short s) { any.insert_short(s); }
public static void insert (org.omg.CORBA.Any any, short s) { any.insert_short(s); }
public static void insert (org.omg.CORBA.Any any, short s) { any.insert_short(s); }
public static void insert (org.omg.CORBA.Any any, short s) { any.insert_short(s); }
public static void insert (org.omg.CORBA.Any any, short s) { any.insert_short(s); }
public static void insert (org.omg.CORBA.Any any, short s) { any.insert_short(s); }
public static void insert (org.omg.CORBA.Any any, short s) { any.insert_short(s); }
public void insert_short(short value) throws TypeMismatch { checkDestroyed (); org.omg.CORBA.Any any = getRepresentation(); if( any.type().kind() != org.omg.CORBA.TCKind.tk_short) { throw new TypeMismatch (); } any.insert_short(value); }
private void throwBadValue(String property) throws UnsupportedQoS { Any _lowVal = getORB().create_any(); Any _highVal = getORB().create_any(); _lowVal.insert_short(BestEffort.value); _highVal.insert_short(BestEffort.value); UnsupportedQoS _e = new UnsupportedQoS("The specified Property Value is not supported", new PropertyError[] { new PropertyError(QoSError_code.BAD_VALUE, property, new PropertyRange(_lowVal, _highVal)) }); throw _e; }
public void insert_short(short value) throws org.omg.DynamicAny.DynAnyPackage.TypeMismatch, org.omg.DynamicAny.DynAnyPackage.InvalidValue { if (status == STATUS_DESTROYED) { throw wrapper.dynAnyDestroyed() ; } if (any.type().kind().value() != TCKind._tk_short) throw new TypeMismatch(); any.insert_short(value); }
private void throwPersistentNotSupported(String property) throws UnsupportedQoS { Any _lowVal = getORB().create_any(); Any _highVal = getORB().create_any(); _lowVal.insert_short(BestEffort.value); _highVal.insert_short(BestEffort.value); UnsupportedQoS _e = new UnsupportedQoS(new PropertyError[] { new PropertyError( QoSError_code.UNSUPPORTED_VALUE, property, new PropertyRange(_lowVal, _highVal)) }); throw _e; }