Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package org.omg.CosTransactions;


Generated from IDL struct "PropagationContext".

Author(s):
JacORB IDL compiler V 3.5
Version:
generated at 11-Jul-2014 12:35:18
 
public abstract class PropagationContextHelper
	private volatile static org.omg.CORBA.TypeCode _type;
	public static org.omg.CORBA.TypeCode type ()
	{
		if ( == null)
		{
			synchronized(PropagationContextHelper.class)
			{
				if ( == null)
				{
					 = org.omg.CORBA.ORB.init().create_struct_tc(org.omg.CosTransactions.PropagationContextHelper.id(),"PropagationContext",new org.omg.CORBA.StructMember[]{new org.omg.CORBA.StructMember("timeout", org.omg.CORBA.ORB.init().get_primitive_tc(org.omg.CORBA.TCKind.from_int(5)), null),new org.omg.CORBA.StructMember("current", org.omg.CORBA.ORB.init().create_struct_tc(org.omg.CosTransactions.TransIdentityHelper.id(),"TransIdentity",new org.omg.CORBA.StructMember[]{new org.omg.CORBA.StructMember("coord", org.omg.CORBA.ORB.init().create_interface_tc("IDL:omg.org/CosTransactions/Coordinator:1.0""Coordinator"), null),new org.omg.CORBA.StructMember("term", org.omg.CORBA.ORB.init().create_interface_tc("IDL:omg.org/CosTransactions/Terminator:1.0""Terminator"), null),new org.omg.CORBA.StructMember("otid", org.omg.CORBA.ORB.init().create_struct_tc(org.omg.CosTransactions.otid_tHelper.id(),"otid_t",new org.omg.CORBA.StructMember[]{new org.omg.CORBA.StructMember("formatID", org.omg.CORBA.ORB.init().get_primitive_tc(org.omg.CORBA.TCKind.from_int(3)), null),new org.omg.CORBA.StructMember("bqual_length", org.omg.CORBA.ORB.init().get_primitive_tc(org.omg.CORBA.TCKind.from_int(3)), null),new org.omg.CORBA.StructMember("tid", org.omg.CORBA.ORB.init().create_sequence_tc(0, org.omg.CORBA.ORB.init().get_primitive_tc(org.omg.CORBA.TCKind.from_int(10))), null)}), null)}), null),new org.omg.CORBA.StructMember("parents", org.omg.CORBA.ORB.init().create_sequence_tc(0, org.omg.CORBA.ORB.init().create_struct_tc(org.omg.CosTransactions.TransIdentityHelper.id(),"TransIdentity",new org.omg.CORBA.StructMember[]{new org.omg.CORBA.StructMember("coord", org.omg.CORBA.ORB.init().create_interface_tc("IDL:omg.org/CosTransactions/Coordinator:1.0""Coordinator"), null),new org.omg.CORBA.StructMember("term", org.omg.CORBA.ORB.init().create_interface_tc("IDL:omg.org/CosTransactions/Terminator:1.0""Terminator"), null),new org.omg.CORBA.StructMember("otid", org.omg.CORBA.ORB.init().create_struct_tc(org.omg.CosTransactions.otid_tHelper.id(),"otid_t",new org.omg.CORBA.StructMember[]{new org.omg.CORBA.StructMember("formatID", org.omg.CORBA.ORB.init().get_primitive_tc(org.omg.CORBA.TCKind.from_int(3)), null),new org.omg.CORBA.StructMember("bqual_length", org.omg.CORBA.ORB.init().get_primitive_tc(org.omg.CORBA.TCKind.from_int(3)), null),new org.omg.CORBA.StructMember("tid", org.omg.CORBA.ORB.init().create_sequence_tc(0, org.omg.CORBA.ORB.init().get_primitive_tc(org.omg.CORBA.TCKind.from_int(10))), null)}), null)})), null),new org.omg.CORBA.StructMember("implementation_specific_data", org.omg.CORBA.ORB.init().get_primitive_tc(org.omg.CORBA.TCKind.from_int(11)), null)});
				}
			}
		}
		return ;
	}
	public static void insert (final org.omg.CORBA.Any anyfinal org.omg.CosTransactions.PropagationContext s)
	{
		any.type(type());
	}
	{
		try
		{
			return read (in);
		}
		finally
		{
			try
			{
				in.close();
			}
			catch (java.io.IOException e)
			{
			throw new RuntimeException("Unexpected exception " + e.toString() );
			}
		}
	}
	public static String id()
	{
		return "IDL:omg.org/CosTransactions/PropagationContext:1.0";
	}
	{
		result.timeout=in.read_ulong();
		result.current=org.omg.CosTransactions.TransIdentityHelper.read(in);
		int _lresult_parents1 = in.read_long();
		try
		{
			 int x = in.available();
			 if ( x > 0 && _lresult_parents1 > x )
				{
					throw new org.omg.CORBA.MARSHAL("Sequence length too large. Only " + x + " available and trying to assign " + _lresult_parents1);
				}
		}
		catch (java.io.IOException e)
		{
		}
		result.parents = new org.omg.CosTransactions.TransIdentity[_lresult_parents1];
		for (int i=0;i<result.parents.length;i++)
		{
			result.parents[i]=org.omg.CosTransactions.TransIdentityHelper.read(in);
		}
		result.implementation_specific_data=in.read_any();
		return result;
	}
	public static void write (final org.omg.CORBA.portable.OutputStream outfinal org.omg.CosTransactions.PropagationContext s)
	{
		out.write_ulong(s.timeout);
		org.omg.CosTransactions.TransIdentityHelper.write(out,s.current);
		out.write_long(s.parents.length);
		for (int i=0; i<s.parents.length;i++)
		{
			org.omg.CosTransactions.TransIdentityHelper.write(out,s.parents[i]);
		}
		out.write_any(s.implementation_specific_data);
	}
New to GrepCode? Check out our FAQ X