Sha256: 85eea0d0a59ac8b28a9c521466526653b35494d818b2dfbbdaae9e181b84dd91

Contents?: true

Size: 647 Bytes

Versions: 25

Compression:

Stored size: 647 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

25 entries across 25 versions & 1 rubygems

Version Path
javonet-ruby-sdk-2.4.10 lib/javonet-ruby-sdk/Binaries/Python/Windows/X64/javonet/core/handler/AbstractCommandHandler.py
javonet-ruby-sdk-2.4.9 lib/javonet-ruby-sdk/Binaries/Python/Windows/X64/javonet/core/handler/AbstractCommandHandler.py
javonet-ruby-sdk-2.4.8 lib/javonet-ruby-sdk/Binaries/Python/Windows/X64/javonet/core/handler/AbstractCommandHandler.py
javonet-ruby-sdk-2.4.7 lib/javonet-ruby-sdk/Binaries/Python/Windows/X64/javonet/core/handler/AbstractCommandHandler.py
javonet-ruby-sdk-2.4.6 lib/javonet-ruby-sdk/Binaries/Python/Windows/X64/javonet/core/handler/AbstractCommandHandler.py
javonet-ruby-sdk-2.4.5 lib/javonet-ruby-sdk/Binaries/Python/Windows/X64/javonet/core/handler/CommandHandler/AbstractCommandHandler.py
javonet-ruby-sdk-2.4.4 lib/javonet-ruby-sdk/Binaries/Python/Windows/X64/javonet/core/handler/CommandHandler/AbstractCommandHandler.py
javonet-ruby-sdk-2.4.3 lib/javonet-ruby-sdk/Binaries/Python/Windows/X64/javonet/core/handler/CommandHandler/AbstractCommandHandler.py
javonet-ruby-sdk-2.4.2 lib/javonet-ruby-sdk/Binaries/Python/Windows/X64/javonet/core/handler/CommandHandler/AbstractCommandHandler.py
javonet-ruby-sdk-2.3.0 lib/javonet-ruby-sdk/Binaries/Python/Windows/X64/javonet/core/handler/CommandHandler/AbstractCommandHandler.py
javonet-ruby-sdk-2.2.0 lib/javonet-ruby-sdk/Binaries/Python/Windows/X64/javonet/core/handler/CommandHandler/AbstractCommandHandler.py
javonet-ruby-sdk-2.1.14 lib/javonet-ruby-sdk/Binaries/Python/Windows/X64/javonet/core/handler/CommandHandler/AbstractCommandHandler.py
javonet-ruby-sdk-2.1.13 lib/javonet-ruby-sdk/Binaries/Python/Windows/X64/javonet/core/handler/CommandHandler/AbstractCommandHandler.py
javonet-ruby-sdk-2.1.12 lib/javonet-ruby-sdk/Binaries/Python/Windows/X64/javonet/core/handler/CommandHandler/AbstractCommandHandler.py
javonet-ruby-sdk-2.1.11 lib/javonet-ruby-sdk/Binaries/Python/Windows/X64/javonet/core/handler/CommandHandler/AbstractCommandHandler.py
javonet-ruby-sdk-2.1.10 lib/javonet-ruby-sdk/Binaries/Python/Windows/X64/javonet/core/handler/CommandHandler/AbstractCommandHandler.py
javonet-ruby-sdk-2.1.9 lib/javonet-ruby-sdk/Binaries/Python/Windows/X64/javonet/core/handler/CommandHandler/AbstractCommandHandler.py
javonet-ruby-sdk-2.1.8 lib/javonet-ruby-sdk/Binaries/Python/Windows/X64/javonet/core/handler/CommandHandler/AbstractCommandHandler.py
javonet-ruby-sdk-2.1.7 lib/javonet-ruby-sdk/Binaries/Python/Windows/X64/javonet/core/handler/CommandHandler/AbstractCommandHandler.py
javonet-ruby-sdk-2.1.6 lib/javonet-ruby-sdk/Binaries/Python/Windows/X64/javonet/core/handler/CommandHandler/AbstractCommandHandler.py