Sha256: a2b14cfb06db7b9185a7ea588c3eb12cb8548a6c451893b5e2472ff210043603

Contents?: true

Size: 646 Bytes

Versions: 30

Compression:

Stored size: 646 Bytes

Contents

require_relative '../references_cache'
require_relative 'abstract_command_handler'

class ResolveInstanceHandler < AbstractCommandHandler
  def initialize
    @required_parameters_count = 1
  end

  def process(command)
    return resolve_reference(command)
  end

  def resolve_reference(command)
    if command.payload.length != @required_parameters_count
      raise ArgumentError.new "Resolve Instance parameters mismatch"
    end
    begin
      references_cache = ReferencesCache.instance
      return references_cache.resolve_reference(command.payload[0])
    rescue Exception => ex
      return ex
    end
  end
end

Version data entries

30 entries across 15 versions & 1 rubygems

Version Path
javonet-ruby-sdk-2.4.5 lib/javonet-ruby-sdk/Binaries/Ruby/Windows/X64/core/handler/command_handler/resolve_instance_handler.rb
javonet-ruby-sdk-2.4.5 lib/javonet-ruby-sdk/core/handler/command_handler/resolve_instance_handler.rb
javonet-ruby-sdk-2.4.4 lib/javonet-ruby-sdk/core/handler/command_handler/resolve_instance_handler.rb
javonet-ruby-sdk-2.4.4 lib/javonet-ruby-sdk/Binaries/Ruby/Windows/X64/core/handler/command_handler/resolve_instance_handler.rb
javonet-ruby-sdk-2.4.3 lib/javonet-ruby-sdk/Binaries/Ruby/Windows/X64/core/handler/command_handler/resolve_instance_handler.rb
javonet-ruby-sdk-2.4.3 lib/javonet-ruby-sdk/core/handler/command_handler/resolve_instance_handler.rb
javonet-ruby-sdk-2.4.2 lib/javonet-ruby-sdk/Binaries/Ruby/Windows/X64/core/handler/command_handler/resolve_instance_handler.rb
javonet-ruby-sdk-2.4.2 lib/javonet-ruby-sdk/core/handler/command_handler/resolve_instance_handler.rb
javonet-ruby-sdk-2.3.0 lib/javonet-ruby-sdk/Binaries/Ruby/Windows/X64/core/handler/command_handler/resolve_instance_handler.rb
javonet-ruby-sdk-2.3.0 lib/javonet-ruby-sdk/core/handler/command_handler/resolve_instance_handler.rb
javonet-ruby-sdk-2.2.0 lib/javonet-ruby-sdk/core/handler/command_handler/resolve_instance_handler.rb
javonet-ruby-sdk-2.2.0 lib/javonet-ruby-sdk/Binaries/Ruby/Windows/X64/core/handler/command_handler/resolve_instance_handler.rb
javonet-ruby-sdk-2.1.14 lib/javonet-ruby-sdk/core/handler/command_handler/resolve_instance_handler.rb
javonet-ruby-sdk-2.1.14 lib/javonet-ruby-sdk/Binaries/Ruby/Windows/X64/core/handler/command_handler/resolve_instance_handler.rb
javonet-ruby-sdk-2.1.13 lib/javonet-ruby-sdk/Binaries/Ruby/Windows/X64/core/handler/command_handler/resolve_instance_handler.rb
javonet-ruby-sdk-2.1.13 lib/javonet-ruby-sdk/core/handler/command_handler/resolve_instance_handler.rb
javonet-ruby-sdk-2.1.12 lib/javonet-ruby-sdk/core/handler/command_handler/resolve_instance_handler.rb
javonet-ruby-sdk-2.1.12 lib/javonet-ruby-sdk/Binaries/Ruby/Windows/X64/core/handler/command_handler/resolve_instance_handler.rb
javonet-ruby-sdk-2.1.11 lib/javonet-ruby-sdk/core/handler/command_handler/resolve_instance_handler.rb
javonet-ruby-sdk-2.1.11 lib/javonet-ruby-sdk/Binaries/Ruby/Windows/X64/core/handler/command_handler/resolve_instance_handler.rb