Class: Baykit::BayServer::WaterCraft::Boat
- Inherits:
-
Object
- Object
- Baykit::BayServer::WaterCraft::Boat
- Includes:
- Agent::Transporter::DataListener, Util, Util::Reusable
- Defined in:
- lib/baykit/bayserver/watercraft/boat.rb
Direct Known Subclasses
Constant Summary collapse
- BOAT_ID_NOCHECK =
-1- INVALID_BOAT_ID =
0
Class Attribute Summary collapse
-
.boat_id_counter ⇒ Object
readonly
Returns the value of attribute boat_id_counter.
-
.oid_counter ⇒ Object
readonly
Returns the value of attribute oid_counter.
Instance Method Summary collapse
- #check_timeout(duration) ⇒ Object
- #init_boat ⇒ Object
-
#initialize ⇒ Boat
constructor
A new instance of Boat.
Methods included from Agent::Transporter::DataListener
#notify_close, #notify_connect, #notify_eof, #notify_handshake_done, #notify_protocol_error, #notify_read
Constructor Details
#initialize ⇒ Boat
Returns a new instance of Boat.
28 29 30 31 |
# File 'lib/baykit/bayserver/watercraft/boat.rb', line 28 def initialize() @object_id = Yacht.oid_counter.next() @boat_id = INVALID_BOAT_ID end |
Class Attribute Details
.boat_id_counter ⇒ Object (readonly)
Returns the value of attribute boat_id_counter.
19 20 21 |
# File 'lib/baykit/bayserver/watercraft/boat.rb', line 19 def boat_id_counter @boat_id_counter end |
.oid_counter ⇒ Object (readonly)
Returns the value of attribute oid_counter.
18 19 20 |
# File 'lib/baykit/bayserver/watercraft/boat.rb', line 18 def oid_counter @oid_counter end |
Instance Method Details
#check_timeout(duration) ⇒ Object
37 38 39 |
# File 'lib/baykit/bayserver/watercraft/boat.rb', line 37 def check_timeout(duration) return false end |
#init_boat ⇒ Object
33 34 35 |
# File 'lib/baykit/bayserver/watercraft/boat.rb', line 33 def init_boat() @boat_id = Boat.boat_id_counter.next() end |