/** * Return a {@link VtnEtherMatchBuilder} instance which contains the flow * conditions configured in this instance. * * @return A {@link VtnEtherMatchBuilder} instance. */ public VtnEtherMatchBuilder toVtnEtherMatchBuilder() { VtnEtherMatchBuilder builder = new VtnEtherMatchBuilder(); if (sourceAddress != null) { builder.setSourceAddress(sourceAddress.getMacAddress()); } if (destinationAddress != null) { builder.setDestinationAddress(destinationAddress.getMacAddress()); } if (etherType != null) { Long type = NumberUtils.toLong(etherType); builder.setEtherType(new EtherType(type)); } if (vlanId != null) { builder.setVlanId(new VlanId(vlanId)); } if (vlanPriority != null) { builder.setVlanPcp(new VlanPcp(vlanPriority)); } return builder; }
setType(new EtherType(NumberUtils.toLong(etherType))).build(); ematch = create(ematch).setEthernetType(etype);