01: /*
02: * $Id: AsynchronousActivity.java 881 2007-02-12 07:54:31Z hengels $
03: * (c) Copyright 2004 con:cern development team.
04: *
05: * This file is part of con:cern (http://concern.sf.net).
06: *
07: * con:cern is free software; you can redistribute it and/or modify
08: * it under the terms of the GNU Lesser General Public License
09: * as published by the Free Software Foundation; either version 2.1
10: * of the License, or (at your option) any later version.
11: *
12: * Please see COPYING for the complete licence.
13: */
14: package org.concern.controller;
15:
16: import org.concern.AssignmentEvent;
17:
18: public interface AsynchronousActivity<S> extends Activity<S> {
19: /**
20: * The activity has to be completed before the timeout is reached.
21: * @return the timeout
22: */
23: int getTimeout();
24:
25: /**
26: * Tell wether the activity is optional.
27: * @return true, if activity is optional, false otherwise
28: */
29: boolean isOptional();
30:
31: /**
32: * This method is called by the controller right after the subject has been enlisted for this
33: * activity.
34: * @param subject the subject
35: * @throws ActivityExecutionException
36: */
37: void enlist(S subject) throws ActivityExecutionException;
38:
39: /**
40: * This method is called by the controller right before the subjects is delisted for this
41: * activity.
42: * @param subject the subject
43: * @throws ActivityExecutionException
44: */
45: void delist(S subject) throws ActivityExecutionException;
46:
47: void assign(S subject, String assignee, int level);
48:
49: void unassign(S subject, String assignee, int level);
50: }
|