01: /*
02: * Bossa Workflow System
03: *
04: * $Id: TimeSource.java,v 1.2 2004/02/24 19:25:58 gdvieira Exp $
05: *
06: * Copyright (C) 2003,2004 OpenBR Sistemas S/C Ltda.
07: *
08: * This file is part of Bossa.
09: *
10: * Bossa is free software; you can redistribute it and/or modify it
11: * under the terms of version 2 of the GNU General Public License as
12: * published by the Free Software Foundation.
13: *
14: * This program is distributed in the hope that it will be useful,
15: * but WITHOUT ANY WARRANTY; without even the implied warranty of
16: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17: * General Public License for more details.
18: *
19: * You should have received a copy of the GNU General Public
20: * License along with this program; if not, write to the
21: * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
22: * Boston, MA 02111-1307, USA.
23: */
24:
25: package com.bigbross.bossa;
26:
27: import java.io.Serializable;
28: import java.util.Date;
29:
30: /**
31: * This interface represents a time source used by the Bossa engine.
32: * A suitable implementation of this interface allows Bossa to behave
33: * deterministically with respect to time as an external agent. <p>
34: *
35: * If an instance of Bossa is persistent, it will use its own internal
36: * implementation of this interface in a way that is consistent with the
37: * underlaying prevalent mechanism. <p>
38: *
39: * If an instance of Bossa is transient, the client can provide an
40: * implementation of this interface that is consistent with the persistence
41: * mechanism employed, if any. If there is no need for the Bossa engine to
42: * treat time in a controlled way (for example, being deterministic), it is
43: * not necessary to provide an implementation of this interface. <p>
44: *
45: * @author <a href="http://www.bigbross.com">BigBross Team</a>
46: */
47: public interface TimeSource extends Serializable {
48:
49: /**
50: * Returns the current time. <p>
51: *
52: * @return the current time.
53: */
54: Date getTime();
55: }
|