Sha256: c74bd7865b44217bc16cd596dc8e4cffa366b05d5c99a50cb0d17c903646f02f
Contents?: true
Size: 942 Bytes
Versions: 5
Compression:
Stored size: 942 Bytes
Contents
from javonet.core.delegateCache.DelegatesCache import DelegatesCache from javonet.core.handler.AbstractCommandHandler import * class InvokeDelegateHandler(AbstractCommandHandler): def __init__(self): self._required_parameters_count = 1 def process(self, command): try: if len(command.payload) != self._required_parameters_count: raise Exception("ResolveInstanceHandler parameters mismatch!") delegates_cache = DelegatesCache() method = delegates_cache.resolve_delegate(command) if len(command.payload) > 1: method_arguments = command.payload[1:] return method(*method_arguments) else: return method() except Exception as e: exc_type, exc_value = type(e), e new_exc = exc_type(exc_value).with_traceback(e.__traceback__) raise new_exc from None
Version data entries
5 entries across 5 versions & 1 rubygems