Class: Neo4j::Driver::Bolt::Connection::ResponseCollector

Inherits:
Struct
  • Object
show all
Defined in:
lib/neo4j/driver/bolt/connection.rb

Overview

The on-demand pull model's response handler: the wire routes a request's reply here (RECORDs then a terminal), and it just collects everything into the shared inbox queue for fetch_response to drain. (A streaming request could register a record-routing handler instead.)

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#inboxObject

Returns the value of attribute inbox

Returns:

  • (Object)

    the current value of inbox



17
18
19
# File 'lib/neo4j/driver/bolt/connection.rb', line 17

def inbox
  @inbox
end

Instance Method Details

#fail(_error) ⇒ Object

Failure fan-out is handled connection-wide (inbox closed + @broken_error), so a sync handler needs nothing here.



24
# File 'lib/neo4j/driver/bolt/connection.rb', line 24

def fail(_error); end

#on_failure(message) ⇒ Object



20
# File 'lib/neo4j/driver/bolt/connection.rb', line 20

def on_failure(message) = inbox.push(message)

#on_ignored(message) ⇒ Object



21
22
23
# File 'lib/neo4j/driver/bolt/connection.rb', line 21

def on_ignored(message) = inbox.push(message)
# Failure fan-out is handled connection-wide (inbox closed + @broken_error),
# so a sync handler needs nothing here.

#on_record(message) ⇒ Object



18
# File 'lib/neo4j/driver/bolt/connection.rb', line 18

def on_record(message) = inbox.push(message)

#on_success(message) ⇒ Object



19
# File 'lib/neo4j/driver/bolt/connection.rb', line 19

def on_success(message) = inbox.push(message)