Class DefaultTrafficSelector

  • All Implemented Interfaces:
    TrafficSelector

    public final class DefaultTrafficSelector
    extends java.lang.Object
    implements TrafficSelector
    Default traffic selector implementation.
    • Method Detail

      • getCriterion

        public Criterion getCriterion​(Criterion.Type type)
        Description copied from interface: TrafficSelector
        Returns the selection criterion for a particular type, if it exists in this traffic selector.
        Specified by:
        getCriterion in interface TrafficSelector
        Parameters:
        type - criterion type to look up
        Returns:
        the criterion of the specified type if one exists, otherwise null
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • builder

        public static TrafficSelector.Builder builder()
        Returns a new traffic selector builder.
        Returns:
        traffic selector builder
      • emptySelector

        public static TrafficSelector emptySelector()
        Returns an empty traffic selector.
        Returns:
        empty traffic selector
      • builder

        public static TrafficSelector.Builder builder​(TrafficSelector selector)
        Returns a new traffic selector builder primed to produce entities patterned after the supplied selector.
        Parameters:
        selector - base selector
        Returns:
        traffic selector builder