Ejemplo n.º 1
0
        public void Read(TProtocol iprot)
        {
            bool   isset_spout_object = false;
            bool   isset_common       = false;
            TField field;

            iprot.ReadStructBegin();
            while (true)
            {
                field = iprot.ReadFieldBegin();
                if (field.Type == TType.Stop)
                {
                    break;
                }
                switch (field.ID)
                {
                case 1:
                    if (field.Type == TType.Struct)
                    {
                        Spout_object = new ComponentObject();
                        Spout_object.Read(iprot);
                        isset_spout_object = true;
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 2:
                    if (field.Type == TType.Struct)
                    {
                        Common = new ComponentCommon();
                        Common.Read(iprot);
                        isset_common = true;
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                default:
                    TProtocolUtil.Skip(iprot, field.Type);
                    break;
                }
                iprot.ReadFieldEnd();
            }
            iprot.ReadStructEnd();
            if (!isset_spout_object)
            {
                throw new TProtocolException(TProtocolException.INVALID_DATA);
            }
            if (!isset_common)
            {
                throw new TProtocolException(TProtocolException.INVALID_DATA);
            }
        }
Ejemplo n.º 2
0
 public SpoutSpec(ComponentObject spout_object, ComponentCommon common) : this()
 {
     this.Spout_object = spout_object;
     this.Common       = common;
 }
Ejemplo n.º 3
0
 public Bolt(ComponentObject bolt_object, ComponentCommon common) : this()
 {
     this.Bolt_object = bolt_object;
     this.Common      = common;
 }