Class: MINT::BrowserScreen

Inherits:
Screen show all
Defined in:
lib/MINT-core/model/ir/browserscreen.rb

Constant Summary

Constants inherited from Interactor

Interactor::PUBLISH_ATTRIBUTES

Instance Method Summary collapse

Methods inherited from Interactor

class_from_channel_name, #create_attribute_channel_name, create_channel_name, #create_channel_w_name, get, getModel, get_dm, #init_statemachine, #is_in?, #new_states, notify, #process_event, #process_event!, #process_event_vars, #publish_update, #states, #states=, #sync_event, #sync_states, #to_dot, wait

Methods included from InteractorHelpers

#restart_timeout, #start_timeout, #stop_timeout

Instance Method Details

#getSCXMLObject



4
5
6
# File 'lib/MINT-core/model/ir/browserscreen.rb', line 4

def getSCXML
  "#{File.dirname(__FILE__)}/browserscreen.scxml"
end

#subscribe_for_refreshObject



8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/MINT-core/model/ir/browserscreen.rb', line 8

def subscribe_for_refresh
  return if @subscribed

  redis = RedisConnector.redis

  fiber = Fiber.current

  redis.pubsub.psubscribe('in_channel:Interactor.BrowserScreen.reload*') { |key,message|
    if message
      process_event :reload
    end

  }.callback {  @subscribed = true; fiber.resume}
  Fiber.yield


end