org.neo4j.server.rest.transactional
Class ExecutionResultSerializer

java.lang.Object
  extended by org.neo4j.server.rest.transactional.ExecutionResultSerializer

public class ExecutionResultSerializer
extends Object

Writes directly to an output stream, therefore implicitly stateful. Methods must be invoked in the correct order, as follows:

Where ? means invoke at most once, and * means invoke zero or more times.


Constructor Summary
ExecutionResultSerializer(OutputStream output, org.neo4j.kernel.impl.util.StringLogger log)
           
 
Method Summary
 void errors(Iterable<? extends Neo4jError> errors)
          Will get called once if any errors occurred, after statementResults has been called This method is not allowed to throw exceptions.
 void finish()
          This method must be called exactly once, and no method must be called after calling this method.
 void statementResult(org.neo4j.cypher.javacompat.ExecutionResult result)
          Will get called at most once per statement.
 void transactionCommitUri(URI commitUri)
          Will always get called at most once once, and is the first method to get called.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExecutionResultSerializer

public ExecutionResultSerializer(OutputStream output,
                                 org.neo4j.kernel.impl.util.StringLogger log)
Method Detail

transactionCommitUri

public void transactionCommitUri(URI commitUri)
Will always get called at most once once, and is the first method to get called. This method is not allowed to throw exceptions. If there are network errors or similar, the handler should take appropriate action, but never fail this method.


statementResult

public void statementResult(org.neo4j.cypher.javacompat.ExecutionResult result)
                     throws IOException
Will get called at most once per statement. Throws IOException so that upstream executor can decide whether to execute further statements.

Throws:
IOException

errors

public void errors(Iterable<? extends Neo4jError> errors)
Will get called once if any errors occurred, after statementResults has been called This method is not allowed to throw exceptions. If there are network errors or similar, the handler should take appropriate action, but never fail this method.


finish

public void finish()
This method must be called exactly once, and no method must be called after calling this method. This method may not fail.



Copyright © 2002-2013 The Neo4j Graph Database Project. All Rights Reserved.