Пример #1
0
        @Override
        public void run() {
          WaitViewParamBean poll;
          while (true) {
            try {
              poll = waitlist.poll(1000, TimeUnit.MILLISECONDS);
              if (poll != null) {

                String[] args = poll.getArgs();
                String remoteUserName = poll.getRemoteUserName();
                String repeaterid = poll.getRepeaterid();

                services
                    .getScreenShareService()
                    .addRepeaterID(
                        (String) DataUtil.getValue(DataUtil.Key.RepeaterHost),
                        Integer.parseInt(repeaterid));
                //						Thread.sleep(2000);
                ShareFileServerUtil.getInstance()
                    .startScreenShareToOneClient(
                        DataUtil.getLoginInfo().getConfno(), remoteUserName, repeaterid, args);
              }
            } catch (Exception e) {
              log.error("looThread.run", e);
            }
          }
        }
Пример #2
0
  private void addToWaitList(String remoteUserName, String repeaterid, boolean immediately)
      throws Exception {
    log.info("addToWaitList " + remoteUserName + "," + repeaterid);
    WaitViewParamBean bean = new WaitViewParamBean();
    bean.setRemoteUserName(remoteUserName);
    bean.setRepeaterid(repeaterid);

    String vnccolor = ConfigUtil.getProperty("VncColors", "Full");
    Integer nport = ConfigUtil.getIntProperty("repeaterport");

    String[] parameters =
        new String[] {
          "HOST",
          "ID",
          "PORT",
          repeaterid,
          "PASSWORD",
          ConfigUtil.getProperty("screenSharePasswd"),
          "View only",
          "Yes",
          "Restricted colors",
          vnccolor,
          "REPEATERHOST",
          DataUtil.getValue(DataUtil.Key.RepeaterHost),
          "REPEATERPORT",
          nport.toString()
        };

    bean.setArgs(parameters);

    //
    //	services.getScreenShareService().addRepeaterID((String)DataUtil.getValue(DataUtil.Key.RepeaterHost), Integer.parseInt(repeaterid));
    //		Thread.sleep(3000);
    waitlist.offer(bean);
  }