Package org.onosproject.net.meter
Class DefaultMeterRequest
- java.lang.Object
-
- org.onosproject.net.meter.DefaultMeterRequest
-
- All Implemented Interfaces:
MeterRequest
public final class DefaultMeterRequest extends java.lang.Object implements MeterRequest
A default implementation of a meter.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDefaultMeterRequest.Builder-
Nested classes/interfaces inherited from interface org.onosproject.net.meter.MeterRequest
MeterRequest.Type
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ApplicationIdappId()The id of the application which created this meter.java.util.Collection<Band>bands()The collection of bands to apply on the dataplane.static DefaultMeterRequest.Builderbuilder()java.util.Optional<MeterContext>context()Returns the callback context for this meter.DeviceIddeviceId()The target device for this meter.booleanisBurst()Signals whether this meter applies to bursts only.java.lang.StringtoString()Meter.Unitunit()The unit used within this meter.
-
-
-
Method Detail
-
deviceId
public DeviceId deviceId()
Description copied from interface:MeterRequestThe target device for this meter.- Specified by:
deviceIdin interfaceMeterRequest- Returns:
- a device id
-
appId
public ApplicationId appId()
Description copied from interface:MeterRequestThe id of the application which created this meter.- Specified by:
appIdin interfaceMeterRequest- Returns:
- an application id
-
unit
public Meter.Unit unit()
Description copied from interface:MeterRequestThe unit used within this meter.- Specified by:
unitin interfaceMeterRequest- Returns:
- the unit
-
isBurst
public boolean isBurst()
Description copied from interface:MeterRequestSignals whether this meter applies to bursts only.- Specified by:
isBurstin interfaceMeterRequest- Returns:
- a boolean
-
bands
public java.util.Collection<Band> bands()
Description copied from interface:MeterRequestThe collection of bands to apply on the dataplane.- Specified by:
bandsin interfaceMeterRequest- Returns:
- a collection of bands.
-
context
public java.util.Optional<MeterContext> context()
Description copied from interface:MeterRequestReturns the callback context for this meter.- Specified by:
contextin interfaceMeterRequest- Returns:
- an optional meter context
-
builder
public static DefaultMeterRequest.Builder builder()
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-