Class: Baykit::BayServer::Agent::Multiplexer::TaxiMultiplexer::TaxiForMpx
- Inherits:
-
Taxi::Taxi
- Object
- Common::Vehicle
- Taxi::Taxi
- Baykit::BayServer::Agent::Multiplexer::TaxiMultiplexer::TaxiForMpx
- Defined in:
- lib/baykit/bayserver/agent/multiplexer/taxi_multiplexer.rb
Instance Attribute Summary collapse
-
#for_read ⇒ Object
readonly
Returns the value of attribute for_read.
-
#rudder_state ⇒ Object
readonly
Returns the value of attribute rudder_state.
Attributes inherited from Taxi::Taxi
Attributes inherited from Common::Vehicle
Instance Method Summary collapse
- #depart ⇒ Object
-
#initialize(st, for_read) ⇒ TaxiForMpx
constructor
A new instance of TaxiForMpx.
- #on_timer ⇒ Object
Methods inherited from Taxi::Taxi
Methods inherited from Common::Vehicle
Constructor Details
#initialize(st, for_read) ⇒ TaxiForMpx
Returns a new instance of TaxiForMpx.
18 19 20 21 |
# File 'lib/baykit/bayserver/agent/multiplexer/taxi_multiplexer.rb', line 18 def initialize(st, for_read) @rudder_state = st @for_read = for_read end |
Instance Attribute Details
#for_read ⇒ Object (readonly)
Returns the value of attribute for_read.
17 18 19 |
# File 'lib/baykit/bayserver/agent/multiplexer/taxi_multiplexer.rb', line 17 def for_read @for_read end |
#rudder_state ⇒ Object (readonly)
Returns the value of attribute rudder_state.
16 17 18 |
# File 'lib/baykit/bayserver/agent/multiplexer/taxi_multiplexer.rb', line 16 def rudder_state @rudder_state end |
Instance Method Details
#depart ⇒ Object
22 23 24 25 26 27 28 |
# File 'lib/baykit/bayserver/agent/multiplexer/taxi_multiplexer.rb', line 22 def depart if @for_read @rudder_state.multiplexer.do_next_read(@rudder_state) else @rudder_state.multiplexer.do_next_write(@rudder_state) end end |
#on_timer ⇒ Object
30 31 32 33 34 |
# File 'lib/baykit/bayserver/agent/multiplexer/taxi_multiplexer.rb', line 30 def on_timer if @rudder_state.transporter != nil @rudder_state.transporter.check_timeout(@rudder_state.rudder, -1) end end |