@Test public void testGetSupportedParameterValues() { List<SupportedParameterValues> valuesList = l4Cl.getSupportedParameterValues(); assertEquals(4, valuesList.size()); SupportedParameterValues values = valuesList.get(0); assertNotNull(values); assertEquals(L4ClassifierDefinition.SRC_PORT_PARAM, values.getParameterName().getValue()); ParameterType pt = values.getParameterType(); assertTrue(pt instanceof Int); }
@Override public List<SupportedParameterValues> getSupportedParameterValues() { List<SupportedIntValueInRange> allPossiblePortsIntInRange = ImmutableList.of(new SupportedIntValueInRangeBuilder().setMin(1L).setMax(65535L).build()); List<SupportedRangeValue> allPossiblePortsRange = ImmutableList.of(new SupportedRangeValueBuilder().setMin(1L).setMax(65535L).build()); SupportedParameterValues srcPorts = new SupportedParameterValuesBuilder() .setParameterName(new ParameterName(L4ClassifierDefinition.SRC_PORT_PARAM)) .setParameterType(new IntBuilder().setSupportedIntValueInRange(allPossiblePortsIntInRange).build()) .build(); SupportedParameterValues dstPorts = new SupportedParameterValuesBuilder() .setParameterName(new ParameterName(L4ClassifierDefinition.DST_PORT_PARAM)) .setParameterType(new IntBuilder().setSupportedIntValueInRange(allPossiblePortsIntInRange).build()) .build(); SupportedParameterValues srcPortsRange = new SupportedParameterValuesBuilder() .setParameterName(new ParameterName(L4ClassifierDefinition.SRC_PORT_RANGE_PARAM)) .setParameterType(new RangeBuilder().setSupportedRangeValue(allPossiblePortsRange).build()) .build(); SupportedParameterValues dstPortsRange = new SupportedParameterValuesBuilder() .setParameterName(new ParameterName(L4ClassifierDefinition.DST_PORT_RANGE_PARAM)) .setParameterType(new RangeBuilder().setSupportedRangeValue(allPossiblePortsRange).build()) .build(); return ImmutableList.of(srcPorts, dstPorts, srcPortsRange, dstPortsRange); }
L4Classifier extends Classifier { @Override public List<SupportedParameterValues> getSupportedParameterValues() { List<SupportedIntValueInRange> allPossiblePortsIntInRange = ImmutableList.of(new SupportedIntValueInRangeBuilder().setMin(1L).setMax(65535L).build()); List<SupportedRangeValue> allPossiblePortsRange = ImmutableList.of(new SupportedRangeValueBuilder().setMin(1L).setMax(65535L).build()); SupportedParameterValues srcPorts = new SupportedParameterValuesBuilder() .setParameterName(new ParameterName(L4ClassifierDefinition.SRC_PORT_PARAM)) .setParameterType(new IntBuilder().setSupportedIntValueInRange(allPossiblePortsIntInRange).build()) .build(); SupportedParameterValues dstPorts = new SupportedParameterValuesBuilder() .setParameterName(new ParameterName(L4ClassifierDefinition.DST_PORT_PARAM)) .setParameterType(new IntBuilder().setSupportedIntValueInRange(allPossiblePortsIntInRange).build()) .build(); SupportedParameterValues srcPortsRange = new SupportedParameterValuesBuilder() .setParameterName(new ParameterName(L4ClassifierDefinition.SRC_PORT_RANGE_PARAM)) .setParameterType(new RangeBuilder().setSupportedRangeValue(allPossiblePortsRange).build()) .build(); SupportedParameterValues dstPortsRange = new SupportedParameterValuesBuilder() .setParameterName(new ParameterName(L4ClassifierDefinition.DST_PORT_RANGE_PARAM)) .setParameterType(new RangeBuilder().setSupportedRangeValue(allPossiblePortsRange).build()) .build(); return ImmutableList.of(srcPorts, dstPorts, srcPortsRange, dstPortsRange); } }
L4Classifier extends Classifier { @Override public List<SupportedParameterValues> getSupportedParameterValues() { List<SupportedIntValueInRange> allPossiblePortsIntInRange = ImmutableList.of(new SupportedIntValueInRangeBuilder().setMin(1L).setMax(65535L).build()); List<SupportedRangeValue> allPossiblePortsRange = ImmutableList.of(new SupportedRangeValueBuilder().setMin(1L).setMax(65535L).build()); SupportedParameterValues srcPorts = new SupportedParameterValuesBuilder() .setParameterName(new ParameterName(L4ClassifierDefinition.SRC_PORT_PARAM)) .setParameterType(new IntBuilder().setSupportedIntValueInRange(allPossiblePortsIntInRange).build()) .build(); SupportedParameterValues dstPorts = new SupportedParameterValuesBuilder() .setParameterName(new ParameterName(L4ClassifierDefinition.DST_PORT_PARAM)) .setParameterType(new IntBuilder().setSupportedIntValueInRange(allPossiblePortsIntInRange).build()) .build(); SupportedParameterValues srcPortsRange = new SupportedParameterValuesBuilder() .setParameterName(new ParameterName(L4ClassifierDefinition.SRC_PORT_RANGE_PARAM)) .setParameterType(new RangeBuilder().setSupportedRangeValue(allPossiblePortsRange).build()) .build(); SupportedParameterValues dstPortsRange = new SupportedParameterValuesBuilder() .setParameterName(new ParameterName(L4ClassifierDefinition.DST_PORT_RANGE_PARAM)) .setParameterType(new RangeBuilder().setSupportedRangeValue(allPossiblePortsRange).build()) .build(); return ImmutableList.of(srcPorts, dstPorts, srcPortsRange, dstPortsRange); } L4Classifier(Classifier parent); }
L4Classifier extends Classifier { @Override public List<SupportedParameterValues> getSupportedParameterValues() { List<SupportedIntValueInRange> allPossiblePortsIntInRange = ImmutableList.of(new SupportedIntValueInRangeBuilder().setMin(1L).setMax(65535L).build()); List<SupportedRangeValue> allPossiblePortsRange = ImmutableList.of(new SupportedRangeValueBuilder().setMin(1L).setMax(65535L).build()); SupportedParameterValues srcPorts = new SupportedParameterValuesBuilder() .setParameterName(new ParameterName(L4ClassifierDefinition.SRC_PORT_PARAM)) .setParameterType(new IntBuilder().setSupportedIntValueInRange(allPossiblePortsIntInRange).build()) .build(); SupportedParameterValues dstPorts = new SupportedParameterValuesBuilder() .setParameterName(new ParameterName(L4ClassifierDefinition.DST_PORT_PARAM)) .setParameterType(new IntBuilder().setSupportedIntValueInRange(allPossiblePortsIntInRange).build()) .build(); SupportedParameterValues srcPortsRange = new SupportedParameterValuesBuilder() .setParameterName(new ParameterName(L4ClassifierDefinition.SRC_PORT_RANGE_PARAM)) .setParameterType(new RangeBuilder().setSupportedRangeValue(allPossiblePortsRange).build()) .build(); SupportedParameterValues dstPortsRange = new SupportedParameterValuesBuilder() .setParameterName(new ParameterName(L4ClassifierDefinition.DST_PORT_RANGE_PARAM)) .setParameterType(new RangeBuilder().setSupportedRangeValue(allPossiblePortsRange).build()) .build(); return ImmutableList.of(srcPorts, dstPorts, srcPortsRange, dstPortsRange); } L4Classifier(Classifier parent); @Override ClassifierDefinitionId getId(); @Override ClassifierDefinition getClassifierDefinition(); @Override List<SupportedParameterValues> getSupportedParameterValues(); }
L4Classifier extends Classifier { @Override public List<SupportedParameterValues> getSupportedParameterValues() { List<SupportedIntValueInRange> allPossiblePortsIntInRange = ImmutableList.of(new SupportedIntValueInRangeBuilder().setMin(1L).setMax(65535L).build()); List<SupportedRangeValue> allPossiblePortsRange = ImmutableList.of(new SupportedRangeValueBuilder().setMin(1L).setMax(65535L).build()); SupportedParameterValues srcPorts = new SupportedParameterValuesBuilder() .setParameterName(new ParameterName(L4ClassifierDefinition.SRC_PORT_PARAM)) .setParameterType(new IntBuilder().setSupportedIntValueInRange(allPossiblePortsIntInRange).build()) .build(); SupportedParameterValues dstPorts = new SupportedParameterValuesBuilder() .setParameterName(new ParameterName(L4ClassifierDefinition.DST_PORT_PARAM)) .setParameterType(new IntBuilder().setSupportedIntValueInRange(allPossiblePortsIntInRange).build()) .build(); SupportedParameterValues srcPortsRange = new SupportedParameterValuesBuilder() .setParameterName(new ParameterName(L4ClassifierDefinition.SRC_PORT_RANGE_PARAM)) .setParameterType(new RangeBuilder().setSupportedRangeValue(allPossiblePortsRange).build()) .build(); SupportedParameterValues dstPortsRange = new SupportedParameterValuesBuilder() .setParameterName(new ParameterName(L4ClassifierDefinition.DST_PORT_RANGE_PARAM)) .setParameterType(new RangeBuilder().setSupportedRangeValue(allPossiblePortsRange).build()) .build(); return ImmutableList.of(srcPorts, dstPorts, srcPortsRange, dstPortsRange); } L4Classifier(Classifier parent); @Override ClassifierDefinitionId getId(); @Override ClassifierDefinition getClassifierDefinition(); @Override List<SupportedParameterValues> getSupportedParameterValues();  }