public class TAPExecutionDurationController extends java.lang.Object implements InputParamController
Let controlling the execution duration of all jobs managed by a TAP service. The maximum and default values are provided by the service connection.
Note:
By default, the execution duration can be modified by anyone without any limitation.
The default value is UWSJob.UNLIMITED_DURATION
.
The logic of the execution duration is set in this class. Here it is:
UWSJob.UNLIMITED_DURATION
).Modifier and Type | Field and Description |
---|---|
protected boolean |
allowModification
Indicate whether the execution duration of jobs can be modified.
|
protected ServiceConnection |
service
Connection to the service which knows the maximum and default value of this parameter.
|
Constructor and Description |
---|
TAPExecutionDurationController(ServiceConnection service)
Build a controller for the ExecutionDuration parameter.
|
Modifier and Type | Method and Description |
---|---|
boolean |
allowModification()
Tells whether the controlled parameter may be modified after initialization.
|
void |
allowModification(boolean allowModif)
Let indicate whether the execution duration of any managed job can be modified.
|
java.lang.Object |
check(java.lang.Object value)
Checks the value of the controlled parameter and builds a new object from this value.
|
java.lang.Object |
getDefault()
Returns the default value of the controlled parameter.
|
long |
getMaxDuration()
Gets the maximum execution duration.
|
protected final ServiceConnection service
protected boolean allowModification
public TAPExecutionDurationController(ServiceConnection service)
service
- Connection to the TAP service.public final boolean allowModification()
InputParamController
allowModification
in interface InputParamController
public final void allowModification(boolean allowModif)
allowModif
- true if the execution duration can be modified, false otherwise.public final java.lang.Object getDefault()
InputParamController
getDefault
in interface InputParamController
public final long getMaxDuration()
public java.lang.Object check(java.lang.Object value) throws UWSException
InputParamController
Checks the value of the controlled parameter and builds a new object from this value.
check
in interface InputParamController
value
- Parameter value to check.UWSException
- If the given value is strongly incorrect.