deprecated scheduling support for JDK 1.3 Timer

This commit is contained in:
Juergen Hoeller 2009-10-13 21:52:44 +00:00
parent 3331f16ef7
commit cfa7216fac
11 changed files with 28 additions and 36 deletions

View File

@ -68,7 +68,6 @@ public class SimpleApplicationEventMulticaster extends AbstractApplicationEventM
* transaction association) unless the TaskExecutor explicitly supports this.
* @see org.springframework.core.task.SyncTaskExecutor
* @see org.springframework.core.task.SimpleAsyncTaskExecutor
* @see org.springframework.scheduling.timer.TimerTaskExecutor
*/
public void setTaskExecutor(Executor taskExecutor) {
this.taskExecutor = taskExecutor;

View File

@ -52,10 +52,6 @@ import org.springframework.util.ObjectUtils;
* {@link #setContinueScheduledExecutionAfterException "continueScheduledExecutionAfterException"}
* property to "true".
*
* <p>This class is analogous to the
* {@link org.springframework.scheduling.timer.TimerFactoryBean}
* class for the JDK 1.3 {@link java.util.Timer} facility.
*
* @author Juergen Hoeller
* @since 2.0
* @see #setPoolSize

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2007 the original author or authors.
* Copyright 2002-2009 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -31,14 +31,10 @@ import java.util.concurrent.TimeUnit;
* uses a {@link Runnable} instance that is shared between repeated executions,
* in contrast to Quartz which creates a new Job instance for each execution.
*
* <p>This class is analogous to the {@link org.springframework.scheduling.timer.ScheduledTimerTask}
* class for the JDK 1.3 {@link java.util.Timer} facility.
*
* @author Juergen Hoeller
* @since 2.0
* @see java.util.concurrent.ScheduledExecutorService#scheduleWithFixedDelay(java.lang.Runnable, long, long, java.util.concurrent.TimeUnit)
* @see java.util.concurrent.ScheduledExecutorService#scheduleAtFixedRate(java.lang.Runnable, long, long, java.util.concurrent.TimeUnit)
* @see org.springframework.scheduling.timer.ScheduledTimerTask
*/
public class ScheduledExecutorTask {

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2008 the original author or authors.
* Copyright 2002-2009 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -33,18 +33,6 @@ import org.springframework.util.ClassUtils;
* <p>Inherits common configuration properties from
* {@link org.springframework.util.MethodInvoker}.
*
* <p>Useful to generically encapsulate a method invocation as timer task
* for <code>java.util.Timer</code>, in combination with a
* {@link org.springframework.scheduling.timer.DelegatingTimerTask} adapter.
* Can also be used with JDK 1.5's <code>java.util.concurrent.Executor</code>
* abstraction, which works with plain Runnables.
*
* <p>Extended by Spring's
* {@link org.springframework.scheduling.timer.MethodInvokingTimerTaskFactoryBean}
* adapter for <code>java.util.TimerTask</code>. Note that you can populate a
* ScheduledTimerTask object with a plain MethodInvokingRunnable instance
* as well, which will automatically get wrapped with a DelegatingTimerTask.
*
* @author Juergen Hoeller
* @since 1.2.4
* @see org.springframework.scheduling.timer.ScheduledTimerTask#setRunnable(Runnable)

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2008 the original author or authors.
* Copyright 2002-2009 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -32,7 +32,10 @@ import org.springframework.util.Assert;
*
* @author Juergen Hoeller
* @since 1.2.4
* @deprecated as of Spring 3.0, in favor of the <code>scheduling.concurrent</code>
* package which is based on Java 5's <code>java.util.concurrent.ExecutorService</code>
*/
@Deprecated
public class DelegatingTimerTask extends TimerTask {
private static final Log logger = LogFactory.getLog(DelegatingTimerTask.class);

View File

@ -37,7 +37,10 @@ import org.springframework.scheduling.support.MethodInvokingRunnable;
* @see ScheduledTimerTask#setRunnable
* @see org.springframework.scheduling.support.MethodInvokingRunnable
* @see org.springframework.beans.factory.config.MethodInvokingFactoryBean
* @deprecated as of Spring 3.0, in favor of the <code>scheduling.concurrent</code>
* package which is based on Java 5's <code>java.util.concurrent.ExecutorService</code>
*/
@Deprecated
public class MethodInvokingTimerTaskFactoryBean extends MethodInvokingRunnable implements FactoryBean<TimerTask> {
private TimerTask timerTask;

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2007 the original author or authors.
* Copyright 2002-2009 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -37,7 +37,10 @@ import java.util.TimerTask;
* @see java.util.TimerTask
* @see java.util.Timer#schedule(TimerTask, long, long)
* @see java.util.Timer#scheduleAtFixedRate(TimerTask, long, long)
* @deprecated as of Spring 3.0, in favor of the <code>scheduling.concurrent</code>
* package which is based on Java 5's <code>java.util.concurrent.ExecutorService</code>
*/
@Deprecated
public class ScheduledTimerTask {
private TimerTask timerTask;

View File

@ -46,7 +46,10 @@ import org.springframework.util.StringUtils;
* @see ScheduledTimerTask
* @see java.util.Timer
* @see java.util.TimerTask
* @deprecated as of Spring 3.0, in favor of the <code>scheduling.concurrent</code>
* package which is based on Java 5's <code>java.util.concurrent.ExecutorService</code>
*/
@Deprecated
public class TimerFactoryBean implements FactoryBean<Timer>, BeanNameAware, InitializingBean, DisposableBean {
protected final Log logger = LogFactory.getLog(getClass());

View File

@ -39,7 +39,10 @@ import org.springframework.util.StringUtils;
* @author Juergen Hoeller
* @since 2.0
* @see java.util.Timer
* @deprecated as of Spring 3.0, in favor of the <code>scheduling.concurrent</code>
* package which is based on Java 5's <code>java.util.concurrent.ExecutorService</code>
*/
@Deprecated
public class TimerTaskExecutor implements SchedulingTaskExecutor, BeanNameAware, InitializingBean, DisposableBean {
protected final Log logger = LogFactory.getLog(getClass());

View File

@ -27,7 +27,7 @@ import org.springframework.util.ConcurrencyThrottleSupport;
import org.springframework.util.CustomizableThreadCreator;
/**
* TaskExecutor implementation that fires up a new Thread for each task,
* {@link TaskExecutor} implementation that fires up a new Thread for each task,
* executing it asynchronously.
*
* <p>Supports limiting concurrent threads through the "concurrencyLimit"
@ -41,7 +41,6 @@ import org.springframework.util.CustomizableThreadCreator;
* @since 2.0
* @see #setConcurrencyLimit
* @see SyncTaskExecutor
* @see org.springframework.scheduling.timer.TimerTaskExecutor
* @see org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor
* @see org.springframework.scheduling.commonj.WorkManagerTaskExecutor
*/

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2006 the original author or authors.
* Copyright 2002-2009 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -16,16 +16,16 @@
package org.springframework.core.task;
import org.springframework.util.Assert;
import java.io.Serializable;
import org.springframework.util.Assert;
/**
* <code>TaskExecutor</code> implementation that executes each task
* <i>synchronously</i> in the calling thread.
*
* {@link TaskExecutor} implementation that executes each task <i>synchronously</i>
* in the calling thread.
*
* <p>Mainly intended for testing scenarios.
*
*
* <p>Execution in the calling thread does have the advantage of participating
* in it's thread context, for example the thread context class loader or the
* thread's current transaction association. That said, in many cases,
@ -33,9 +33,8 @@ import java.io.Serializable;
* <code>TaskExecutor</code> instead for such scenarios.
*
* @author Juergen Hoeller
* @see SimpleAsyncTaskExecutor
* @see org.springframework.scheduling.timer.TimerTaskExecutor
* @since 2.0
* @see SimpleAsyncTaskExecutor
*/
public class SyncTaskExecutor implements TaskExecutor, Serializable {