01: /*
02: * $Id: SynchronousActivity.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: public interface SynchronousActivity<S> extends Activity<S> {
17: /**
18: * Retry to execute the activity after a delay.
19: * @return the retry delay
20: */
21: int getRetryDelay();
22:
23: /**
24: * Try to execute the activity at maximum n times.
25: * @return the maximum trials
26: */
27: int getTrials();
28:
29: /**
30: * This method is called by the controller, when the precondition is matching.
31: * @param subject identifies the subject
32: * @throws ActivityExecutionException
33: */
34: void execute(S subject) throws ActivityExecutionException;
35: }
|