Package overit.geocall.da
Class BoundedTask
java.lang.Object
overit.geocall.da.DATask
overit.geocall.da.BoundedTask
- All Implemented Interfaces:
Serializable,Runnable,Identified,Tool
This abstract class, that extends the
DATask, must be extended to create a task that performs
operation on a request and returns as a result a response that can be validated using an ObjectValidator.
If the response will be not valid, the task will throw a DAException.- See Also:
-
Field Summary
Fields inherited from class overit.geocall.da.DATask
_usedConnections, _usedCouriers -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidbody()Abstract method, that must be implemented, that represent the start point of the task.abstract voidexecute(PooledConnection conn) Abstract method, that must be implemented, that represent the start point of the task.protected final ObjectReturns the requestfinal ObjectReturns the responsefinal voidsetRequest(Object r) Sets the requestprotected final voidfinal voidsetResponseBound(ObjectValidator bound) Sets theObjectValidatorthat will be used to validate the task responseMethods inherited from class overit.geocall.da.DATask
commit, deliverCourier, getConnection, getDA, getIdentity, getServiceConnection, holdFactoryCourier, holdUserCourier, releaseConnection, rollback, run, setIdentity, start, startInBackground, synchronizeOn
-
Constructor Details
-
BoundedTask
public BoundedTask()
-
-
Method Details
-
setRequest
Sets the request- Parameters:
r- The Object that defines the request for the task
-
getRequest
Returns the request- Returns:
- The Object that represents the request for the task
-
getResponse
Returns the response- Returns:
- The Object that represents the response for the task
-
setResponse
- Throws:
DAException
-
setResponseBound
Sets theObjectValidatorthat will be used to validate the task response- Parameters:
bound- TheObjectValidatorused by the task
-
body
Description copied from class:DATaskAbstract method, that must be implemented, that represent the start point of the task. The method contains the application logic of the specific task.- Specified by:
bodyin classDATask- Throws:
DAException- If there is a (blocking) data-access error, a DAException is thrown to the callerDAValidateException- If there are error in the data validation phase, a DAValidateException is thrown
-
execute
Abstract method, that must be implemented, that represent the start point of the task. The method contains the application logic of the specific task.- Parameters:
conn- ThePooledConnectionthat must be used- Throws:
DAException- If there is a (blocking) data-access error, a DAException is thrown to the callerDAValidateException- If there are error in the data validation phase, a DAValidateException is thrown
-