Thanks Emmanuel Lécharny.
 I suspend writing the value until I get the value, but also it has null
value
    @Override
    public void sessionOpened(final IoSession session) throws Exception
    {
         ScheduledThreadPoolExecutor exec = new
ScheduledThreadPoolExecutor(1);
            exec.scheduleAtFixedRate(new Runnable() {
            public void run()
             {

                System.out.println(SwitchId);
                session.write(SwitchId);
          }
          }, 30, 30, TimeUnit.SECONDS);
    }

Reply via email to