Example #1
0
		private void InitBlock()
		{
			nodeTree = new ParserState();
			directives = null;
			jj_la1 = new int[53];
			jj_2_rtns = new Calls[12];
			jj_expentries = new ArrayList();
			jj_lasttokens = new int[100];
		}
Example #2
0
		public void ReInit(ParserTokenManager tm)
		{
			token_source = tm;
			token = new Token();
			jj_ntk_Renamed_Field = -1;
			nodeTree.Reset();
			jj_gen = 0;
			for(int i = 0; i < 53; i++)
				jj_la1[i] = -1;
			for(int i = 0; i < callsArray.Length; i++)
				callsArray[i] = new Calls();
		}
Example #3
0
		public Parser(ParserTokenManager tm)
		{
			InitBlock();
			token_source = tm;
			token = new Token();
			jj_ntk_Renamed_Field = -1;
			jj_gen = 0;
			for(int i = 0; i < 53; i++)
				jj_la1[i] = -1;
			for(int i = 0; i < callsArray.Length; i++)
				callsArray[i] = new Calls();
		}
Example #4
0
		public void ReInit(ICharStream stream)
		{
			token_source.ReInit(stream);
			token = new Token();
			jj_ntk_Renamed_Field = -1;
			nodeTree.Reset();
			jj_gen = 0;
			for(int i = 0; i < 53; i++)
				jj_la1[i] = -1;
			for(int i = 0; i < callsArray.Length; i++)
				callsArray[i] = new Calls();
		}
Example #5
0
            protected override void DoWaitForCompleteStop()
            {
                const string FROM = "GlueService.DoWaitForCompleteStop()";
                const string STOP = "stopping";

                base.DoWaitForCompleteStop();

                try
                {
                    m_Thread.Join();
                    m_Thread = null;

                    foreach(var s in m_Servers)   run(() => s.Close(), STOP, "server", s.Name, s.GetType(), false);
                    foreach(var b in m_Bindings)  run(() => b.WaitForCompleteStop(), STOP, "binding", b.Name, b.GetType(), false);
                    foreach(var p in m_Providers) run(() => p.WaitForCompleteStop(), STOP, "provider", p.Name, p.GetType(), false);

                    run(() => m_ServerHandler.WaitForCompleteStop(), STOP, "server handler", m_ServerHandler.Name, m_ServerHandler.GetType(), false);

                    m_ServerHandler.Dispose();
                    m_ServerHandler = null;

                    m_Calls = null;
                }
                catch(Exception error)
                {
                    if (m_ServerHandler != null)
                    try
                    {
                        m_ServerHandler.Dispose();
                        m_ServerHandler = null;
                    }
                    catch
                    {
                    }
                  
                    log(MessageType.CatastrophicError, "Exception: " + error.ToMessageWithType(), FROM); 
                    throw error;
                }
            }
Example #6
0
            protected override void DoStart()
            {
                const string FROM  = "GlueService.DoStart()";
                const string START = "starting";
                const string STOP  = "stopping";

                base.DoStart();

                try
                {
                  m_ServerHandler = new ServerHandler(this);

                  m_Calls = new Calls(0);

                  run(() => m_ServerHandler.Start(), START, "server handler", m_ServerHandler.Name, m_ServerHandler.GetType());
                  
                  //todo  Add partial failure handling, i.e. what if 2nd binding fails? then Providers that have started already need to stop
                  foreach(var p in m_Providers) run(() => p.Start(), START, "provider", p.Name, p.GetType());
                  foreach(var b in m_Bindings)  run(() => b.Start(), START, "binding",  b.Name, b.GetType());
                  foreach(var s in m_Servers)   run(() => s.Open(),  START, "server",   s.Name, s.GetType());

                  m_Thread = new Thread(threadSpin);
                  m_Thread.Name = THREAD_NAME;
                  m_Thread.Start();

                  log(MessageType.Info, "Started OK", FROM); 
                }
                catch(Exception error)
                {
                  AbortStart();

                  log(MessageType.CatastrophicError, "Exception: " + error.ToMessageWithType(), FROM);

                  if (m_Thread != null)
                  {
                      m_Thread.Join();
                      m_Thread = null;
                  }

                  foreach (var s in m_Servers)   run(() => s.Close(),               STOP, "server",   s.Name, s.GetType(), false);
                  foreach (var b in m_Bindings)  run(() => b.WaitForCompleteStop(), STOP, "binding",  b.Name, b.GetType(), false);
                  foreach (var p in m_Providers) run(() => p.WaitForCompleteStop(), STOP, "provider", p.Name, p.GetType(), false);

                  if (m_ServerHandler != null)
                  {
                      run(() => m_ServerHandler.Dispose(), STOP, "server handler", m_ServerHandler.Name, m_ServerHandler.GetType(), false);
                      m_ServerHandler = null;
                  }

                  throw error;
                }
            }
Example #7
0
		public Parser(ICharStream stream)
		{
			InitBlock();
			token_source = new ParserTokenManager(stream);
			token = new Token();
			jj_ntk_Renamed_Field = - 1;
			jj_gen = 0;
			for(int i = 0; i < 53; i++)
				jj_la1[i] = - 1;
			for(int i = 0; i < jj_2_rtns.Length; i++)
				jj_2_rtns[i] = new Calls();
		}