@Override public void startTransmitting() { writeLock.lock(); try { verifyCanStartTransmitting(); for (final Port port : getInputPorts()) { // if port is not valid, don't start it because it will never become valid. // Validation is based on connections and whether or not the remote target exists. if (port.isValid() && port.hasIncomingConnection()) { scheduler.startPort(port); } } for (final Port port : getOutputPorts()) { if (port.isValid() && !port.getConnections().isEmpty()) { scheduler.startPort(port); } } transmitting.set(true); } finally { writeLock.unlock(); } }
@Override public void verifyCanDelete(final boolean ignoreConnections) { readLock.lock(); try { if (isTransmitting()) { throw new IllegalStateException(this.getIdentifier() + " is transmitting"); } for (final Port port : inputPorts.values()) { if (!ignoreConnections && port.hasIncomingConnection()) { throw new IllegalStateException(this.getIdentifier() + " is the destination of another component"); } if (port.isRunning()) { throw new IllegalStateException(this.getIdentifier() + " has running Port: " + port.getIdentifier()); } } for (final Port port : outputPorts.values()) { if (!ignoreConnections) { for (final Connection connection : port.getConnections()) { connection.verifyCanDelete(); } } if (port.isRunning()) { throw new IllegalStateException(this.getIdentifier() + " has running Port: " + port.getIdentifier()); } } } finally { readLock.unlock(); } }
if (port.hasIncomingConnection()) { if (port.isRunning()) { activeRemotePorts++;
inputPorts.add(createRemoteProcessGroupPortDto((RemoteGroupPort) port)); if (port.hasIncomingConnection()) { if (port.isRunning()) { activeRemoteInputPortCount++;
for (final Port port : remoteGroup.getInputPorts()) { final boolean isConnected = port.hasIncomingConnection();