Ejemplo n.º 1
0
        public void shutdown_Process(int seqid, TProtocol iprot, TProtocol oprot)
        {
            shutdown_args args = new shutdown_args();

            args.Read(iprot);
            iprot.ReadMessageEnd();
            shutdown_result result = new shutdown_result();

            try
            {
                iface_.shutdown();
                oprot.WriteMessageBegin(new TMessage("shutdown", TMessageType.Reply, seqid));
                result.Write(oprot);
            }
            catch (TTransportException)
            {
                throw;
            }
            catch (Exception ex)
            {
                Console.Error.WriteLine("Error occurred in processor:");
                Console.Error.WriteLine(ex.ToString());
                TApplicationException x = new TApplicationException(TApplicationException.ExceptionType.InternalError, " Internal error.");
                oprot.WriteMessageBegin(new TMessage("shutdown", TMessageType.Exception, seqid));
                x.Write(oprot);
            }
            oprot.WriteMessageEnd();
            oprot.Transport.Flush();
        }
Ejemplo n.º 2
0
        public void recv_shutdown()
        {
            TMessage msg = iprot_.ReadMessageBegin();

            if (msg.Type == TMessageType.Exception)
            {
                TApplicationException x = TApplicationException.Read(iprot_);
                iprot_.ReadMessageEnd();
                throw x;
            }
            shutdown_result result = new shutdown_result();

            result.Read(iprot_);
            iprot_.ReadMessageEnd();
            return;
        }
Ejemplo n.º 3
0
 public void shutdown_Process(int seqid, TProtocol iprot, TProtocol oprot)
 {
     shutdown_args args = new shutdown_args();
     args.Read(iprot);
     iprot.ReadMessageEnd();
     shutdown_result result = new shutdown_result();
     iface_.shutdown(args.Status);
     oprot.WriteMessageBegin(new TMessage("shutdown", TMessageType.Reply, seqid));
     result.Write(oprot);
     oprot.WriteMessageEnd();
     oprot.Transport.Flush();
 }
Ejemplo n.º 4
0
 public void recv_shutdown()
 {
     TMessage msg = iprot_.ReadMessageBegin();
     if (msg.Type == TMessageType.Exception) {
       TApplicationException x = TApplicationException.Read(iprot_);
       iprot_.ReadMessageEnd();
       throw x;
     }
     shutdown_result result = new shutdown_result();
     result.Read(iprot_);
     iprot_.ReadMessageEnd();
     return;
 }