Examples of AutoTimer


Examples of org.jboss.as.ejb3.timerservice.AutoTimer

    private void parseScheduleMethods(final EnterpriseBeanMetaData beanMetaData, final EJBComponentDescription sessionBean, final Class<?> componentClass, final DeploymentReflectionIndex deploymentReflectionIndex) throws DeploymentUnitProcessingException {
        if (beanMetaData instanceof IScheduleTarget) {
            IScheduleTarget md = (IScheduleTarget) beanMetaData;
            if (md.getTimers() != null) {
                for (final TimerMetaData timer : md.getTimers()) {
                    AutoTimer autoTimer = new AutoTimer();

                    autoTimer.getTimerConfig().setInfo(timer.getInfo());
                    autoTimer.getTimerConfig().setPersistent(timer.isPersistent());

                    final ScheduleExpression scheduleExpression = autoTimer.getScheduleExpression();
                    final ScheduleMetaData schedule = timer.getSchedule();
                    if (schedule != null) {
                        scheduleExpression.dayOfMonth(schedule.getDayOfMonth());
                        scheduleExpression.dayOfWeek(schedule.getDayOfWeek());
                        scheduleExpression.hour(schedule.getHour());
View Full Code Here

Examples of org.jboss.as.ejb3.timerservice.AutoTimer

        super(Schedule.class, Schedules.class);
    }

    @Override
    protected AutoTimer fromAnnotation(final AnnotationInstance annotationInstance) {
        final AutoTimer timer = new AutoTimer();
        for (ScheduleValues schedulePart : ScheduleValues.values()) {
            schedulePart.set(timer, annotationInstance);
        }
        return timer;
    }
View Full Code Here

Examples of org.jboss.as.ejb3.timerservice.AutoTimer

    private void parseScheduleMethods(final EnterpriseBeanMetaData beanMetaData, final EJBComponentDescription sessionBean, final Class<?> componentClass, final DeploymentReflectionIndex deploymentReflectionIndex) throws DeploymentUnitProcessingException {
        if (beanMetaData instanceof IScheduleTarget) {
            IScheduleTarget md = (IScheduleTarget) beanMetaData;
            if (md.getTimers() != null) {
                for (final TimerMetaData timer : md.getTimers()) {
                    AutoTimer autoTimer = new AutoTimer();

                    autoTimer.getTimerConfig().setInfo(timer.getInfo());
                    autoTimer.getTimerConfig().setPersistent(timer.isPersistent());

                    final ScheduleExpression scheduleExpression = autoTimer.getScheduleExpression();
                    final ScheduleMetaData schedule = timer.getSchedule();
                    if (schedule != null) {
                        scheduleExpression.dayOfMonth(schedule.getDayOfMonth());
                        scheduleExpression.dayOfWeek(schedule.getDayOfWeek());
                        scheduleExpression.hour(schedule.getHour());
View Full Code Here

Examples of org.jboss.as.ejb3.timerservice.AutoTimer

        super(Schedule.class, Schedules.class);
    }

    @Override
    protected AutoTimer fromAnnotation(final AnnotationInstance annotationInstance, final PropertyReplacer propertyReplacer) {
        final AutoTimer timer = new AutoTimer();
        for (ScheduleValues schedulePart : ScheduleValues.values()) {
            schedulePart.set(timer, annotationInstance, propertyReplacer);
        }
        return timer;
    }
View Full Code Here

Examples of org.jboss.as.ejb3.timerservice.AutoTimer

    private void parseScheduleMethods(final EnterpriseBeanMetaData beanMetaData, final EJBComponentDescription sessionBean, final Class<?> componentClass, final DeploymentReflectionIndex deploymentReflectionIndex) throws DeploymentUnitProcessingException {
        if (beanMetaData instanceof IScheduleTarget) {
            IScheduleTarget md = (IScheduleTarget) beanMetaData;
            if (md.getTimers() != null) {
                for (final TimerMetaData timer : md.getTimers()) {
                    AutoTimer autoTimer = new AutoTimer();

                    autoTimer.getTimerConfig().setInfo(timer.getInfo());
                    autoTimer.getTimerConfig().setPersistent(timer.isPersistent());

                    final ScheduleExpression scheduleExpression = autoTimer.getScheduleExpression();
                    final ScheduleMetaData schedule = timer.getSchedule();
                    if (schedule != null) {
                        scheduleExpression.dayOfMonth(schedule.getDayOfMonth());
                        scheduleExpression.dayOfWeek(schedule.getDayOfWeek());
                        scheduleExpression.hour(schedule.getHour());
View Full Code Here

Examples of org.jboss.as.ejb3.timerservice.AutoTimer

                for (AnnotationInstance annotationInstance : annotations) {
                    if (enabled) {
                        AnnotationTarget target = annotationInstance.target();
                        if (target instanceof MethodInfo) {
                            final MethodIdentifier identifier = getMethodIdentifier(target);
                            final AutoTimer timer = new AutoTimer();
                            for (ScheduleValues schedulePart : ScheduleValues.values()) {
                                schedulePart.set(timer, annotationInstance);
                            }
                            componentDescription.addScheduleMethodIdentifier(identifier, timer);
                        }
                    } else {
                        logger.warn("@Schedule annotation found on " + annotationInstance.target() + " but timer service is not enabled");
                    }
                }
            }
            List<AnnotationInstance> schedules = classAnnotations.get(SCHEDULES_ANNOTATION);
            if (schedules != null) {
                for (AnnotationInstance annotationInstance : schedules) {
                    AnnotationTarget target = annotationInstance.target();
                    if (enabled) {
                        if (target instanceof MethodInfo) {

                            final MethodIdentifier identifier = getMethodIdentifier(target);
                            final AnnotationInstance[] values = annotationInstance.value().asNestedArray();
                            for (AnnotationInstance schedule : values) {

                                final AutoTimer timer = new AutoTimer();
                                for (ScheduleValues schedulePart : ScheduleValues.values()) {
                                    schedulePart.set(timer, schedule);
                                }
                                componentDescription.addScheduleMethodIdentifier(identifier, timer);
                            }
View Full Code Here

Examples of org.jboss.as.ejb3.timerservice.AutoTimer

    private void parseScheduleMethods(final SessionBeanMetaData beanMetaData, final SessionBeanComponentDescription sessionBean, final Class<?> componentClass, final DeploymentReflectionIndex deploymentReflectionIndex) throws DeploymentUnitProcessingException {
        if (beanMetaData instanceof SessionBean31MetaData) {
            SessionBean31MetaData md = (SessionBean31MetaData) beanMetaData;
            if (md.getTimers() != null) {
                for (final TimerMetaData timer : md.getTimers()) {
                    AutoTimer autoTimer = new AutoTimer();

                    autoTimer.getTimerConfig().setInfo(timer.getInfo());
                    autoTimer.getTimerConfig().setPersistent(timer.isPersistent());

                    final ScheduleExpression scheduleExpression = autoTimer.getScheduleExpression();
                    final ScheduleMetaData schedule = timer.getSchedule();
                    if (schedule != null) {
                        scheduleExpression.dayOfMonth(schedule.getDayOfMonth());
                        scheduleExpression.dayOfWeek(schedule.getDayOfWeek());
                        scheduleExpression.hour(schedule.getHour());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.