Refine search
/** * Returns the transaction associated with the transaction propagation * context that arrived in the current IIOP request. */ public static Transaction getCurrentTransaction() { Transaction tx = null; if (piCurrent != null) { // A non-null piCurrent means that a TxServerInterceptor was // installed: check if there is a transaction propagation context try { Any any = piCurrent.get_slot(slotId); if (any.type().kind().value() != TCKind._tk_null) { // Yes, there is a TPC: add the foreign transaction marker tx = ForeignTransaction.INSTANCE; } } catch (InvalidSlot e) { throw IIOPLogger.ROOT_LOGGER.errorGettingSlotInTxInterceptor(e); } } return tx; }
/** * Return the LocalIDLType for the given TypeCode. */ static LocalIDLType getIDLType(TypeCode typeCode, RepositoryImpl repository) { TCKind tcKind = typeCode.kind(); if (PrimitiveDefImpl.isPrimitiveTCKind(tcKind)) return new PrimitiveDefImpl(typeCode, repository); if (tcKind == TCKind.tk_sequence) return repository.getSequenceImpl(typeCode); if (tcKind == TCKind.tk_value || tcKind == TCKind.tk_value_box || tcKind == TCKind.tk_alias || tcKind == TCKind.tk_struct || tcKind == TCKind.tk_union || tcKind == TCKind.tk_enum || tcKind == TCKind.tk_objref) { try { return (LocalIDLType) repository._lookup_id(typeCode.id()); } catch (BadKind ex) { throw IIOPLogger.ROOT_LOGGER.badKindForTypeCode(tcKind.value()); } } throw IIOPLogger.ROOT_LOGGER.badKindForTypeCode(tcKind.value()); }
public void allDone() throws IRConstructionException { // Get my original type definition: It should have been created now. try { original_type_def = IDLTypeImpl.getIDLType(type().content_type(), repository); } catch (BadKind ex) { throw IIOPLogger.ROOT_LOGGER.badKindForTypeCode(type().kind().value()); } getReference(); }
public Integer find_ulong_param( String key ) throws ParameterInvalid { int i = find_param_idx( key ); if ( i == -1 ) { return null; } if( param[i].value.type().kind().value() != TCKind._tk_ulong ){ throw new ParameterInvalid( i, "Invalid parameter type" ); } return new Integer(param[i].value.extract_ulong()); }; public Operations find_operations_param( String key ) throws ParameterInvalid {
public void allDone() throws IRConstructionException { // Get my original type definition: It should have been created now. try { original_type_def = IDLTypeImpl.getIDLType(type().content_type(), repository); } catch (BadKind ex) { throw IIOPLogger.ROOT_LOGGER.badKindForTypeCode(type().kind().value()); } getReference(); }
public void insert_char(char 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_char) throw new TypeMismatch(); any.insert_char(value); }
public void allDone() throws IRConstructionException { // Get my element type definition: It should have been created now. try { element_type_def = IDLTypeImpl.getIDLType(type().content_type(), repository); } catch (BadKind ex) { throw IIOPLogger.ROOT_LOGGER.badKindForTypeCode(type().kind().value()); } getReference(); }
public void insert_long(int 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_long) throw new TypeMismatch(); any.insert_long(value); }
public void insert_reference(org.omg.CORBA.Object 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_objref) throw new TypeMismatch(); any.insert_Object(value); }
public void insert_any(org.omg.CORBA.Any 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_any) throw new TypeMismatch(); any.insert_any(value); }
public boolean get_boolean() 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_boolean) throw new TypeMismatch(); return any.extract_boolean(); }
public static String getSignature(ValueMember member) throws ClassNotFoundException { // REVISIT. Can the type be something that is // non-primitive yet not a value_box, value, or objref? // If so, should use ObjectStreamClass or throw // exception. if (member.type.kind().value() == TCKind._tk_value_box || member.type.kind().value() == TCKind._tk_value || member.type.kind().value() == TCKind._tk_objref) { Class c = RepositoryId.cache.getId(member.id).getClassFromType(); return ObjectStreamClass.getSignature(c); } else { return primitiveConstants[member.type.kind().value()]; } }
public byte get_octet() 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_octet) throw new TypeMismatch(); return any.extract_octet(); }
public static String getSignature(ValueMember member) throws ClassNotFoundException { // REVISIT. Can the type be something that is // non-primitive yet not a value_box, value, or objref? // If so, should use ObjectStreamClass or throw // exception. if (member.type.kind().value() == TCKind._tk_value_box || member.type.kind().value() == TCKind._tk_value || member.type.kind().value() == TCKind._tk_objref) { Class c = RepositoryId.cache.getId(member.id).getClassFromType(); return ObjectStreamClass.getSignature(c); } else { return primitiveConstants[member.type.kind().value()]; } }
public double get_double() 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_double) throw new TypeMismatch(); return any.extract_double(); }
static boolean isConstructedDynAny(DynAny dynAny) { // DynFixed is constructed but not a subclass of DynAnyConstructedImpl //return (dynAny instanceof DynAnyConstructedImpl); int kind = dynAny.type().kind().value(); return (kind == TCKind._tk_sequence || kind == TCKind._tk_struct || kind == TCKind._tk_array || kind == TCKind._tk_union || kind == TCKind._tk_enum || kind == TCKind._tk_fixed || kind == TCKind._tk_value || kind == TCKind._tk_value_box); }