01: /*
02: * $Id: AbstractSynchronousActivity.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 abstract class AbstractSynchronousActivity<S> extends
17: AbstractActivity<S> implements SynchronousActivity<S> {
18: protected AbstractSynchronousActivity() {
19: }
20:
21: protected AbstractSynchronousActivity(String name) {
22: super (name);
23: }
24:
25: public int getRetryDelay() {
26: Integer integer = (Integer) getEnvironment().get(
27: "activity.retryDelay");
28: return integer != null ? integer.intValue() : 0;
29: }
30:
31: public int getTrials() {
32: Integer integer = (Integer) getEnvironment().get(
33: "activity.trials");
34: return integer != null ? integer.intValue() : 1;
35: }
36: }
|