Class: PipeRpc::Gateway
Instance Attribute Summary collapse
-
#client_wrapper_class_namespace ⇒ Object
Returns the value of attribute client_wrapper_class_namespace.
-
#subject_server_class_namespace ⇒ Object
Returns the value of attribute subject_server_class_namespace.
Instance Method Summary collapse
- #channel ⇒ Object
- #clients ⇒ Object
- #close(reason = 'manually closed') ⇒ Object
- #handle_message ⇒ Object
-
#initialize(channels) ⇒ Gateway
constructor
A new instance of Gateway.
- #loop_iteration=(iteration) ⇒ Object
- #off_received(on_received) ⇒ Object
- #off_sent(on_sent) ⇒ Object
- #on_received(&on_received) ⇒ Object
- #on_sent(&on_sent) ⇒ Object
- #servers ⇒ Object
Constructor Details
#initialize(channels) ⇒ Gateway
Returns a new instance of Gateway.
3 4 5 6 7 |
# File 'lib/pipe_rpc/gateway.rb', line 3 def initialize(channels) @hub = Hub.new(self, channels) @client_wrapper_class_namespace = ClientWrappers @subject_server_class_namespace = SubjectServers end |
Instance Attribute Details
#client_wrapper_class_namespace ⇒ Object
Returns the value of attribute client_wrapper_class_namespace.
9 10 11 |
# File 'lib/pipe_rpc/gateway.rb', line 9 def client_wrapper_class_namespace @client_wrapper_class_namespace end |
#subject_server_class_namespace ⇒ Object
Returns the value of attribute subject_server_class_namespace.
9 10 11 |
# File 'lib/pipe_rpc/gateway.rb', line 9 def subject_server_class_namespace @subject_server_class_namespace end |
Instance Method Details
#channel ⇒ Object
11 12 13 |
# File 'lib/pipe_rpc/gateway.rb', line 11 def channel @hub.channel end |
#clients ⇒ Object
19 20 21 |
# File 'lib/pipe_rpc/gateway.rb', line 19 def clients @hub.clients end |
#close(reason = 'manually closed') ⇒ Object
47 48 49 |
# File 'lib/pipe_rpc/gateway.rb', line 47 def close(reason = 'manually closed') @hub.socket.close(reason) end |
#handle_message ⇒ Object
27 28 29 |
# File 'lib/pipe_rpc/gateway.rb', line 27 def @hub. end |
#loop_iteration=(iteration) ⇒ Object
23 24 25 |
# File 'lib/pipe_rpc/gateway.rb', line 23 def loop_iteration=(iteration) @hub.requests.wait_for_results_through(iteration) end |
#off_received(on_received) ⇒ Object
43 44 45 |
# File 'lib/pipe_rpc/gateway.rb', line 43 def off_received(on_received) @hub.socket.off_received(on_received) end |
#off_sent(on_sent) ⇒ Object
35 36 37 |
# File 'lib/pipe_rpc/gateway.rb', line 35 def off_sent(on_sent) @hub.socket.off_sent(on_sent) end |
#on_received(&on_received) ⇒ Object
39 40 41 |
# File 'lib/pipe_rpc/gateway.rb', line 39 def on_received(&on_received) @hub.socket.on_received(&on_received) end |
#on_sent(&on_sent) ⇒ Object
31 32 33 |
# File 'lib/pipe_rpc/gateway.rb', line 31 def on_sent(&on_sent) @hub.socket.on_sent(&on_sent) end |
#servers ⇒ Object
15 16 17 |
# File 'lib/pipe_rpc/gateway.rb', line 15 def servers @hub.servers end |