public String status(boolean sync)
    {
        if (exit.isExited()) {
            return EXITED;
        }
        try {
            String status = recvStatus();

            if (agent.send(STATUS) && sync) {
                // wait for the response to emulate sync
                status = recvStatus();
                // AND refill a status
                if (EXITED.equals(status) || !agent.send(STATUS)) {
                    return EXITED;
                }
            }
            return status;
        }
        catch (ZMQException e) {
            return EXITED;
        }
    }
public String status ( boolean sync ) { if ( exit . isExited ( ) ) { return EXITED ; } try { String status = recvStatus ( ) ; if ( agent . send ( STATUS ) && sync ) { status = recvStatus ( ) ; if ( EXITED . equals ( status ) || ! agent . send ( STATUS ) ) { return EXITED ; } } return status ; } catch ( ZMQException e ) { return EXITED ; } }
Inquires for the status of the proxy.

@param sync     true to read the status in synchronous way, false for asynchronous mode.
If false, you get the last cached status of the proxy