package at.gv.egiz.moazs.scheme; import at.gv.egiz.moazs.MoaZSException; import at.gv.zustellung.msg.xsd.DeliveryAnswerType; import javax.xml.bind.JAXBElement; /** * Represents responses to DeliveryRequests that were received from the msg service. * @param The type of the response. */ public abstract class MsgResponse { protected String id; protected MsgResponse(){ this.id = ""; } public static String createResponseId(String appDeliveryID, String idSuffix) { return appDeliveryID + idSuffix; } public String getResponseID() { return id; } public abstract T getResponse(); public abstract JAXBElement getResponseAsJAXBElement(); public abstract String getAppDeliveryID(); public abstract String getZSDeliveryID(); public abstract DeliveryAnswerType getAnswer(); public abstract MsgResponse generateError(MoaZSException exception); }