@Test public void testGetSupportedParameterValues() { List<SupportedParameterValues> supportedParameterValues = ipProtoCl.getSupportedParameterValues(); Assert.assertEquals(1, supportedParameterValues.size()); Assert.assertEquals(ClassifierTestUtils.SUPPORTED_PARAM_NAME_IP, supportedParameterValues.get(0).getParameterName().getValue()); Assert.assertEquals(IpProtoClassifierDefinition.DEFINITION, ipProtoCl.getClassifierDefinition()); Assert.assertEquals(IpProtoClassifierDefinition.ID, ipProtoCl.getId()); Assert.assertEquals(SubjectFeatures.getClassifier(EtherTypeClassifierDefinition.ID), ipProtoCl.getParent()); }
@Override public List<SupportedParameterValues> getSupportedParameterValues() { List<SupportedIntValue> values = ImmutableList.of( new SupportedIntValueBuilder().setValue(IpProtoClassifierDefinition.ICMP_VALUE).build(), new SupportedIntValueBuilder().setValue(IpProtoClassifierDefinition.SCTP_VALUE).build(), new SupportedIntValueBuilder().setValue(IpProtoClassifierDefinition.TCP_VALUE).build(), new SupportedIntValueBuilder().setValue(IpProtoClassifierDefinition.UDP_VALUE).build()); SupportedParameterValuesBuilder builder = new SupportedParameterValuesBuilder(); builder.setParameterName(new ParameterName(IpProtoClassifierDefinition.PROTO_PARAM)); builder.setParameterType(new IntBuilder().setSupportedIntValue(values).build()); return ImmutableList.of(builder.build()); }
IpProtoClassifier extends Classifier { @Override public List<SupportedParameterValues> getSupportedParameterValues() { List<SupportedIntValue> values = ImmutableList.of( new SupportedIntValueBuilder().setValue(IpProtoClassifierDefinition.ICMP_VALUE).build(), new SupportedIntValueBuilder().setValue(IpProtoClassifierDefinition.SCTP_VALUE).build(), new SupportedIntValueBuilder().setValue(IpProtoClassifierDefinition.TCP_VALUE).build(), new SupportedIntValueBuilder().setValue(IpProtoClassifierDefinition.UDP_VALUE).build()); SupportedParameterValuesBuilder builder = new SupportedParameterValuesBuilder(); builder.setParameterName(new ParameterName(IpProtoClassifierDefinition.PROTO_PARAM)); builder.setParameterType(new IntBuilder().setSupportedIntValue(values).build()); return ImmutableList.of(builder.build()); } }
IpProtoClassifier extends Classifier { @Override public List<SupportedParameterValues> getSupportedParameterValues() { List<SupportedIntValue> values = ImmutableList.of( new SupportedIntValueBuilder().setValue(IpProtoClassifierDefinition.ICMP_VALUE).build(), new SupportedIntValueBuilder().setValue(IpProtoClassifierDefinition.SCTP_VALUE).build(), new SupportedIntValueBuilder().setValue(IpProtoClassifierDefinition.TCP_VALUE).build(), new SupportedIntValueBuilder().setValue(IpProtoClassifierDefinition.UDP_VALUE).build()); SupportedParameterValuesBuilder builder = new SupportedParameterValuesBuilder(); builder.setParameterName(new ParameterName(IpProtoClassifierDefinition.PROTO_PARAM)); builder.setParameterType(new IntBuilder().setSupportedIntValue(values).build()); return ImmutableList.of(builder.build()); } IpProtoClassifier(Classifier parent); }
IpProtoClassifier extends Classifier { @Override public List<SupportedParameterValues> getSupportedParameterValues() { List<SupportedIntValue> values = ImmutableList.of( new SupportedIntValueBuilder().setValue(IpProtoClassifierDefinition.ICMP_VALUE).build(), new SupportedIntValueBuilder().setValue(IpProtoClassifierDefinition.SCTP_VALUE).build(), new SupportedIntValueBuilder().setValue(IpProtoClassifierDefinition.TCP_VALUE).build(), new SupportedIntValueBuilder().setValue(IpProtoClassifierDefinition.UDP_VALUE).build()); SupportedParameterValuesBuilder builder = new SupportedParameterValuesBuilder(); builder.setParameterName(new ParameterName(IpProtoClassifierDefinition.PROTO_PARAM)); builder.setParameterType(new IntBuilder().setSupportedIntValue(values).build()); return ImmutableList.of(builder.build()); } IpProtoClassifier(Classifier parent); @Override ClassifierDefinitionId getId(); @Override ClassifierDefinition getClassifierDefinition(); @Override List<SupportedParameterValues> getSupportedParameterValues(); static Long getIpProtoValue(Map<String, ParameterValue> params); }
IpProtoClassifier extends Classifier { @Override public List<SupportedParameterValues> getSupportedParameterValues() { List<SupportedIntValue> values = ImmutableList.of( new SupportedIntValueBuilder().setValue(IpProtoClassifierDefinition.ICMP_VALUE).build(), new SupportedIntValueBuilder().setValue(IpProtoClassifierDefinition.SCTP_VALUE).build(), new SupportedIntValueBuilder().setValue(IpProtoClassifierDefinition.TCP_VALUE).build(), new SupportedIntValueBuilder().setValue(IpProtoClassifierDefinition.UDP_VALUE).build()); SupportedParameterValuesBuilder builder = new SupportedParameterValuesBuilder(); builder.setParameterName(new ParameterName(IpProtoClassifierDefinition.PROTO_PARAM)); builder.setParameterType(new IntBuilder().setSupportedIntValue(values).build()); return ImmutableList.of(builder.build()); } IpProtoClassifier(Classifier parent); @Override ClassifierDefinitionId getId(); @Override ClassifierDefinition getClassifierDefinition(); @Override List<SupportedParameterValues> getSupportedParameterValues(); static Long getIpProtoValue(Map<String, ParameterValue> params);  }