You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by "Mark Payne (JIRA)" <ji...@apache.org> on 2015/02/14 14:51:11 UTC
[jira] [Created] (NIFI-354) Documentation for @OnAdded, @OnRemoved
is wrong
Mark Payne created NIFI-354:
-------------------------------
Summary: Documentation for @OnAdded, @OnRemoved is wrong
Key: NIFI-354
URL: https://issues.apache.org/jira/browse/NIFI-354
Project: Apache NiFi
Issue Type: Bug
Components: Documentation & Website
Reporter: Mark Payne
Assignee: Mark Payne
Hi,
Nifi developer guide:
@OnRemoved
The @OnRemoved annotation causes a method to be invoked before a component
is removed from the flow. This allows resources to be cleaned up before
removing a component. Methods with this annotation must take zero arguments.
If a method with this annotation throws an Exception, the component will
still be removed.
But
/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/GetJMSTopic.java
@OnRemoved
public void onRemoved(final ProcessContext context) throws IOException,
JMSException {
// unsubscribe from the old subscription.
unsubscribe(context);
}
Can onRemoved and onAdded methods take arguments?
Actually I think ProcessContext context is useful onRemoved and onAdded.
And org.apache.nifi.processor.annotation.OnRemoved states
* If any method annotated with this annotation throws, the processor will
not
be removed from the graph.
But guide says 'throws an Exception, the component will still be removed.'
toivo
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)