info.unterrainer.commons.httpserver.extensions.delegates.PostInsertAsync Maven / Gradle / Ivy
package info.unterrainer.commons.httpserver.extensions.delegates;
import info.unterrainer.commons.httpserver.extensions.AsyncExtensionContext;
import info.unterrainer.commons.rdbutils.entities.BasicJpa;
import info.unterrainer.commons.serialization.jsons.BasicJson;
public interface PostInsertAsync {
/**
* Allows you to execute code after the insertion of an item.
*
* Since this is asynchronous changing the DTOs will do nothing (runs in
* parallel and the action probably already happened when your code is
* executed).
*
* @param asyncCtx a context containing values that have been mapped using
* AsyncExtensionContextMappers
* @param receivedJson the JSON that was received in the HTTP call
* @param mappedJpa the JPA that was inserted
* @param createdJpa the JPA that was created in (returned from) the database
* @param response the JSON that will be sent as a response
*/
void handle(AsyncExtensionContext asyncCtx, J receivedJson, P mappedJpa, P createdJpa, J response);
}