Search in sources :

Example 1 with IFinalDistrStatusMessage

use of org.onap.sdc.api.consumer.IFinalDistrStatusMessage in project so by onap.

the class ASDCController method sendFinalDistributionStatus.

protected void sendFinalDistributionStatus(String distributionID, DistributionStatusEnum status, String errorReason) {
    logger.debug("Enter sendFinalDistributionStatus with DistributionID " + distributionID + " and Status of " + status.name() + " and ErrorReason " + errorReason);
    long subStarttime = System.currentTimeMillis();
    try {
        IFinalDistrStatusMessage finalDistribution = new FinalDistributionStatusMessage(distributionID, status, subStarttime, asdcConfig.getConsumerID());
        if (errorReason == null) {
            this.distributionClient.sendFinalDistrStatus(finalDistribution);
        } else {
            this.distributionClient.sendFinalDistrStatus(finalDistribution, errorReason);
        }
    } catch (RuntimeException e) {
        logger.debug("Exception caught in sendFinalDistributionStatus {}", e.getMessage());
        logger.warn(LoggingAnchor.FIVE, MessageEnum.ASDC_SEND_NOTIF_ASDC_EXEC.toString(), "ASDC", "sendASDCNotification", ErrorCode.SchemaError.getValue(), "RuntimeException - sendASDCNotification", e);
    }
}
Also used : IFinalDistrStatusMessage(org.onap.sdc.api.consumer.IFinalDistrStatusMessage)

Aggregations

IFinalDistrStatusMessage (org.onap.sdc.api.consumer.IFinalDistrStatusMessage)1