Module: VectorMCP::Transport::HttpStream::SessionManager::SessionStreaming Private
- Defined in:
- lib/vector_mcp/transport/http_stream/session_manager.rb
Overview
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
HTTP-streaming connection state, kept in the session's transport metadata. New sessions are extended with this module at creation.
Instance Method Summary collapse
- #add_streaming_connection(connection) ⇒ Object private
- #remove_streaming_connection(connection = nil) ⇒ Object private
- #streaming? ⇒ Boolean private
- #streaming_connection ⇒ Object private
- #streaming_connection=(connection) ⇒ Object private
- #streaming_connections ⇒ Object private
Instance Method Details
#add_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.
41 42 43 44 |
# File 'lib/vector_mcp/transport/http_stream/session_manager.rb', line 41 def add_streaming_connection(connection) streaming_connections[connection.stream_id] = connection self.streaming_connection = connection end |
#remove_streaming_connection(connection = nil) ⇒ 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.
46 47 48 49 50 51 52 53 54 |
# File 'lib/vector_mcp/transport/http_stream/session_manager.rb', line 46 def remove_streaming_connection(connection = nil) if connection streaming_connections.delete(connection.stream_id) self.streaming_connection = streaming_connections.values.first if streaming_connection == connection else streaming_connections.clear self.streaming_connection = nil end 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.
25 26 27 |
# File 'lib/vector_mcp/transport/http_stream/session_manager.rb', line 25 def streaming? !streaming_connection.nil? || !streaming_connections.empty? 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.
29 30 31 |
# File 'lib/vector_mcp/transport/http_stream/session_manager.rb', line 29 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.
33 34 35 |
# File 'lib/vector_mcp/transport/http_stream/session_manager.rb', line 33 def streaming_connection=(connection) [:streaming_connection] = connection end |
#streaming_connections ⇒ 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.
37 38 39 |
# File 'lib/vector_mcp/transport/http_stream/session_manager.rb', line 37 def streaming_connections [:streaming_connections] ||= Concurrent::Hash.new end |