public interface PCProcessOperationCallback extends PCTaskCallback
PCOperationsManager.processOperation(PCUser, PCOperation, List, List, PCProcessOperationCallback)
and related methods.
While processing an operation one of the following scenarios may appear:error(PCAbstractError)
is invoked. The error is type of PCError
or if
custom keys processor is used, the type of error may be one produced by that keys processor.error(PCAbstractError)
is invoked and the error is type of PCNetError
.result(PCOperation, List, List)
is invoked. Analyse each
PCConfirmationResult
and PCDeclinationResult
to find out if there were any errors.result(PCOperation, List, List)
is also invoked. You also have to analyse each
PCConfirmationResult
and PCDeclinationResult
to find out if there were any errors.PCOperation.getTransactions()
was reduced by the number of transactions intended to be processed.Modifier and Type | Method and Description |
---|---|
void |
error(PCAbstractError error)
An error which may occur:
Before processing the operation (e.g. |
void |
result(PCOperation operation,
java.util.List<PCConfirmationResult> confirmationResults,
java.util.List<PCDeclinationResult> declinationResults)
This method is called when there was no fatal error preventing the operation processing.
|
onTaskCancelled, onTaskCreated
void result(PCOperation operation, java.util.List<PCConfirmationResult> confirmationResults, java.util.List<PCDeclinationResult> declinationResults)
PCActionResult.getError()
and PCActionResult.getError()
return null (i.e., there were
no errors). If some transactions were ot processed PCActionResult.getError()
and
PCActionResult.getError()
will return an error describing the reason.operation
- The processed operation with rest of transactions which remain to be confirmed or
declined. If all transactions were processed, the operation with an empty list of
transactions is returned.confirmationResults
- List of results for transactions to be confirmed.
If PCActionResult.getError()
returns null, it is the evidence that
the transaction returned by PCActionResult.getTransaction()
was
confirmed successfully, otherwise it is the evidence that something went wrong and
the transaction has not been confirmed.declinationResults
- List of results for transactions to be declined.
If PCActionResult.getError()
returns null, it is the evidence that
the transaction returned by PCActionResult.getTransaction()
was
declined successfully, otherwise it is the evidence that something went wrong and
the transaction has not been declined.void error(PCAbstractError error)
PCError
is returned but if the non-default keys processor is used, the error may also be of some type
produced by this keys processor.error
- An error which prevents the processing of the whole operationPCRegularKeysProcessor