Package org.springframework.scheduling.support

Examples of org.springframework.scheduling.support.MethodInvokingRunnable


        if (annotation != null) {
          Assert.isTrue(void.class.equals(method.getReturnType()),
              "Only void-returning methods may be annotated with @Scheduled.");
          Assert.isTrue(method.getParameterTypes().length == 0,
              "Only no-arg methods may be annotated with @Scheduled.");
          MethodInvokingRunnable runnable = new MethodInvokingRunnable();
          runnable.setTargetObject(bean);
          runnable.setTargetMethod(method.getName());
          runnable.setArguments(new Object[0]);
          try {
            runnable.prepare();
          }
          catch (Exception e) {
            throw new IllegalStateException("failed to prepare task", e);
          }
          boolean processedSchedule = false;
View Full Code Here


        if (annotation != null) {
          Assert.isTrue(void.class.equals(method.getReturnType()),
              "Only void-returning methods may be annotated with @Scheduled.");
          Assert.isTrue(method.getParameterTypes().length == 0,
              "Only no-arg methods may be annotated with @Scheduled.");
          MethodInvokingRunnable runnable = new MethodInvokingRunnable();
          runnable.setTargetObject(bean);
          runnable.setTargetMethod(method.getName());
          runnable.setArguments(new Object[0]);
          try {
            runnable.prepare();
          }
          catch (Exception ex) {
            throw new IllegalStateException("failed to prepare task", ex);
          }
          boolean processedSchedule = false;
View Full Code Here

TOP

Related Classes of org.springframework.scheduling.support.MethodInvokingRunnable

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.