Module: AssMaintainer::InfoBase::ServerIb::EnterpriseServers::ServerAgent Private
- Includes:
- AssMaintainer::InfoBase::ServerIb::EnterpriseServers::Support::OleRuntime, AssMaintainer::InfoBase::ServerIb::EnterpriseServers::Support::Reconnect, AssMaintainer::InfoBase::ServerIb::EnterpriseServers::Support::ServerConnection
- Defined in:
- lib/ass_maintainer/info_base/server_ib/enterprise_servers/server_agent.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.
Object descrbed 1C server agent connection.
Instance Attribute Summary
Attributes included from AssMaintainer::InfoBase::ServerIb::EnterpriseServers::Support::ServerConnection
#host, #password, #port, #user
Class Method Summary collapse
-
.new(host_port, user, password) ⇒ Object
private
Make new object of anonymous class which included this module.
Instance Method Summary collapse
- #authenticate ⇒ Object private
-
#authenticate? ⇒ Boolean
private
True if #AssMaintainer::InfoBase::ServerIb::EnterpriseServers::Support::ServerConnection#user authenticate.
-
#cluster_find(host, port) ⇒ nil WIN32OLE
private
IClusterInfoole object. -
#connect(platform_require) ⇒ Object
private
Connect to 1C:Eneterprise server via OLE AssMaintainer::InfoBase::ServerIb::EnterpriseServers::Support::OleRuntime.runtime_new module 1C:Eneterprise version required.
-
#default_port ⇒ String
private
Wrapper for DEFAULT_SAGENT_PORT.
- #platform_require ⇒ Object private
- #runtime_type ⇒ Object private
Methods included from AssMaintainer::InfoBase::ServerIb::EnterpriseServers::Support::OleRuntime
#_connect, #connected?, #disconnect, runtime_new
Methods included from AssMaintainer::InfoBase::ServerIb::EnterpriseServers::Support::ServerConnection
#eql?, #host_port, #initialize, #ping?, #tcp_ping
Class Method Details
.new(host_port, user, password) ⇒ 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.
Make new object of anonymous class which included this module.
26 27 28 29 30 |
# File 'lib/ass_maintainer/info_base/server_ib/enterprise_servers/server_agent.rb', line 26 def self.new(host_port, user, password) Class.new do include ServerAgent end.new host_port, user, password end |
Instance Method Details
#authenticate ⇒ 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.
Authenticate AssMaintainer::InfoBase::ServerIb::EnterpriseServers::Support::ServerConnection#user
53 54 55 56 |
# File 'lib/ass_maintainer/info_base/server_ib/enterprise_servers/server_agent.rb', line 53 def authenticate AuthenticateAgent(user.to_s, password.to_s) if\ connected? && !authenticate? 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.
True if #AssMaintainer::InfoBase::ServerIb::EnterpriseServers::Support::ServerConnection#user authenticate
59 60 61 62 63 64 65 66 67 |
# File 'lib/ass_maintainer/info_base/server_ib/enterprise_servers/server_agent.rb', line 59 def authenticate? return false unless connected? begin ole_connector.GetAgentAdmins rescue WIN32OLERuntimeError return false end true end |
#cluster_find(host, port) ⇒ nil WIN32OLE
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 IClusterInfo ole object.
71 72 73 74 75 76 |
# File 'lib/ass_maintainer/info_base/server_ib/enterprise_servers/server_agent.rb', line 71 def cluster_find(host, port) reconnect GetClusters().find do |cl| cl.HostName.upcase == host.upcase && cl.MainPort == port.to_i end end |
#connect(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.
while connecting in instance class will be included
Connect to 1C:Eneterprise server via OLE AssMaintainer::InfoBase::ServerIb::EnterpriseServers::Support::OleRuntime.runtime_new module 1C:Eneterprise version required
47 48 49 |
# File 'lib/ass_maintainer/info_base/server_ib/enterprise_servers/server_agent.rb', line 47 def connect(platform_require) _connect(host_port, platform_require) end |
#default_port ⇒ String
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 wrapper for DEFAULT_SAGENT_PORT.
33 34 35 |
# File 'lib/ass_maintainer/info_base/server_ib/enterprise_servers/server_agent.rb', line 33 def default_port InfoBase::DEFAULT_SAGENT_PORT end |
#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.
78 79 80 81 |
# File 'lib/ass_maintainer/info_base/server_ib/enterprise_servers/server_agent.rb', line 78 def platform_require return unless connected? ole_connector.send(:__ole_binary__).requirement.to_s end |
#runtime_type ⇒ 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.
37 38 39 |
# File 'lib/ass_maintainer/info_base/server_ib/enterprise_servers/server_agent.rb', line 37 def runtime_type :agent end |