Package com.exedio.cope.util
Class EmptyJobContext
- java.lang.Object
-
- com.exedio.cope.util.EmptyJobContext
-
- All Implemented Interfaces:
JobContext
public class EmptyJobContext extends Object implements JobContext
An empty implementation ofJobContext
. All methods implementingJobContext
do as little as possible as allowed by the specification ofJobContext
. You may want to subclass this class instead of implementingJobContext
directly to make your subclass cope with new methods inJobContext
.
-
-
Constructor Summary
Constructors Constructor Description EmptyJobContext()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
incrementProgress()
This default implementation callsincrementProgress
(1).void
incrementProgress(int delta)
This default implementation does nothing.void
setCompleteness(double completeness)
This default implementation does nothing.void
setMessage(String message)
This default implementation does nothing.void
stopIfRequested()
This default implementation does nothing.boolean
supportsCompleteness()
This default implementation always returns false.boolean
supportsMessage()
This default implementation always returns false.boolean
supportsProgress()
This default implementation always returns false.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.exedio.cope.util.JobContext
requestsDeferral, sleepAndStopIfRequested
-
-
-
-
Method Detail
-
stopIfRequested
public void stopIfRequested() throws JobStop
This default implementation does nothing.- Specified by:
stopIfRequested
in interfaceJobContext
- Throws:
JobStop
-
supportsMessage
public boolean supportsMessage()
This default implementation always returns false.- Specified by:
supportsMessage
in interfaceJobContext
-
setMessage
public void setMessage(String message)
This default implementation does nothing.- Specified by:
setMessage
in interfaceJobContext
-
supportsProgress
public boolean supportsProgress()
This default implementation always returns false.- Specified by:
supportsProgress
in interfaceJobContext
-
incrementProgress
public void incrementProgress()
This default implementation callsincrementProgress
(1).- Specified by:
incrementProgress
in interfaceJobContext
-
incrementProgress
public void incrementProgress(int delta)
This default implementation does nothing.- Specified by:
incrementProgress
in interfaceJobContext
-
supportsCompleteness
public boolean supportsCompleteness()
This default implementation always returns false.- Specified by:
supportsCompleteness
in interfaceJobContext
-
setCompleteness
public void setCompleteness(double completeness)
This default implementation does nothing.- Specified by:
setCompleteness
in interfaceJobContext
-
-