Class: VectorMCP::Transport::HttpStream::SessionManager::Session Private
- Inherits:
-
Struct
- Object
- Struct
- VectorMCP::Transport::HttpStream::SessionManager::Session
- Defined in:
- lib/vector_mcp/transport/http_stream/session_manager.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
HTTP stream session data structure extending base session
Instance Attribute Summary collapse
-
#context ⇒ Object
Returns the value of attribute context.
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#id ⇒ Object
Returns the value of attribute id.
-
#last_accessed_at ⇒ Object
Returns the value of attribute last_accessed_at.
-
#metadata ⇒ Object
Returns the value of attribute metadata.
Instance Method Summary collapse
- #age ⇒ Object private
- #expired?(timeout) ⇒ Boolean private
- #streaming? ⇒ Boolean private
- #streaming_connection ⇒ Object private
- #streaming_connection=(connection) ⇒ Object private
- #touch! ⇒ Object private
Instance Attribute Details
#context ⇒ Object
Returns the value of attribute context
23 24 25 |
# File 'lib/vector_mcp/transport/http_stream/session_manager.rb', line 23 def context @context end |
#created_at ⇒ Object
Returns the value of attribute created_at
23 24 25 |
# File 'lib/vector_mcp/transport/http_stream/session_manager.rb', line 23 def created_at @created_at end |
#id ⇒ Object
Returns the value of attribute id
23 24 25 |
# File 'lib/vector_mcp/transport/http_stream/session_manager.rb', line 23 def id @id end |
#last_accessed_at ⇒ Object
Returns the value of attribute last_accessed_at
23 24 25 |
# File 'lib/vector_mcp/transport/http_stream/session_manager.rb', line 23 def last_accessed_at @last_accessed_at end |
#metadata ⇒ Object
Returns the value of attribute metadata
23 24 25 |
# File 'lib/vector_mcp/transport/http_stream/session_manager.rb', line 23 def @metadata end |
Instance Method Details
#age ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
32 33 34 |
# File 'lib/vector_mcp/transport/http_stream/session_manager.rb', line 32 def age Time.now - created_at end |
#expired?(timeout) ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
28 29 30 |
# File 'lib/vector_mcp/transport/http_stream/session_manager.rb', line 28 def expired?(timeout) Time.now - last_accessed_at > timeout end |
#streaming? ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
36 37 38 |
# File 'lib/vector_mcp/transport/http_stream/session_manager.rb', line 36 def streaming? [:streaming_connection] && ![:streaming_connection].nil? end |
#streaming_connection ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
40 41 42 |
# File 'lib/vector_mcp/transport/http_stream/session_manager.rb', line 40 def streaming_connection [:streaming_connection] end |
#streaming_connection=(connection) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
44 45 46 |
# File 'lib/vector_mcp/transport/http_stream/session_manager.rb', line 44 def streaming_connection=(connection) [:streaming_connection] = connection end |
#touch! ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
24 25 26 |
# File 'lib/vector_mcp/transport/http_stream/session_manager.rb', line 24 def touch! self.last_accessed_at = Time.now end |