public abstract class EntityCreatedCallback<E> extends Object implements com.google.common.util.concurrent.FutureCallback<Void>
On success, a 201 CREATED response is built with the location header to indicate the URI of the new resource.
On failure, a 409 CONFLICT response is built if the exception indicates the resource already exists, otherwise a 500 SERVER ERROR reponse is built.
public EntityCreatedCallback(javax.ws.rs.container.AsyncResponse asyncResponse,
URI location,
Class<E> alreadyExistsExceptionType,
Function<E,javax.ws.rs.core.Response> alreadyExistsResponseBuilder)
asyncResponse - JAX-RS asynchronous response referencelocation - URI of the new resource if it is successfully createdalreadyExistsExceptionType - type of the exception indicating the resource already existsalreadyExistsResponseBuilder - a function to build a resource already exists responseCopyright © 2014–2015 Red Hat, Inc.. All rights reserved.