@Test(expected = IllegalArgumentException.class) public void testGetValue_noPhc() { PacketHeaderConstraints phc = PacketHeaderConstraints.unconstrained(); assertThat(DST_IP_EXTRACTOR.getValue(phc, LOC), equalTo(Ip.parse("1.2.3.4"))); }
@Override public Ip getValue(PacketHeaderConstraints constraints, Location srcLocation) { String headerDstIp = constraints.getDstIps(); checkArgument(headerDstIp != null, "destination must be specified"); return _helper.inferDstIpFromHeaderDstIp(headerDstIp); }
DstIpExtractorPhcOnly implements FieldExtractor<Ip> { @Override public Ip getValue(PacketHeaderConstraints constraints, Location srcLocation) { String headerDstIp = constraints.getDstIps(); checkArgument(headerDstIp != null, "destination must be specified"); return _helper.inferDstIpFromHeaderDstIp(headerDstIp); } }
DstIpExtractorPhcOnly implements FieldExtractor<Ip> { @Override public Ip getValue(PacketHeaderConstraints constraints, Location srcLocation) { String headerDstIp = constraints.getDstIps(); checkArgument(headerDstIp != null, "destination must be specified"); return _helper.inferDstIpFromHeaderDstIp(headerDstIp); } DstIpExtractorPhcOnly(IpFieldExtractorContext helper); }
DstIpExtractorPhcOnly implements FieldExtractor<Ip> { @Override public Ip getValue(PacketHeaderConstraints constraints, Location srcLocation) { String headerDstIp = constraints.getDstIps(); checkArgument(headerDstIp != null, "destination must be specified"); return _helper.inferDstIpFromHeaderDstIp(headerDstIp); } DstIpExtractorPhcOnly(IpFieldExtractorContext helper); @Override Ip getValue(PacketHeaderConstraints constraints, Location srcLocation); }
DstIpExtractorPhcOnly implements FieldExtractor<Ip> { @Override public Ip getValue(PacketHeaderConstraints constraints, Location srcLocation) { String headerDstIp = constraints.getDstIps(); checkArgument(headerDstIp != null, "destination must be specified"); return _helper.inferDstIpFromHeaderDstIp(headerDstIp); } DstIpExtractorPhcOnly(IpFieldExtractorContext helper); @Override Ip getValue(PacketHeaderConstraints constraints, Location srcLocation);  }