Module: AssMaintainer::InfoBase::ServerIb::EnterpriseServers::Support::OleRuntime Private

Included in:
AssMaintainer::InfoBase::ServerIb::EnterpriseServers::ServerAgent, WpConnection
Defined in:
lib/ass_maintainer/info_base/server_ib/enterprise_servers/support.rb

Overview

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

Ole runtime mixin

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.runtime_new(inst) ⇒ Module

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Make new runtime module AssOle::Runtimes::Claster::(Agent|Wp) for access to AssLauncher::Enterprise::Ole::(AgentConnection|WpConnection)

Parameters:

  • inst (#runtime_type)

    #runtime_type must returns :wp or :agent values

Returns:

  • (Module)


47
48
49
50
51
# File 'lib/ass_maintainer/info_base/server_ib/enterprise_servers/support.rb', line 47

def self.runtime_new(inst)
  Module.new do
    is_ole_runtime inst.runtime_type
  end
end

Instance Method Details

#_connect(host_port, platform_require) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



53
54
55
56
57
58
59
60
61
62
# File 'lib/ass_maintainer/info_base/server_ib/enterprise_servers/support.rb', line 53

def _connect(host_port, platform_require)
  runtime_run host_port, platform_require unless connected?
  begin
    authenticate unless authenticate?
  rescue
    runtime_stop
    raise
  end
  self
end

#authenticateObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



64
65
66
# File 'lib/ass_maintainer/info_base/server_ib/enterprise_servers/support.rb', line 64

def authenticate
  fail 'Abstract method'
end

#authenticate?Boolean

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:

  • (Boolean)


68
69
70
# File 'lib/ass_maintainer/info_base/server_ib/enterprise_servers/support.rb', line 68

def authenticate?
  fail 'Abstract method'
end

#connected?Boolean

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

True if connected

Returns:

  • (Boolean)


24
25
26
# File 'lib/ass_maintainer/info_base/server_ib/enterprise_servers/support.rb', line 24

def connected?
  respond_to?(:ole_runtime_get) && ole_runtime_get.runned?
end

#disconnectObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Close connection with 1C:Enterprise server



19
20
21
# File 'lib/ass_maintainer/info_base/server_ib/enterprise_servers/support.rb', line 19

def disconnect
  runtime_stop
end