class IsMachinePortOpen implements JavaDelegate {

    @Override
    public void execute(DelegateExecution execution) throws Exception {
        Machine machine = (Machine) execution.getVariable(MACHINE);
        checkNotNull(machine, "expecting a process variable named machine (multi-instance?)");

        if (isPortOpen(machine, port)) {
            LOG.info("<< Port {} is OPEN on {}", port, machine.getPublicDnsName());
            execution.setVariable(resultVariable, true);

        } else {
            LOG.info("<< Port {} is CLOSED on {}", port, machine.getPublicDnsName());
            execution.setVariable(resultVariable, false);
        }
    }

    public  IsMachinePortOpen(String resultVariable, int port);

}