Module mydata_did.v1_0.handlers.json_ld_processed_handler
Expand source code
from aries_cloudagent.messaging.base_handler import BaseHandler, BaseResponder, RequestContext
from ..messages.json_ld_processed import JSONLDProcessedMessage
from ..manager import ADAManager
import json
class JSONLDProcessedHandler(BaseHandler):
"""Handle for json-ld/1.0/processed-data message"""
async def handle(self, context: RequestContext, responder: BaseResponder):
"""
Message handler logic for json-ld/1.0/processed-data message.
"""
# Assert if received message is of type JSONLDProcessedMessage
assert isinstance(context.message, JSONLDProcessedMessage)
self._logger.info(
"Received json-ld/1.0/processed-data message: \n%s",
json.dumps(context.message.serialize(), indent=4)
)
# Initialize ADA manager
ada_manager = ADAManager(context)
# Call the function
await ada_manager.process_json_ld_processed_message(
json_ld_processed_message=context.message,
receipt=context.message_receipt,
)
Classes
class JSONLDProcessedHandler
-
Handle for json-ld/1.0/processed-data message
Initialize a BaseHandler instance.
Expand source code
class JSONLDProcessedHandler(BaseHandler): """Handle for json-ld/1.0/processed-data message""" async def handle(self, context: RequestContext, responder: BaseResponder): """ Message handler logic for json-ld/1.0/processed-data message. """ # Assert if received message is of type JSONLDProcessedMessage assert isinstance(context.message, JSONLDProcessedMessage) self._logger.info( "Received json-ld/1.0/processed-data message: \n%s", json.dumps(context.message.serialize(), indent=4) ) # Initialize ADA manager ada_manager = ADAManager(context) # Call the function await ada_manager.process_json_ld_processed_message( json_ld_processed_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 json-ld/1.0/processed-data message.
Expand source code
async def handle(self, context: RequestContext, responder: BaseResponder): """ Message handler logic for json-ld/1.0/processed-data message. """ # Assert if received message is of type JSONLDProcessedMessage assert isinstance(context.message, JSONLDProcessedMessage) self._logger.info( "Received json-ld/1.0/processed-data message: \n%s", json.dumps(context.message.serialize(), indent=4) ) # Initialize ADA manager ada_manager = ADAManager(context) # Call the function await ada_manager.process_json_ld_processed_message( json_ld_processed_message=context.message, receipt=context.message_receipt, )