Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class VertxRequestParams extends AbstractRequestParams {
- private final RoutingContext ctx;
- public VertxRequestParams(RoutingContext ctx) {
- this.ctx = ctx;
- }
- @Override
- public Iterable<String> getParamNames() {
- return ctx.request().params().names();
- }
- @Override
- public String[] getParamValues(String paramName) {
- if (!ctx.request().params().contains(paramName)) {
- return null;
- }
- List<String> d = ctx.request().params().getAll(paramName);
- String[] str = new String[d.size()];
- for (int i = 0; i < d.size(); i++) {
- str[i] = d.get(i);
- }
- return str;
- }
- @Override
- public UploadedFile[] getUploadedFiles(String paramName) {
- return new UploadedFile[0];
- }
- @Override
- public RequestProcessingError getRequestError() {
- return null;
- }
- public RoutingContext getRoutingContext() {
- return this.ctx;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement