default Timestamp generate(byte[] content, Direction direction, Span span) throws TimestampException { return generate(content, direction); } }
@Override public Timestamp generate(byte[] content, Direction direction) { return new Timestamp(new Date(), null); } }
public As2InboundMetadata(TransmissionIdentifier transmissionIdentifier, Header header, Timestamp timestamp, TransportProfile transportProfile, Digest digest, X509Certificate certificate, byte[] primaryReceipt, Tag tag) { this.transmissionIdentifier = transmissionIdentifier; this.header = header; this.timestamp = timestamp.getDate(); this.transportProfile = transportProfile; this.digest = digest; this.certificate = certificate; this.primaryReceipt = Receipt.of("message/disposition-notification", primaryReceipt); this.tag = tag; List<Receipt> receipts = new ArrayList<>(); receipts.add(this.primaryReceipt); if (timestamp.getReceipt().isPresent()) receipts.add(timestamp.getReceipt().get()); this.receipts = Collections.unmodifiableList(receipts); }
Timestamp timestamp = timestampProvider.generate(null, Direction.IN); persisterHandler.persist(new AsdInboundMetadata(transmissionIdentifier, header, timestamp.getDate()), path); resp.setHeader(AsdHeaders.TIMESTAMP, timestamp.getDate().toString()); } catch (TimestampException | OxalisContentException e) { persisterHandler.persist(transmissionIdentifier, header, path, e);
public As2TransmissionResponse(TransmissionIdentifier transmissionIdentifier, TransmissionRequest transmissionRequest, Digest digest, byte[] nativeEvidenceBytes, Timestamp timestamp, Date date) { this.tag = transmissionRequest.getTag(); this.header = transmissionRequest.getHeader(); this.endpoint = transmissionRequest.getEndpoint(); this.transmissionIdentifier = transmissionIdentifier; this.digest = digest; this.receipt = Receipt.of("message/disposition-notification", nativeEvidenceBytes); this.timestamp = date; List<Receipt> receipts = new ArrayList<>(); receipts.add(receipt); if (timestamp.getReceipt().isPresent()) receipts.add(timestamp.getReceipt().get()); this.receipts = Collections.unmodifiableList(receipts); }
Timestamp timestamp = timestampProvider.generate(null, Direction.IN); persisterHandler.persist(new AsdInboundMetadata(transmissionIdentifier, header, timestamp.getDate()), path); resp.setHeader(AsdHeaders.TIMESTAMP, timestamp.getDate().toString()); } catch (TimestampException | OxalisContentException e) { persisterHandler.persist(transmissionIdentifier, header, path, e);
default Timestamp generate(byte[] content, Direction direction, Span span) throws TimestampException { return generate(content, direction); } }
public As2InboundMetadata(TransmissionIdentifier transmissionIdentifier, Header header, Timestamp timestamp, TransportProfile transportProfile, Digest digest, X509Certificate certificate, byte[] primaryReceipt, Tag tag) { this.transmissionIdentifier = transmissionIdentifier; this.header = header; this.timestamp = timestamp.getDate(); this.transportProfile = transportProfile; this.digest = digest; this.certificate = certificate; this.primaryReceipt = Receipt.of("message/disposition-notification", primaryReceipt); this.tag = tag; List<Receipt> receipts = new ArrayList<>(); receipts.add(this.primaryReceipt); if (timestamp.getReceipt().isPresent()) receipts.add(timestamp.getReceipt().get()); this.receipts = Collections.unmodifiableList(receipts); }
@Override public Timestamp generate(byte[] content, Direction direction) { return new Timestamp(new Date(), null); } }
public As2TransmissionResponse(TransmissionIdentifier transmissionIdentifier, TransmissionRequest transmissionRequest, Digest digest, byte[] nativeEvidenceBytes, Timestamp timestamp, Date date) { this.tag = transmissionRequest.getTag(); this.header = transmissionRequest.getHeader(); this.endpoint = transmissionRequest.getEndpoint(); this.transmissionIdentifier = transmissionIdentifier; this.digest = digest; this.receipt = Receipt.of("message/disposition-notification", nativeEvidenceBytes); this.timestamp = date; List<Receipt> receipts = new ArrayList<>(); receipts.add(receipt); if (timestamp.getReceipt().isPresent()) receipts.add(timestamp.getReceipt().get()); this.receipts = Collections.unmodifiableList(receipts); }