Class: AssMaintainer::InfoBase::ServerIb::EnterpriseServers::Wrappers::Session Private

Inherits:
Object
  • Object
show all
Includes:
Support::SendToOle
Defined in:
lib/ass_maintainer/info_base/server_ib/enterprise_servers.rb

Overview

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

Wrapper for 1C:Enterprise ISessionInfo ole object

API:

  • private

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Support::SendToOle

#method_missing

Constructor Details

#initialize(ole, cluster) ⇒ Session

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 a new instance of Session.

API:

  • private



59
60
61
# File 'lib/ass_maintainer/info_base/server_ib/enterprise_servers.rb', line 59

def initialize(ole, cluster)
  @ole, @cluster, @sagent = ole, cluster, cluster.sagent
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class AssMaintainer::InfoBase::ServerIb::EnterpriseServers::Support::SendToOle

Instance Attribute Details

#clusterEnterpriseServers::Cluster (readonly)

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.

registred

Returns:

  • cluster where session

API:

  • private



51
52
53
# File 'lib/ass_maintainer/info_base/server_ib/enterprise_servers.rb', line 51

def cluster
  @cluster
end

#oleObject (readonly)

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 ISessionInfo ole object.

Returns:

  • ISessionInfo ole object

API:

  • private



46
47
48
# File 'lib/ass_maintainer/info_base/server_ib/enterprise_servers.rb', line 46

def ole
  @ole
end

#sagentEnterpriseServers::ServerAgent (readonly)

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.

registred

Returns:

  • 1C server where session

API:

  • private



56
57
58
# File 'lib/ass_maintainer/info_base/server_ib/enterprise_servers.rb', line 56

def sagent
  @sagent
end

Instance Method Details

#terminateObject

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.

Terminate session

API:

  • private



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

def terminate
  sagent.TerminateSession(cluster.ole, ole)
rescue WIN32OLERuntimeError
end

#to_session(infobase) ⇒ InfoBase::Session

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.

Parameters:

  • instance

Returns:

API:

  • private



71
72
73
74
# File 'lib/ass_maintainer/info_base/server_ib/enterprise_servers.rb', line 71

def to_session(infobase)
  InfoBase::Session
    .new SessionId(), AppId(), Host(), UserName(), infobase
end