Class: AssMaintainer::InfoBase::Session

Inherits:
Object
  • Object
show all
Defined in:
lib/ass_maintainer/info_base/server_ib.rb

Constant Summary collapse

EXCLUDE_APP_IDS =

AppID excluded from Interfaces::InfoBase#sessions array

  • SrvrConsole - cluster console
  • COMConsole - ole cluster console
  • OpenIDProvider - OpenID provider
  • RAS - administration server
%w{SrvrConsole COMConsole OpenIDProvider RAS}

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id, app_id, host, user, 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.

Returns a new instance of Session.

Parameters:

  • id (Fixnum)

    sessions id

  • app_id (String)

    client application id

  • host (String)

    client host name

  • user (Strin)

    infobase user

  • infobase (InfoBase)

    infobase instance



32
33
34
35
36
37
38
# File 'lib/ass_maintainer/info_base/server_ib.rb', line 32

def initialize(id, app_id, host, user, infobase)
  @id = id
  @app_id = app_id
  @host = host
  @user = user
  @infobase = infobase
end

Instance Attribute Details

#app_idObject (readonly)

see #initialize app_id



12
13
14
# File 'lib/ass_maintainer/info_base/server_ib.rb', line 12

def app_id
  @app_id
end

#hostObject (readonly)

see #initialize host



15
16
17
# File 'lib/ass_maintainer/info_base/server_ib.rb', line 15

def host
  @host
end

#idObject (readonly)

see #initialize id



18
19
20
# File 'lib/ass_maintainer/info_base/server_ib.rb', line 18

def id
  @id
end

#infobaseObject (readonly)

see #initialize infobase



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

def infobase
  @infobase
end

#userObject (readonly)

see #initialize user



21
22
23
# File 'lib/ass_maintainer/info_base/server_ib.rb', line 21

def user
  @user
end

Instance Method Details

#terminateObject

Terminate session



41
42
43
# File 'lib/ass_maintainer/info_base/server_ib.rb', line 41

def terminate
  infobase.send(:infobase_wrapper).terminate(self) unless terminated?
end

#terminated?Boolean

True if session is terminated

Returns:

  • (Boolean)


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

def terminated?
  infobase.send(:infobase_wrapper).session_get(id).empty?
end