/** * Check whether the parameters of the given request satisfies the * parameters of this method. * * @return true if the parameters of the given request satisfies * the parameters of this method * @param req a request **/ boolean checkParameters(Request req) { return req.parameters().satisfies(paramTypes); }
/** * Check whether the return values of the given request satisfies * the return values of this method. * * @return true if the return values of the given request satisfies * the return values of this method * @param req a request **/ boolean checkReturnValues(Request req) { return req.returnValues().satisfies(returnTypes); }
/** * Check if this Request contains return types compatible with the * given type string. If this Request contains an error it is * considered incompatible with all possible type strings. If the * return values are not compatible with the given type string and * an error condition is not set, the {@link * ErrorCode#WRONG_RETURN} error will be set. This method is * intended to be used by the RPC client after a method has been * invoked to verify the return value types. Please refer to the * {@link Method} class description for an explanation of type * strings. * * @return true if all is ok and the return types are compatible * with 'returnTypes' * @param returnTypes type string **/ public boolean checkReturnTypes(String returnTypes) { if (errorCode != ErrorCode.NONE) { return false; } if (returnValues.satisfies(returnTypes)) { return true; } setError(ErrorCode.WRONG_RETURN, "checkReturnValues: Wrong return values"); return false; }
private void handleUpdate() { if (req.errorCode() == ErrorCode.NONE && req.returnValues().satisfies("SSi") && req.returnValues().get(0).count() == req.returnValues().get(1).count())