no.difi.vefa.peppol.common.model.Header.getIdentifier()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(4.8k)|赞(0)|评价(0)|浏览(112)

本文整理了Java中no.difi.vefa.peppol.common.model.Header.getIdentifier()方法的一些代码示例,展示了Header.getIdentifier()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Header.getIdentifier()方法的具体详情如下:
包路径:no.difi.vefa.peppol.common.model.Header
类名称:Header
方法名:getIdentifier

Header.getIdentifier介绍

暂无

代码示例

代码示例来源:origin: no.difi.oxalis/oxalis-extension-testbed

@Override
public Path persist(TransmissionIdentifier transmissionIdentifier, Header header, InputStream inputStream)
    throws IOException {
  Path path = File.createTempFile("oxalis-testbed-inbound", header.getIdentifier().getIdentifier()).toPath();
  try (OutputStream outputStream = Files.newOutputStream(path)) {
    ByteStreams.copy(inputStream, outputStream);
  }
  return path;
}

代码示例来源:origin: difi/oxalis

@Override
public Path persist(TransmissionIdentifier transmissionIdentifier, Header header, InputStream inputStream)
    throws IOException {
  Path path = File.createTempFile("oxalis-testbed-inbound", header.getIdentifier().getIdentifier()).toPath();
  try (OutputStream outputStream = Files.newOutputStream(path)) {
    ByteStreams.copy(inputStream, outputStream);
  }
  return path;
}

代码示例来源:origin: difi/oxalis

@Override
  public void verify(Header header, Direction direction) {
    log.info("Direction: {} | Sender/Receiver: {}/{} | Instance identifier: {}",
        direction,
        header.getSender().getIdentifier(),
        header.getReceiver().getIdentifier(),
        header.getIdentifier());
  }
}

代码示例来源:origin: no.difi.vefa/peppol-evidence

public Evidence header(Header header) {
  Evidence evidence = copy();
  evidence.sender = header.getSender();
  evidence.receiver = header.getReceiver();
  evidence.documentTypeIdentifier = header.getDocumentType();
  evidence.documentIdentifier = header.getIdentifier();
  return evidence;
}

代码示例来源:origin: no.difi.oxalis/oxalis-standalone

protected TransmissionResponse performTransmission(File evidencePath, Transmitter transmitter,
                          TransmissionRequest transmissionRequest, Span root)
    throws OxalisTransmissionException, EvidenceException, IOException {
  Span span = tracer.buildSpan("transmission").asChildOf(root).start();
  try {
    // ... and performs the transmission
    long start = System.nanoTime();
    TransmissionResponse transmissionResponse = transmitter.transmit(transmissionRequest, span);
    long elapsed = System.nanoTime() - start;
    long durartionInMs = TimeUnit.MILLISECONDS.convert(elapsed, TimeUnit.NANOSECONDS);
    // Write the transmission id and where the message was delivered
    log.debug(String.format("Message using messageId %s sent to %s using %s was assigned transmissionId %s took %dms\n",
        transmissionResponse.getHeader().getIdentifier().getIdentifier(),
        transmissionResponse.getEndpoint().getAddress(),
        transmissionResponse.getProtocol().getIdentifier(),
        transmissionResponse.getTransmissionIdentifier(),
        durartionInMs
    ));
    saveEvidence(transmissionResponse, evidencePath, span);
    return transmissionResponse;
  } finally {
    span.finish();
  }
}

代码示例来源:origin: difi/oxalis

protected TransmissionResponse performTransmission(File evidencePath, Transmitter transmitter,
                          TransmissionRequest transmissionRequest, Span root)
    throws OxalisTransmissionException, EvidenceException, IOException {
  Span span = tracer.buildSpan("transmission").asChildOf(root).start();
  try {
    // ... and performs the transmission
    long start = System.nanoTime();
    TransmissionResponse transmissionResponse = transmitter.transmit(transmissionRequest, span);
    long elapsed = System.nanoTime() - start;
    long durartionInMs = TimeUnit.MILLISECONDS.convert(elapsed, TimeUnit.NANOSECONDS);
    // Write the transmission id and where the message was delivered
    log.debug(String.format("Message using messageId %s sent to %s using %s was assigned transmissionId %s took %dms\n",
        transmissionResponse.getHeader().getIdentifier().getIdentifier(),
        transmissionResponse.getEndpoint().getAddress(),
        transmissionResponse.getProtocol().getIdentifier(),
        transmissionResponse.getTransmissionIdentifier(),
        durartionInMs
    ));
    saveEvidence(transmissionResponse, evidencePath, span);
    return transmissionResponse;
  } finally {
    span.finish();
  }
}

代码示例来源:origin: difi/oxalis

public PeppolStandardBusinessHeader(Header header) {
  senderId = header.getSender();
  recipientId = header.getReceiver();
  creationDateAndTime = header.getCreationTimestamp();
  peppolDocumentTypeId = header.getDocumentType();
  profileTypeIdentifier = header.getProcess();
  instanceId = new InstanceId(header.getIdentifier().getIdentifier());
}

代码示例来源:origin: no.difi.vefa/peppol-sbdh

sbdh.getDocumentIdentification().setInstanceIdentifier(header.getIdentifier().getIdentifier());

代码示例来源:origin: difi/oxalis

try {
  header = headerParser.parse(peekingInputStream);
  span.setTag("identifier", header.getIdentifier().getIdentifier());
} catch (OxalisContentException e) {
  span.setTag("exception", e.getMessage());
try {
  header = contentDetector.parse(new ByteArrayInputStream(payload));
  span.setTag("identifier", header.getIdentifier().getIdentifier());
} catch (OxalisContentException ex) {
  span.setTag("exception", ex.getMessage());

相关文章