Module mydata_did.v1_0.handlers.data_agreement_problem_report_handler
Expand source code
from aries_cloudagent.messaging.base_handler import BaseHandler, BaseResponder, RequestContext
from ..messages.problem_report import DataAgreementProblemReport
from ..manager import ADAManager
import json
class DataAgreementProblemReportHandler(BaseHandler):
"""Handle for data-agreements/1.0/problem-report message"""
async def handle(self, context: RequestContext, responder: BaseResponder):
"""
Message handler logic for data-agreements/1.0/problem-report message.
"""
# Assert if received message is of type DataAgreementProblemReport
assert isinstance(context.message, DataAgreementProblemReport)
self._logger.info(
"Received create-did message: \n%s",
json.dumps(context.message.serialize(), indent=4)
)
# Initialize ADA manager
ada_manager = ADAManager(context)
await ada_manager.process_data_agreement_problem_report_message(
data_agreement_problem_report_message=context.message,
receipt=context.message_receipt,
)
Classes
class DataAgreementProblemReportHandler
-
Handle for data-agreements/1.0/problem-report message
Initialize a BaseHandler instance.
Expand source code
class DataAgreementProblemReportHandler(BaseHandler): """Handle for data-agreements/1.0/problem-report message""" async def handle(self, context: RequestContext, responder: BaseResponder): """ Message handler logic for data-agreements/1.0/problem-report message. """ # Assert if received message is of type DataAgreementProblemReport assert isinstance(context.message, DataAgreementProblemReport) self._logger.info( "Received create-did message: \n%s", json.dumps(context.message.serialize(), indent=4) ) # Initialize ADA manager ada_manager = ADAManager(context) await ada_manager.process_data_agreement_problem_report_message( data_agreement_problem_report_message=context.message, receipt=context.message_receipt, )
Ancestors
- aries_cloudagent.messaging.base_handler.BaseHandler
- abc.ABC
Methods
async def handle(self, context: aries_cloudagent.messaging.request_context.RequestContext, responder: aries_cloudagent.messaging.responder.BaseResponder)
-
Message handler logic for data-agreements/1.0/problem-report message.
Expand source code
async def handle(self, context: RequestContext, responder: BaseResponder): """ Message handler logic for data-agreements/1.0/problem-report message. """ # Assert if received message is of type DataAgreementProblemReport assert isinstance(context.message, DataAgreementProblemReport) self._logger.info( "Received create-did message: \n%s", json.dumps(context.message.serialize(), indent=4) ) # Initialize ADA manager ada_manager = ADAManager(context) await ada_manager.process_data_agreement_problem_report_message( data_agreement_problem_report_message=context.message, receipt=context.message_receipt, )