You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by mc...@apache.org on 2015/03/23 13:23:36 UTC
[05/47] incubator-nifi git commit: NIFI-396 updated the javadocs of
ProcessSession to reflect that a FlowFileAccessExcpetion will be thrown if an
Input/Output Stream is attempted to be accessed after the callback is
executed.
NIFI-396 updated the javadocs of ProcessSession to reflect that a FlowFileAccessExcpetion will be thrown if an Input/Output Stream is attempted to be accessed after the callback is executed.
Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/cd183be4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/cd183be4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/cd183be4
Branch: refs/heads/NIFI-250
Commit: cd183be4410bdc88de7d3a0026452ab62eb10621
Parents: e2760f8
Author: Bobby Owolabi <bo...@gmail.com>
Authored: Thu Mar 19 01:18:22 2015 -0400
Committer: Bobby Owolabi <bo...@gmail.com>
Committed: Thu Mar 19 01:18:22 2015 -0400
----------------------------------------------------------------------
.../apache/nifi/processor/ProcessSession.java | 40 +++++++++++++++-----
1 file changed, 31 insertions(+), 9 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/cd183be4/nifi/nifi-api/src/main/java/org/apache/nifi/processor/ProcessSession.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-api/src/main/java/org/apache/nifi/processor/ProcessSession.java b/nifi/nifi-api/src/main/java/org/apache/nifi/processor/ProcessSession.java
index d3de916..7b855f2 100644
--- a/nifi/nifi-api/src/main/java/org/apache/nifi/processor/ProcessSession.java
+++ b/nifi/nifi-api/src/main/java/org/apache/nifi/processor/ProcessSession.java
@@ -484,6 +484,9 @@ public interface ProcessSession {
/**
* Executes the given callback against the contents corresponding to the
* given FlowFile.
+ *
+ * <i>Note</i>: The OutputStream provided to the given OutputStreamCallback
+ * will not be accessible once this method has completed its execution.
*
* @param source
* @param reader
@@ -498,9 +501,11 @@ public interface ProcessSession {
* destroyed, and the session is automatically rolled back and what is left
* of the FlowFile is destroyed.
* @throws FlowFileAccessException if some IO problem occurs accessing
- * FlowFile content
+ * FlowFile content; if an attempt is made to access the InputStream
+ * provided to the given InputStreamCallback after this method completed its
+ * execution
*/
- void read(FlowFile source, InputStreamCallback reader);
+ void read(FlowFile source, InputStreamCallback reader) throws FlowFileAccessException;
/**
* Combines the content of all given source FlowFiles into a single given
@@ -560,7 +565,10 @@ public interface ProcessSession {
/**
* Executes the given callback against the content corresponding to the
- * given FlowFile
+ * given FlowFile.
+ *
+ * <i>Note</i>: The OutputStream provided to the given OutputStreamCallback
+ * will not be accessible once this method has completed its execution.
*
* @param source
* @param writer
@@ -576,13 +584,19 @@ public interface ProcessSession {
* destroyed, and the session is automatically rolled back and what is left
* of the FlowFile is destroyed.
* @throws FlowFileAccessException if some IO problem occurs accessing
- * FlowFile content
+ * FlowFile content; if an attempt is made to access the OutputStream
+ * provided to the given OutputStreamCallaback after this method completed
+ * its execution
*/
- FlowFile write(FlowFile source, OutputStreamCallback writer);
+ FlowFile write(FlowFile source, OutputStreamCallback writer) throws FlowFileAccessException;
/**
* Executes the given callback against the content corresponding to the
- * given flow file
+ * given flow file.
+ *
+ * <i>Note</i>: The InputStream & OutputStream provided to the given
+ * StreamCallback will not be accessible once this method has completed its
+ * execution.
*
* @param source
* @param writer
@@ -598,20 +612,28 @@ public interface ProcessSession {
* destroyed, and the session is automatically rolled back and what is left
* of the FlowFile is destroyed.
* @throws FlowFileAccessException if some IO problem occurs accessing
- * FlowFile content
+ * FlowFile content; if an attempt is made to access the InputStream or
+ * OutputStream provided to the given StreamCallback after this method
+ * completed its execution
*/
- FlowFile write(FlowFile source, StreamCallback writer);
+ FlowFile write(FlowFile source, StreamCallback writer) throws FlowFileAccessException;
/**
* Executes the given callback against the content corresponding to the
* given FlowFile, such that any data written to the OutputStream of the
* content will be appended to the end of FlowFile.
+ *
+ * <i>Note</i>: The OutputStream provided to the given OutputStreamCallback
+ * will not be accessible once this method has completed its execution.
*
* @param source
* @param writer
* @return
+ * @throws FlowFileAccessException if an attempt is made to access the
+ * OutputStream provided to the given OutputStreamCallaback after this method
+ * completed its execution
*/
- FlowFile append(FlowFile source, OutputStreamCallback writer);
+ FlowFile append(FlowFile source, OutputStreamCallback writer) throws FlowFileAccessException;
/**
* Writes to the given FlowFile all content from the given content path.