01: package com.bm.utils.substitues;
02:
03: import java.io.Serializable;
04: import java.util.ArrayList;
05: import java.util.Collection;
06: import java.util.Date;
07:
08: import javax.ejb.EJBException;
09: import javax.ejb.Timer;
10: import javax.ejb.TimerService;
11:
12: /**
13: * Implementation which is not doing anything.
14: * @author Daniel Wiese
15: * @since Jul 24, 2007
16: */
17: public class FakedTimerService implements TimerService {
18:
19: /**
20: * {@inheritDoc}
21: */
22: public Timer createTimer(long duration, Serializable info)
23: throws IllegalArgumentException, IllegalStateException,
24: EJBException {
25: return new FakedTimer();
26: }
27:
28: /**
29: * {@inheritDoc}
30: */
31: public Timer createTimer(long initialDuration,
32: long intervalDuration, Serializable info)
33: throws IllegalArgumentException, IllegalStateException,
34: EJBException {
35: return new FakedTimer();
36: }
37:
38: /**
39: * {@inheritDoc}
40: */
41: public Timer createTimer(Date expiration, Serializable info)
42: throws IllegalArgumentException, IllegalStateException,
43: EJBException {
44: return new FakedTimer();
45: }
46:
47: /**
48: * {@inheritDoc}
49: */
50: public Timer createTimer(Date initialExpiration,
51: long intervalDuration, Serializable info)
52: throws IllegalArgumentException, IllegalStateException,
53: EJBException {
54: return new FakedTimer();
55: }
56:
57: /**
58: * {@inheritDoc}
59: */
60: public Collection getTimers() throws IllegalStateException,
61: EJBException {
62: return new ArrayList<Timer>();
63: }
64:
65: }
|