Package org.rzo.yajsw.controller

Examples of org.rzo.yajsw.controller.Message


  public void stopTimer()
  {
    if (_session != null)
      while (_session != null && !_stopping)
      {
        _session.write(new Message(Constants.WRAPPER_MSG_STOP_TIMER, null));
        try
        {
          Thread.sleep(500);
        }
        catch (InterruptedException e)
View Full Code Here


  public void restart()
  {
    if (_session != null)
      while (_session != null && !_stopping)
      {
        _session.write(new Message(Constants.WRAPPER_MSG_RESTART, null));
        try
        {
          Thread.sleep(100);
        }
        catch (InterruptedException e)
View Full Code Here

    threadDump(null);
  }

  public void threadDump(long[] ids)
  {
    Message m = new Message(Constants.WRAPPER_MSG_THREAD_DUMP, null);
    Action a = ActionFactory.getAction(m);
    try
    {
      if (_overrideStdErr)
        a.execute(m, _session, new PrintStream(_errStream), ids);
View Full Code Here

        {

        }
      else
      {
        _session.write(new Message(Constants.WRAPPER_MSG_SERVICE_STARTUP, null));
        reported = true;
      }
    }
  }
View Full Code Here

    public void messageReceived(ChannelHandlerContext ctx, MessageEvent e) throws Exception
    {
      if (_stopping)
        return;
      Channel session = ctx.getChannel();
      Message msg = (Message) e.getMessage();
      if (msg.getCode() == Constants.WRAPPER_MSG_STOP)
        try
        {
          System.out.println("wrapper manager received stop command");
          _stopping = true;
          if (session != null)
            session.close();
          // Thread.sleep(100);
          if (msg.getMessage() != null && msg.getMessage().length() > 0)
            try
            {
              _exitCode = Integer.parseInt(msg.getMessage());
            }
            catch (Exception ex)
            {
              // DO NOTHING
            }
          if (!_externalStop)
            System.exit(_exitCode);
        }
        catch (Exception ex)
        {
          ex.printStackTrace();
        }
      else if (msg.getCode() == Constants.WRAPPER_MSG_OKKEY)
      {
        _session = session;
        try
        {
          _myPid = Integer.parseInt(msg.getMessage());
        }
        catch (Exception ex)
        {
          ex.printStackTrace();
        }
      }
      else if (msg.getCode() == Constants.WRAPPER_MSG_THREAD_DUMP)
      {
        threadDump();
      }
    }
View Full Code Here

TOP

Related Classes of org.rzo.yajsw.controller.Message

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.