/** * The Java type of O, the entity from which response body will be marshalled. * * @return O type */ public Type getEntityResponseType() { return entityResponseWriter.getType(); }
public EntityRequestBodyReaderRegistry(Iterable<EntityDefaultContentTypeProvider> entityDefaultContentTypeProviders, Iterable<EntityRequestBodyReaderFactory> entityRequestBodyReaderFactories) { entityContentTypeResolver = new EntityContentTypeResolver(entityDefaultContentTypeProviders); this.entityRequestBodyReaderFactories = entityRequestBodyReaderFactories; }
/** * The Java type of I, the entity into which request body will be unmarshalled. * * @return I type */ public Type getEntityRequestBodyType() { return entityRequestBodyReader.getType(); }
@Override protected Optional<O> doRoute(RestxRequest restxRequest, RestxResponse response, RestxRequestMatch match, I i) throws IOException { return matchedEntityRoute.route(restxRequest, match, i); } };
public static <I,O> Builder<I,O> builder() { return new Builder<>(); }
protected abstract Optional<O> route(RestxRequest restxRequest, RestxRequestMatch match) throws IOException; }
protected <T> T mapQueryObjectFromRequest(Class<T> targetType, String parameterName, RestxRequest request, RestxRequestMatch match, EndpointParameterKind endpointParameterKind){ return mapQueryObjectFromRequest(targetType, parameterName, request, match, endpointParameterKind, null); }
public StdEntityRoute<I,O> build() { checkNotNull(matchedEntityRoute, "you must provide a matchedEntityRoute"); return new StdEntityRoute<I, O>( name, entityRequestBodyReader == null ? voidBodyReader() : entityRequestBodyReader, entityResponseWriter, endpoint, successStatus, logLevel, permissionFactory, registry, queryParameters) { @Override protected Optional<O> doRoute(RestxRequest restxRequest, RestxResponse response, RestxRequestMatch match, I i) throws IOException { return matchedEntityRoute.route(restxRequest, match, i); } }; }
public EntityResponseWriterRegistry(Iterable<EntityDefaultContentTypeProvider> entityDefaultContentTypeProviders, Iterable<EntityResponseWriterFactory> entityResponseWriterFactories) { entityContentTypeResolver = new EntityContentTypeResolver(entityDefaultContentTypeProviders); this.entityResponseWriterFactories = entityResponseWriterFactories; }
@Override protected Optional<O> doRoute(RestxRequest restxRequest, RestxResponse response, RestxRequestMatch match, Void i) throws IOException { return route.route(restxRequest, match, i); } });
/** * The Java type of O, the entity from which response body will be marshalled. * * @return O type */ public Type getEntityResponseType() { return entityResponseWriter.getType(); }
/** * The Java type of I, the entity into which request body will be unmarshalled. * * @return I type */ public Type getEntityRequestBodyType() { return entityRequestBodyReader.getType(); }
public static <I,O> Builder<I,O> builder() { return new Builder<>(); }
protected abstract Optional<O> route(RestxRequest restxRequest, RestxRequestMatch match) throws IOException; }
protected <T> T mapQueryObjectFromRequest(Class<T> targetType, String parameterName, RestxRequest request, RestxRequestMatch match, EndpointParameterKind endpointParameterKind){ return mapQueryObjectFromRequest(targetType, parameterName, request, match, endpointParameterKind, null); }
public StdEntityRoute<I,O> build() { checkNotNull(matchedEntityRoute, "you must provide a matchedEntityRoute"); return new StdEntityRoute<I, O>( name, entityRequestBodyReader == null ? voidBodyReader() : entityRequestBodyReader, entityResponseWriter, endpoint, successStatus, logLevel, permissionFactory, registry, queryParameters) { @Override protected Optional<O> doRoute(RestxRequest restxRequest, RestxResponse response, RestxRequestMatch match, I i) throws IOException { return matchedEntityRoute.route(restxRequest, match, i); } }; }
public EntityResponseWriterRegistry(Iterable<EntityDefaultContentTypeProvider> entityDefaultContentTypeProviders, Iterable<EntityResponseWriterFactory> entityResponseWriterFactories) { entityContentTypeResolver = new EntityContentTypeResolver(entityDefaultContentTypeProviders); this.entityResponseWriterFactories = entityResponseWriterFactories; }
@Override protected Optional<O> doRoute(RestxRequest restxRequest, RestxResponse response, RestxRequestMatch match, I i) throws IOException { return matchedEntityRoute.route(restxRequest, match, i); } };
public EntityRequestBodyReaderRegistry(Iterable<EntityDefaultContentTypeProvider> entityDefaultContentTypeProviders, Iterable<EntityRequestBodyReaderFactory> entityRequestBodyReaderFactories) { entityContentTypeResolver = new EntityContentTypeResolver(entityDefaultContentTypeProviders); this.entityRequestBodyReaderFactories = entityRequestBodyReaderFactories; }
@Override protected Optional<O> doRoute(RestxRequest restxRequest, RestxResponse response, RestxRequestMatch match, Void i) throws IOException { return route.route(restxRequest, match, i); } });