/** * Checks if the response code is a successful code. * * @return true, if is success */ public boolean isSuccess() { return CoAP.ResponseCode.isSuccess(response.getCode()); }
@Override protected boolean checkResponse(Request request, Response response) { boolean success = true; success &= checkInt(EXPECTED_RESPONSE_CODE.value, response.getCode().value, "code"); success &= hasContentType(response); success &= hasNonEmptyPalyoad(response); return success; } }
protected boolean checkResponse(Request request, Response response) { boolean success = true; success &= checkType(Type.NON, response.getType()); // Code = 65(2.01 Created) or 68 (2.04 changed) success &= checkInts(expectedResponseCodes, response.getCode().value, "code"); return success; } }
protected boolean checkResponse(Request request, Response response) { boolean success = true; success &= checkType(Type.NON, response.getType()); success &= checkInt(EXPECTED_RESPONSE_CODE.value, response.getCode().value, "code"); return success; } }
protected boolean checkResponse(Request request, Response response) { boolean success = true; success &= checkType(Type.CON, response.getType()); success &= checkInt(EXPECTED_RESPONSE_CODE.value, response.getCode().value, "code"); success &= hasContentType(response); success &= hasNonEmptyPalyoad(response); return success; }
protected boolean checkResponse(Request request, Response response) { boolean success = true; success &= checkTypes(new Type[] { Type.ACK, Type.CON }, response.getType()); success &= checkInt(EXPECTED_RESPONSE_CODE.value, response.getCode().value, "code"); success &= hasContentType(response); success &= hasNonEmptyPalyoad(response); return success; } }
protected boolean checkResponse(Request request, Response response) { boolean success = true; success &= checkType(Type.CON, response.getType()); success &= checkInt(EXPECTED_RESPONSE_CODE.value, response.getCode().value, "code"); success &= hasContentType(response); success &= hasNonEmptyPalyoad(response); return success; } }
protected boolean checkResponse(Request request, Response response) { boolean success = true; success &= checkTypes(new Type[] { Type.ACK, Type.CON }, response.getType()); success &= checkInt(EXPECTED_RESPONSE_CODE.value, response.getCode().value, "code"); success &= hasContentType(response); success &= hasNonEmptyPalyoad(response); return success; } }
protected boolean checkResponse(Request request, Response response) { boolean success = true; success &= checkType(Type.ACK, response.getType()); success &= checkInt(EXPECTED_RESPONSE_CODE.value, response.getCode().value, "code"); success &= checkInt(request.getMID(), response.getMID(), "MID"); return success; } }
protected boolean checkResponse(Request request, Response response) { boolean success = true; success &= checkType(Type.ACK, response.getType()); // Code = 68 (2.04 Changed) or 65 (2.01 Created) success &= checkInts(expectedResponseCodes, response.getCode().value, "code"); success &= checkInt(request.getMID(), response.getMID(), "MID"); return success; } }
protected boolean checkResponse(Request request, Response response) { boolean success = true; success &= checkType(Type.ACK, response.getType()); success &= checkInt(EXPECTED_RESPONSE_CODE.value, response.getCode().value, "code"); success &= hasNoToken(response); success &= hasContentType(response); success &= hasNonEmptyPalyoad(response); return success; } }
protected boolean checkResponse(Request request, Response response) { boolean success = true; success &= checkInt(EXPECTED_RESPONSE_CODE.value, response.getCode().value, "code"); success &= checkToken(request.getToken(), response.getToken()); success &= hasContentType(response); success &= hasNonEmptyPalyoad(response); success &= hasObserve(response); return success; } }
protected boolean checkResponse(Request request, Response response) { boolean success = true; success &= checkType(Type.ACK, response.getType()); success &= checkInt(EXPECTED_RESPONSE_CODE.value, response.getCode().value, "code"); success &= checkToken(request.getToken(), response.getToken()); success &= hasContentType(response); success &= hasNonEmptyPalyoad(response); return success; } }
protected boolean checkResponse(Request request, Response response) { boolean success = true; success &= checkType(Type.ACK, response.getType()); success &= checkInt(EXPECTED_RESPONSE_CODE.value, response.getCode().value, "code"); success &= checkInt(request.getMID(), response.getMID(), "MID"); success &= hasContentType(response); success &= hasNonEmptyPalyoad(response); return success; } }
protected boolean checkResponse(Request request, Response response) { boolean success = true; success &= checkType(Type.ACK, response.getType()); success &= checkInt(EXPECTED_RESPONSE_CODE.value, response.getCode().value, "code"); success &= checkOption(MediaTypeRegistry.APPLICATION_LINK_FORMAT, response.getOptions().getContentFormat(), "Content format"); success &= hasNonEmptyPalyoad(response); success &= checkDiscoveryAttributes(EXPECTED_RT, response.getPayloadString()); return success; } }
protected boolean checkResponse(Request request, Response response) { boolean success = true; success &= checkType(Type.CON, response.getType()); success &= checkInt(EXPECTED_RESPONSE_CODE.value, response.getCode().value, "code"); success &= checkToken(request.getToken(), response.getToken()); success &= hasContentType(response); success &= hasNonEmptyPalyoad(response); success &= hasObserve(response); return success; } }
protected boolean checkResponse(Request request, Response response) { boolean success = true; success &= checkType(Type.CON, response.getType()); success &= checkInt(EXPECTED_RESPONSE_CODE.value, response.getCode().value, "code"); success &= checkToken(request.getToken(), response.getToken()); success &= hasContentType(response); success &= hasNonEmptyPalyoad(response); success &= hasObserve(response); return success; } }
protected boolean checkResponse(Request request, Response response) { boolean success = true; success &= checkType(Type.CON, response.getType()); success &= checkInt(EXPECTED_RESPONSE_CODE.value, response.getCode().value, "code"); success &= checkToken(request.getToken(), response.getToken()); success &= hasContentType(response); success &= hasNonEmptyPalyoad(response); success &= hasObserve(response); return success; } }
protected boolean checkResponse(Request request, Response response) { boolean success = true; success &= checkType(Type.CON, response.getType()); success &= checkInt(EXPECTED_RESPONSE_CODE.value, response.getCode().value, "code"); success &= checkToken(request.getToken(), response.getToken()); success &= hasContentType(response); success &= hasNonEmptyPalyoad(response); success &= hasObserve(response); return success; } }
protected boolean checkResponse(Request request, Response response) { boolean success = true; success &= checkType(Type.ACK, response.getType()); success &= checkInt(EXPECTED_RESPONSE_CODE.value, response.getCode().value, "code"); success &= checkOption(MediaTypeRegistry.APPLICATION_LINK_FORMAT, response.getOptions().getContentFormat(), "Content-Format"); success &= hasNonEmptyPalyoad(response); success &= checkDiscoveryAttributes(EXPECTED_SZ, response.getPayloadString()); return success; } }