Sha256: 6521100e865b8aa2a973c75fdd3eea8ec98de588cb11a6b0e1153633c83b21ac

Contents?: true

Size: 627 Bytes

Versions: 59

Compression:

Stored size: 627 Bytes

Contents

from javonet.core.handler.HandlerDictionary import handler_dict
from javonet.utils.Command import Command


class AbstractCommandHandler:
    _required_parameters_count = 0

    def process(self, command):
        pass

    def handle_command(self, command):
        self.__iterate(command)
        return self.process(command)

    @staticmethod
    def __iterate(command):
        for i in range(0, len(command.payload)):
            if isinstance(command.payload[i], Command):
                command.payload[i] = handler_dict.get(command.payload[i].command_type).handle_command(
                        command.payload[i])

Version data entries

59 entries across 34 versions & 1 rubygems

Version Path
javonet-ruby-sdk-2.5.7 lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/AbstractCommandHandler.py
javonet-ruby-sdk-2.5.6 lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/AbstractCommandHandler.py
javonet-ruby-sdk-2.5.5 lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/AbstractCommandHandler.py
javonet-ruby-sdk-2.5.4 lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/AbstractCommandHandler.py
javonet-ruby-sdk-2.5.3 lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/AbstractCommandHandler.py
javonet-ruby-sdk-2.5.2 lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/AbstractCommandHandler.py
javonet-ruby-sdk-2.5.1 lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/AbstractCommandHandler.py
javonet-ruby-sdk-2.5.0 lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/AbstractCommandHandler.py
javonet-ruby-sdk-2.4.11 lib/javonet-ruby-sdk/Binaries/Python/javonet/core/handler/AbstractCommandHandler.py
javonet-ruby-sdk-2.4.10 lib/javonet-ruby-sdk/Binaries/Python/Linux/X64/javonet/core/handler/AbstractCommandHandler.py
javonet-ruby-sdk-2.4.10 lib/javonet-ruby-sdk/Binaries/Python/MacOs/X64/javonet/core/handler/AbstractCommandHandler.py
javonet-ruby-sdk-2.4.9 lib/javonet-ruby-sdk/Binaries/Python/Linux/X64/javonet/core/handler/AbstractCommandHandler.py
javonet-ruby-sdk-2.4.9 lib/javonet-ruby-sdk/Binaries/Python/MacOs/X64/javonet/core/handler/AbstractCommandHandler.py
javonet-ruby-sdk-2.4.8 lib/javonet-ruby-sdk/Binaries/Python/Linux/X64/javonet/core/handler/AbstractCommandHandler.py
javonet-ruby-sdk-2.4.8 lib/javonet-ruby-sdk/Binaries/Python/MacOs/X64/javonet/core/handler/AbstractCommandHandler.py
javonet-ruby-sdk-2.4.7 lib/javonet-ruby-sdk/Binaries/Python/Linux/X64/javonet/core/handler/AbstractCommandHandler.py
javonet-ruby-sdk-2.4.7 lib/javonet-ruby-sdk/Binaries/Python/MacOs/X64/javonet/core/handler/AbstractCommandHandler.py
javonet-ruby-sdk-2.4.6 lib/javonet-ruby-sdk/Binaries/Python/Linux/X64/javonet/core/handler/AbstractCommandHandler.py
javonet-ruby-sdk-2.4.6 lib/javonet-ruby-sdk/Binaries/Python/MacOs/X64/javonet/core/handler/AbstractCommandHandler.py
javonet-ruby-sdk-2.4.5 lib/javonet-ruby-sdk/Binaries/Python/Linux/X64/javonet/core/handler/CommandHandler/AbstractCommandHandler.py