@Test public void testGetValue_inferFromPhc() { PacketHeaderConstraints phc = PacketHeaderConstraints.builder().setDstIp("2.3.4.5").build(); assertThat(DST_IP_EXTRACTOR.getValue(phc, LOC), equalTo(Ip.parse("2.3.4.5"))); }
@Override public Ip getValue(PacketHeaderConstraints phc, Location srcLocation) { String headerDstIp = phc.getDstIps(); return Optional.ofNullable(headerDstIp) .map(_helper::inferDstIpFromHeaderDstIp) .orElse(DEFAULT_IP_ADDRESS); }
DstIpExtractorDefault implements FieldExtractor<Ip> { @Override public Ip getValue(PacketHeaderConstraints phc, Location srcLocation) { String headerDstIp = phc.getDstIps(); return Optional.ofNullable(headerDstIp) .map(_helper::inferDstIpFromHeaderDstIp) .orElse(DEFAULT_IP_ADDRESS); } }
DstIpExtractorDefault implements FieldExtractor<Ip> { @Override public Ip getValue(PacketHeaderConstraints phc, Location srcLocation) { String headerDstIp = phc.getDstIps(); return Optional.ofNullable(headerDstIp) .map(_helper::inferDstIpFromHeaderDstIp) .orElse(DEFAULT_IP_ADDRESS); } DstIpExtractorDefault(IpFieldExtractorContext helper); }
DstIpExtractorDefault implements FieldExtractor<Ip> { @Override public Ip getValue(PacketHeaderConstraints phc, Location srcLocation) { String headerDstIp = phc.getDstIps(); return Optional.ofNullable(headerDstIp) .map(_helper::inferDstIpFromHeaderDstIp) .orElse(DEFAULT_IP_ADDRESS); } DstIpExtractorDefault(IpFieldExtractorContext helper); @Override Ip getValue(PacketHeaderConstraints phc, Location srcLocation); }
DstIpExtractorDefault implements FieldExtractor<Ip> { @Override public Ip getValue(PacketHeaderConstraints phc, Location srcLocation) { String headerDstIp = phc.getDstIps(); return Optional.ofNullable(headerDstIp) .map(_helper::inferDstIpFromHeaderDstIp) .orElse(DEFAULT_IP_ADDRESS); } DstIpExtractorDefault(IpFieldExtractorContext helper); @Override Ip getValue(PacketHeaderConstraints phc, Location srcLocation);  }