Package jnode.robot

Examples of jnode.robot.IRobot


    String robotname = "";
    if (message.isNetmail()) {
      if (MainHandler.getCurrentInstance().getInfo().getAddressList()
          .contains(message.getToAddr())) {
        // TODO: optiomize
        IRobot oRobot = robotMaps
            .get(message.getToName().toLowerCase());
        if (oRobot == null) {
          try {
            Robot robot = ORMManager.get(Robot.class).getById(
                message.getToName().toLowerCase());
            if (robot != null) {
              robotname = robot.getRobot();
              Class<?> clazz = Class
                  .forName(robot.getClassName());
              oRobot = (IRobot) clazz.newInstance();
              robotMaps.put(robotname, oRobot);
              logger.l4("Message " + message.getMsgid()
                  + " sent to robot " + robotname);
            }
          } catch (ClassNotFoundException e) {
            logger.l2("Robot class not found (INIT) " + robotname,
                e);
          } catch (Exception e) {
            logger.l2(
                "Robot excception  " + robotname + " (INIT) ",
                e);
          }
        }
        if (oRobot != null) {
          isRobot = true;
          try {
            oRobot.execute(message);
          } catch (Exception e) {
            logger.l2("Robot excception  " + robotname
                + " (PROCCESS) ", e);
          }
        }
View Full Code Here

TOP

Related Classes of jnode.robot.IRobot

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.