This commit is contained in:
Pierre Villard 2016-06-15 18:55:18 +02:00
commit 849c43b162
5 changed files with 1 additions and 41 deletions

View File

@ -34,8 +34,6 @@ public class StandardDataFlow implements Serializable, DataFlow {
private final byte[] flow;
private final byte[] snippetBytes;
private boolean autoStartProcessors;
/**
* Constructs an instance.
*
@ -55,7 +53,6 @@ public class StandardDataFlow implements Serializable, DataFlow {
public StandardDataFlow(final DataFlow toCopy) {
this.flow = copy(toCopy.getFlow());
this.snippetBytes = copy(toCopy.getSnippets());
this.autoStartProcessors = toCopy.isAutoStartProcessors();
}
private static byte[] copy(final byte[] bytes) {
@ -72,20 +69,4 @@ public class StandardDataFlow implements Serializable, DataFlow {
public byte[] getSnippets() {
return snippetBytes;
}
@Override
public boolean isAutoStartProcessors() {
return autoStartProcessors;
}
/**
*
* Sets the flag to automatically start processors at application startup.
*
* @param autoStartProcessors true if processors should be automatically
* started at application startup; false otherwise
*/
public void setAutoStartProcessors(final boolean autoStartProcessors) {
this.autoStartProcessors = autoStartProcessors;
}
}

View File

@ -23,11 +23,6 @@ public class AdaptedDataFlow {
private byte[] flow;
private byte[] snippets;
private boolean autoStartProcessors;
public AdaptedDataFlow() {
}
public byte[] getFlow() {
return flow;
}
@ -43,13 +38,4 @@ public class AdaptedDataFlow {
public void setSnippets(byte[] snippets) {
this.snippets = snippets;
}
public boolean isAutoStartProcessors() {
return autoStartProcessors;
}
public void setAutoStartProcessors(boolean runningAllProcessors) {
this.autoStartProcessors = runningAllProcessors;
}
}

View File

@ -32,7 +32,6 @@ public class DataFlowAdapter extends XmlAdapter<AdaptedDataFlow, DataFlow> {
if (df != null) {
aDf.setFlow(df.getFlow());
aDf.setSnippets(df.getSnippets());
aDf.setAutoStartProcessors(df.isAutoStartProcessors());
}
return aDf;
@ -41,7 +40,6 @@ public class DataFlowAdapter extends XmlAdapter<AdaptedDataFlow, DataFlow> {
@Override
public DataFlow unmarshal(final AdaptedDataFlow aDf) {
final StandardDataFlow dataFlow = new StandardDataFlow(aDf.getFlow(), aDf.getSnippets());
dataFlow.setAutoStartProcessors(aDf.isAutoStartProcessors());
return dataFlow;
}

View File

@ -28,9 +28,4 @@ public interface DataFlow {
*/
public byte[] getSnippets();
/**
* @return true if processors should be automatically started at application
* startup; false otherwise
*/
public boolean isAutoStartProcessors();
}

View File

@ -855,7 +855,7 @@ public class StandardFlowService implements FlowService, ProtocolHandler {
controller.setConnectionStatus(new NodeConnectionStatus(nodeId, NodeConnectionState.CONNECTED));
// start the processors as indicated by the dataflow
controller.onFlowInitialized(dataFlow.isAutoStartProcessors());
controller.onFlowInitialized(autoResumeState);
loadSnippets(dataFlow.getSnippets());