Class DefaultNextObjective

  • All Implemented Interfaces:
    NextObjective, Objective

    @Beta
    public final class DefaultNextObjective
    extends java.lang.Object
    implements NextObjective
    Default implementation of a next objective.
    • Method Detail

      • next

        public java.util.Collection<TrafficTreatment> next()
        Description copied from interface: NextObjective
        The collection of treatments that need to be applied to a set of traffic.
        Specified by:
        next in interface NextObjective
        Returns:
        a collection of traffic treatments
      • nextTreatments

        public java.util.Collection<NextTreatment> nextTreatments()
        Description copied from interface: NextObjective
        The collection of next treatments that need to be applied to a set of traffic.
        Specified by:
        nextTreatments in interface NextObjective
        Returns:
        a collection of next treatments
      • type

        public NextObjective.Type type()
        Description copied from interface: NextObjective
        The type of operation that will be applied to the traffic using the collection of treatments.
        Specified by:
        type in interface NextObjective
        Returns:
        a type
      • id

        public int id()
        Description copied from interface: Objective
        An identifier for this objective.
        Specified by:
        id in interface Objective
        Returns:
        an integer
      • priority

        public int priority()
        Description copied from interface: Objective
        The priority for this objective.
        Specified by:
        priority in interface Objective
        Returns:
        an integer
      • appId

        public ApplicationId appId()
        Description copied from interface: Objective
        The application which applied this objective.
        Specified by:
        appId in interface Objective
        Returns:
        an application id
      • timeout

        public int timeout()
        Description copied from interface: Objective
        The timeout for this objective.
        Specified by:
        timeout in interface Objective
        Returns:
        an integer
      • permanent

        public boolean permanent()
        Description copied from interface: Objective
        Whether this objective is permanent.
        Specified by:
        permanent in interface Objective
        Returns:
        a boolean
      • context

        public java.util.Optional<ObjectiveContext> context()
        Description copied from interface: Objective
        Obtains an optional context.
        Specified by:
        context in interface Objective
        Returns:
        optional; which will be empty if there is no context. Otherwise it will return the context.
      • meta

        public TrafficSelector meta()
        Description copied from interface: NextObjective
        Auxiliary optional information provided to the device driver. Typically conveys information about selectors (matches) that are intended to use this Next Objective.
        Specified by:
        meta in interface NextObjective
        Returns:
        a selector intended to pass meta information to the device driver. Value may be null if no meta information is provided.
      • 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