Revision 4709
Added by daigle over 15 years ago
BaseService.java | ||
---|---|---|
35 | 35 |
*/ |
36 | 36 |
public abstract class BaseService { |
37 | 37 |
|
38 |
public abstract boolean refreshable(); |
|
38 |
// package level method reporting if service is refreshable. Basically, |
|
39 |
// we only want ServiceService calling this. |
|
40 |
abstract boolean refreshable(); |
|
39 | 41 |
|
40 |
protected abstract void doRefresh(); |
|
42 |
// subclass must define doRefresh. It is only called from the refresh() method. |
|
43 |
protected abstract void doRefresh() throws ServiceException; |
|
41 | 44 |
|
42 |
public void refresh() { |
|
45 |
// package level method to refresh service. We only want ServiceService |
|
46 |
// calling this. |
|
47 |
void refresh() throws ServiceException{ |
|
43 | 48 |
if (refreshable()) { |
44 | 49 |
doRefresh(); |
45 | 50 |
} |
46 | 51 |
} |
52 |
|
|
53 |
// abstract void stop() throws ServiceException; |
|
47 | 54 |
|
48 | 55 |
} |
Also available in: Unified diff
Implement refresh methods inherited from base class