Module org.neo4j.driver
Class BasicPullResponseHandler
java.lang.Object
org.neo4j.driver.internal.handlers.AbstractRecordStateResponseHandler
org.neo4j.driver.internal.handlers.pulln.BasicPullResponseHandler
- All Implemented Interfaces:
PullResponseHandler
,ResponseHandler
,org.reactivestreams.Subscription
- Direct Known Subclasses:
AutoPullResponseHandler
public class BasicPullResponseHandler
extends AbstractRecordStateResponseHandler
implements PullResponseHandler
Provides basic handling of pull responses from sever. The state is managed by
BasicPullResponseHandler.State
.-
Nested Class Summary
Nested classes/interfaces inherited from class org.neo4j.driver.internal.handlers.AbstractRecordStateResponseHandler
AbstractRecordStateResponseHandler.RecordState
-
Field Summary
Modifier and TypeFieldDescriptionprotected final Connection
protected final MetadataExtractor
protected final RunResponseHandler
Fields inherited from class org.neo4j.driver.internal.handlers.AbstractRecordStateResponseHandler
recordState
-
Constructor Summary
ConstructorDescriptionBasicPullResponseHandler
(Query query, RunResponseHandler runResponseHandler, Connection connection, MetadataExtractor metadataExtractor, PullResponseCompletionListener completionListener) BasicPullResponseHandler
(Query query, RunResponseHandler runResponseHandler, Connection connection, MetadataExtractor metadataExtractor, PullResponseCompletionListener completionListener, boolean syncSignals) -
Method Summary
Modifier and TypeMethodDescriptionvoid
cancel()
protected void
void
installRecordConsumer
(BiConsumer<Record, Throwable> recordConsumer) Register a record consumer for each record received.void
installSummaryConsumer
(BiConsumer<ResultSummary, Throwable> summaryConsumer) Register a summary consumer to be notified when a summary is received.protected boolean
isDone()
void
void
void
void
request
(long size) protected BasicPullResponseHandler.State
state()
protected void
protected void
writePull
(long n) Methods inherited from class org.neo4j.driver.internal.handlers.AbstractRecordStateResponseHandler
generateGqlStatusObject
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.neo4j.driver.internal.spi.ResponseHandler
canManageAutoRead, disableAutoReadManagement
-
Field Details
-
runResponseHandler
-
metadataExtractor
-
connection
-
-
Constructor Details
-
BasicPullResponseHandler
public BasicPullResponseHandler(Query query, RunResponseHandler runResponseHandler, Connection connection, MetadataExtractor metadataExtractor, PullResponseCompletionListener completionListener) -
BasicPullResponseHandler
public BasicPullResponseHandler(Query query, RunResponseHandler runResponseHandler, Connection connection, MetadataExtractor metadataExtractor, PullResponseCompletionListener completionListener, boolean syncSignals)
-
-
Method Details
-
onSuccess
- Specified by:
onSuccess
in interfaceResponseHandler
-
onFailure
- Specified by:
onFailure
in interfaceResponseHandler
-
onRecord
- Specified by:
onRecord
in interfaceResponseHandler
-
request
public void request(long size) - Specified by:
request
in interfaceorg.reactivestreams.Subscription
-
cancel
public void cancel()- Specified by:
cancel
in interfaceorg.reactivestreams.Subscription
-
writePull
protected void writePull(long n) -
discardAll
protected void discardAll() -
installSummaryConsumer
Description copied from interface:PullResponseHandler
Register a summary consumer to be notified when a summary is received. STREAMING shall not be started before this consumer is registered. A null summary with no error indicates a SUCCESS message with has_more=true has arrived.- Specified by:
installSummaryConsumer
in interfacePullResponseHandler
- Parameters:
summaryConsumer
- register a summary consumer
-
installRecordConsumer
Description copied from interface:PullResponseHandler
Register a record consumer for each record received. STREAMING shall not be started before this consumer is registered. A null record with no error indicates the end of streaming.- Specified by:
installRecordConsumer
in interfacePullResponseHandler
- Parameters:
recordConsumer
- register a record consumer to be notified for each record received.
-
isDone
protected boolean isDone() -
state
-
state
-