Package org.openntf.domino.xots.annotations

Examples of org.openntf.domino.xots.annotations.Schedule


    scanner.addObserver(this);
    scanner.scan();
  }

  public void schedule(final Class<? extends Runnable> taskClass) {
    Schedule schedule = taskClass.getAnnotation(Schedule.class);
    if (schedule != null) {
      schedule.timeunit();
    }
  }
View Full Code Here


          sb.append(", Scope:");
          sb.append(persistent.scope());
          sb.append(", AppContext:");
          sb.append(persistent.appContext());
        }
        Schedule schedule = cls.getAnnotation(Schedule.class);
        if (schedule != null) {
          sb.append(", Freq:");
          sb.append(schedule.frequency());

          // sb.append(", TimeUnit:");
          // sb.append(schedule.timeunit());
          //
          // WHEE: Why do I get this error here:
          //      java.lang.TypeNotPresentException: Type java.util.concurrent.TimeUnit not present
          //               at com.ibm.oti.reflect.AnnotationHelper$AnnotationInvocationHandler.invoke(AnnotationHelper.java:134)
          //               at com.sun.proxy.$Proxy1.timeunit(Unknown Source)
          //               at org.openntf.domino.xots.XotsService.toString(XotsService.java:242)
          //               at org.openntf.domino.xots.builtin.XotsNsfScanner.scan(XotsNsfScanner.java:56)
          //               at org.openntf.domino.xots.builtin.XotsNsfScanner.run(XotsNsfScanner.java:39)
          //               at lotus.domino.NotesThread.run(Unknown Source)
          //        Caused by:
          //        java.lang.ClassNotFoundException: java.util.concurrent.TimeUnit
          //               at com.ibm.oti.reflect.AnnotationHelper.getReturnValueForEntry(Native Method)
          //               at com.ibm.oti.reflect.AnnotationHelper.access$000(AnnotationHelper.java:19)
          //               at com.ibm.oti.reflect.AnnotationHelper$AnnotationInvocationHandler.invoke(AnnotationHelper.java:132)
          //               ... 5 more

          sb.append(", WeekDays:");
          sb.append(Arrays.toString(schedule.weekdays()));
          sb.append(", ");
          sb.append(schedule.starthour());
          sb.append("-");
          sb.append(schedule.endhour());
          sb.append("h");
        }
        sb.append('\n');
      }
    }
View Full Code Here

TOP

Related Classes of org.openntf.domino.xots.annotations.Schedule

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.