Class: Baykit::BayServer::Agent::NonBlockingHandler::ChannelState
- Inherits:
-
Object
- Object
- Baykit::BayServer::Agent::NonBlockingHandler::ChannelState
- Defined in:
- lib/baykit/bayserver/agent/non_blocking_handler.rb
Instance Attribute Summary collapse
-
#accepted ⇒ Object
Returns the value of attribute accepted.
-
#channel ⇒ Object
readonly
Returns the value of attribute channel.
-
#closing ⇒ Object
Returns the value of attribute closing.
-
#connecting ⇒ Object
Returns the value of attribute connecting.
-
#last_access_time ⇒ Object
readonly
Returns the value of attribute last_access_time.
-
#listener ⇒ Object
readonly
Returns the value of attribute listener.
Instance Method Summary collapse
- #access ⇒ Object
-
#initialize(ch, lis) ⇒ ChannelState
constructor
A new instance of ChannelState.
- #to_s ⇒ Object
Constructor Details
#initialize(ch, lis) ⇒ ChannelState
Returns a new instance of ChannelState.
26 27 28 29 30 31 32 |
# File 'lib/baykit/bayserver/agent/non_blocking_handler.rb', line 26 def initialize(ch, lis) @channel = ch @listener = lis @accepted = false @connecting = false @closing = false end |
Instance Attribute Details
#accepted ⇒ Object
Returns the value of attribute accepted.
18 19 20 |
# File 'lib/baykit/bayserver/agent/non_blocking_handler.rb', line 18 def accepted @accepted end |
#channel ⇒ Object (readonly)
Returns the value of attribute channel.
19 20 21 |
# File 'lib/baykit/bayserver/agent/non_blocking_handler.rb', line 19 def channel @channel end |
#closing ⇒ Object
Returns the value of attribute closing.
22 23 24 |
# File 'lib/baykit/bayserver/agent/non_blocking_handler.rb', line 22 def closing @closing end |
#connecting ⇒ Object
Returns the value of attribute connecting.
21 22 23 |
# File 'lib/baykit/bayserver/agent/non_blocking_handler.rb', line 21 def connecting @connecting end |
#last_access_time ⇒ Object (readonly)
Returns the value of attribute last_access_time.
24 25 26 |
# File 'lib/baykit/bayserver/agent/non_blocking_handler.rb', line 24 def last_access_time @last_access_time end |
#listener ⇒ Object (readonly)
Returns the value of attribute listener.
20 21 22 |
# File 'lib/baykit/bayserver/agent/non_blocking_handler.rb', line 20 def listener @listener end |
Instance Method Details
#access ⇒ Object
34 35 36 |
# File 'lib/baykit/bayserver/agent/non_blocking_handler.rb', line 34 def access @last_access_time = DateTime.now end |
#to_s ⇒ Object
38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/baykit/bayserver/agent/non_blocking_handler.rb', line 38 def to_s if @listener != nil str = @listener.to_s else str = super.to_s end if @closing str += " closing"; end return str end |