01: /*
02: * This file is part of the WfMOpen project.
03: * Copyright (C) 2001-2003 Danet GmbH (www.danet.de), GS-AN.
04: * All rights reserved.
05: *
06: * This program is free software; you can redistribute it and/or modify
07: * it under the terms of the GNU General Public License as published by
08: * the Free Software Foundation; either version 2 of the License, or
09: * (at your option) any later version.
10: *
11: * This program is distributed in the hope that it will be useful,
12: * but WITHOUT ANY WARRANTY; without even the implied warranty of
13: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14: * GNU General Public License for more details.
15: *
16: * You should have received a copy of the GNU General Public License
17: * along with this program; if not, write to the Free Software
18: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19: *
20: * $Id: TimedObject.java,v 1.4 2007/05/03 21:58:18 mlipp Exp $
21: *
22: * $Log: TimedObject.java,v $
23: * Revision 1.4 2007/05/03 21:58:18 mlipp
24: * Internal refactoring for making better use of local EJBs.
25: *
26: * Revision 1.3 2006/09/29 12:32:08 drmlipp
27: * Consistently using WfMOpen as projct name now.
28: *
29: * Revision 1.2 2005/01/10 16:23:17 drmlipp
30: * Added missing serializability.
31: *
32: * Revision 1.1.1.1 2003/12/19 13:01:30 drmlipp
33: * Updated to 1.1rc1
34: *
35: * Revision 1.1 2003/09/22 14:56:47 lipp
36: * Moved code to Deadline.
37: *
38: */
39: package de.danet.an.workflow.domain;
40:
41: import java.io.Serializable;
42: import java.util.Date;
43:
44: /**
45: * This interface is implemented by domain objects that want to have
46: * associated timers.
47: *
48: * @author <a href="mailto:lipp@danet.de">Michael Lipp</a>
49: * @version $Revision: 1.4 $
50: */
51:
52: public interface TimedObject extends Serializable {
53:
54: /**
55: * Start a timer that will call <code>handleTimeout</code> at the
56: * given date with the given info.
57: * @param due target date
58: * @param info the context
59: */
60: void startTimer(Date due, Serializable info);
61:
62: /**
63: * Stop all timers that this object has created.
64: */
65: void stopTimers();
66:
67: /**
68: * Handle the timeout of a timer.
69: * @param info the context.
70: */
71: void handleTimeout(Serializable info);
72:
73: }
|