protected void writeAny(OutputStream out) { //System.out.println(this + " writeAny of type " + type().kind().value()); any.write_value(out); }
public final void write_any(Any any) { if (any == null) { throw wrapper.nullParam(CompletionStatus.COMPLETED_MAYBE); } write_TypeCode(any.type()); any.write_value(parent); }
public void setUserException(org.omg.CORBA.Any any) { if (upcallReturn_ != null) { org.omg.IOP.ServiceContext[] scl = new org.omg.IOP.ServiceContext[replySCL_ .size()]; replySCL_.copyInto(scl); upcallReturn_.upcallBeginUserException(this, scl); try { any.write_value(out_); } catch (org.omg.CORBA.SystemException ex) { try { marshalEx(ex); } catch (LocationForward f) { Assert._OB_assert(ex); // shouldn't happen } } // // In Java, we must delay the call to upcallEndUserException // // upcallReturn_.upcallEndUserException(this); userEx_ = true; } }
@Override public final void write_any(final org.omg.CORBA.Any value) { if( value == null ) { throw new MARSHAL("Cannot marshall null value."); } write_TypeCode( value.type() ); value.write_value( this ) ; }
public final void write_any(Any any) { if (any == null) { throw wrapper.nullParam(CompletionStatus.COMPLETED_MAYBE); } write_TypeCode(any.type()); any.write_value(parent); }
public void write_any(Any any) { if (any == null) throw wrapper.nullParam(CompletionStatus.COMPLETED_MAYBE); write_TypeCode(any.type()); any.write_value(parent); }
public void write_any(Any any) { if ( any == null ) throw wrapper.nullParam(CompletionStatus.COMPLETED_MAYBE); write_TypeCode(any.type()); any.write_value(parent); }
public void write_any(org.omg.CORBA.Any value) { logger.finest("Writing an ANY value of type " + value.type().kind()); write_TypeCode(value.type()); value.write_value(this); }
public void write_any(Any any) { if (any == null) throw wrapper.nullParam(CompletionStatus.COMPLETED_MAYBE); write_TypeCode(any.type()); any.write_value(parent); }
public final void write_any(Any any) { if (any == null) { throw wrapper.nullParam(CompletionStatus.COMPLETED_MAYBE); } write_TypeCode(any.type()); any.write_value(parent); }
/** This is called from the ORB after the DynamicImplementation.invoke * returns. Here we marshal the return value and inout/out params. */ public void marshalReplyParams(OutputStream os) { // marshal the operation return value _resultAny.write_value(os); // marshal the inouts/outs NamedValue arg = null; for (int i=0; i < _arguments.count() ; i++) { try { arg = _arguments.item(i); } catch (Bounds e) {} if ((arg.flags() == org.omg.CORBA.ARG_OUT.value) || (arg.flags() == org.omg.CORBA.ARG_INOUT.value)) { arg.value().write_value(os); } } }
public byte[] encode_value(Any data) throws InvalidTypeForEncoding { final CDROutputStream out = new CDROutputStream(orb); try { out.beginEncapsulatedArray(); data.write_value(out); // do not end encapsulation since it will patch the // array with a size! return out.getBufferCopy(); } finally { out.close(); } } }
public byte[] encode_value(org.omg.CORBA.Any data) { org.apache.yoko.orb.OCI.Buffer buf = new org.apache.yoko.orb.OCI.Buffer(); org.apache.yoko.orb.CORBA.OutputStream out = new org.apache.yoko.orb.CORBA.OutputStream( buf); out._OB_ORBInstance(orbInstance_); out._OB_writeEndian(); data.write_value(out); byte[] result = new byte[buf.length()]; System.arraycopy(buf.data(), 0, result, 0, buf.length()); return result; }
private boolean compareComplexValue(org.omg.CORBA.Any other) { final CDROutputStream thisStream; if (value instanceof CDROutputStream) { thisStream = (CDROutputStream)value; } else { thisStream = new CDROutputStream(orb); write_value(thisStream); } final CDROutputStream otherStream; if (other instanceof Any && ((Any) other).value instanceof CDROutputStream) { otherStream = (CDROutputStream) ((Any) other).value; } else { otherStream = new CDROutputStream(orb); other.write_value( otherStream ); } return Arrays.equals( thisStream.getBufferCopy(), otherStream.getBufferCopy()); } }
protected boolean initializeAnyFromComponents() { //System.out.println(this + " initializeAnyFromComponents"); OutputStream out = any.create_output_stream(); for (int i=0; i<components.length; i++) { if (components[i] instanceof DynAnyImpl) { ((DynAnyImpl)components[i]).writeAny(out); } else { // Not our implementation. Nothing we can do to prevent copying. components[i].to_any().write_value(out); } } any.read_value(out.create_input_stream(), any.type()); return true; }
data.write_value(out);
protected boolean initializeAnyFromComponents() { OutputStream out = any.create_output_stream(); // Writing the length first is the only difference to supers implementation out.write_long(components.length); for (int i=0; i<components.length; i++) { if (components[i] instanceof DynAnyImpl) { ((DynAnyImpl)components[i]).writeAny(out); } else { // Not our implementation. Nothing we can do to prevent copying. components[i].to_any().write_value(out); } } any.read_value(out.create_input_stream(), any.type()); return true; }
data.write_value( cdrOut );
nv.value().write_value(out);
protected void doWriteTypeCodeParameters(TypeCode typeCode, CDROutputStream out, Map recursiveTCMap, Map repeatedTCMap) throws BadKind, Bounds { out.write_string( typeCode.id() ); out.write_string( typeCode.name() ); out.write_TypeCode(typeCode.discriminator_type(), recursiveTCMap, repeatedTCMap); out.write_long( typeCode.default_index()); final int memberCount = typeCode.member_count(); out.write_long(memberCount); for( int i = 0; i < memberCount; i++) { if( i == typeCode.default_index() ) { out.write_octet((byte)0); } else { typeCode.member_label(i).write_value( out ); } out.write_string( typeCode.member_name(i)); out.write_TypeCode( typeCode.member_type(i), recursiveTCMap, repeatedTCMap ); } }