class LoginDelegator extends BaseDelegator implements ILoginDelegator {

    @Override
    public String getLoginStatus() throws P4JavaException {
        String statusStr = EMPTY;
        List<Map<String, Object>> resultMaps = execMapCmdList(LOGIN, new String[] { "-s" }, null);

        if (nonNull(resultMaps) && !resultMaps.isEmpty()) {
            Map<String, Object> firstResultMap = resultMaps.get(0);
            statusStr = ResultMapParser.getInfoStr(firstResultMap);
            if (isBlank(statusStr)) {
                // it's probably an error message:
                statusStr = ResultMapParser.getErrorStr(firstResultMap);
            }
        }

        return isBlank(statusStr) ? EMPTY : statusStr; // guaranteed non-null
                                                       // return
    }

    public  LoginDelegator(final IOptionsServer server);

}