Class: Tep::PresenceEntry
- Inherits:
-
Object
- Object
- Tep::PresenceEntry
- Defined in:
- lib/tep/presence_entry.rb
Instance Attribute Summary collapse
-
#agent_id ⇒ Object
readonly
String, empty when kind == :human.
-
#fd ⇒ Object
readonly
Integer, session-id surrogate.
-
#kind ⇒ Object
readonly
Symbol: :human | :agent_for.
-
#principal_id ⇒ Object
readonly
String, opaque.
-
#since ⇒ Object
readonly
Integer unix epoch seconds.
-
#status_note ⇒ Object
Returns the value of attribute status_note.
-
#status_state ⇒ Object
Structured-status fields (see docs/BATTERIES-DESIGN.md + memory presence_status).
-
#status_until ⇒ Object
Returns the value of attribute status_until.
-
#topic ⇒ Object
readonly
String.
Instance Method Summary collapse
-
#initialize(topic, principal_id, kind, agent_id, fd, since) ⇒ PresenceEntry
constructor
A new instance of PresenceEntry.
Constructor Details
#initialize(topic, principal_id, kind, agent_id, fd, since) ⇒ PresenceEntry
Returns a new instance of PresenceEntry.
40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/tep/presence_entry.rb', line 40 def initialize(topic, principal_id, kind, agent_id, fd, since) @topic = topic @principal_id = principal_id @kind = kind @agent_id = agent_id @fd = fd @since = since @status_state = :available @status_note = "" @status_until = 0 end |
Instance Attribute Details
#agent_id ⇒ Object (readonly)
String, empty when kind == :human
31 32 33 |
# File 'lib/tep/presence_entry.rb', line 31 def agent_id @agent_id end |
#fd ⇒ Object (readonly)
Integer, session-id surrogate
32 33 34 |
# File 'lib/tep/presence_entry.rb', line 32 def fd @fd end |
#kind ⇒ Object (readonly)
Symbol: :human | :agent_for
30 31 32 |
# File 'lib/tep/presence_entry.rb', line 30 def kind @kind end |
#principal_id ⇒ Object (readonly)
String, opaque
29 30 31 |
# File 'lib/tep/presence_entry.rb', line 29 def principal_id @principal_id end |
#since ⇒ Object (readonly)
Integer unix epoch seconds
33 34 35 |
# File 'lib/tep/presence_entry.rb', line 33 def since @since end |
#status_note ⇒ Object
Returns the value of attribute status_note.
37 38 39 |
# File 'lib/tep/presence_entry.rb', line 37 def status_note @status_note end |
#status_state ⇒ Object
Structured-status fields (see docs/BATTERIES-DESIGN.md + memory presence_status). state ∈ :available | :busy | :blocked.
36 37 38 |
# File 'lib/tep/presence_entry.rb', line 36 def status_state @status_state end |
#status_until ⇒ Object
Returns the value of attribute status_until.
38 39 40 |
# File 'lib/tep/presence_entry.rb', line 38 def status_until @status_until end |
#topic ⇒ Object (readonly)
String
28 29 30 |
# File 'lib/tep/presence_entry.rb', line 28 def topic @topic end |