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 class
DefaultMeterRequest.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 ApplicationId
appId()
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.Builder
builder()
java.util.Optional<MeterContext>
context()
Returns the callback context for this meter.DeviceId
deviceId()
The target device for this meter.boolean
isBurst()
Signals whether this meter applies to bursts only.java.lang.String
toString()
Meter.Unit
unit()
The unit used within this meter.
-
-
-
Method Detail
-
deviceId
public DeviceId deviceId()
Description copied from interface:MeterRequest
The target device for this meter.- Specified by:
deviceId
in interfaceMeterRequest
- Returns:
- a device id
-
appId
public ApplicationId appId()
Description copied from interface:MeterRequest
The id of the application which created this meter.- Specified by:
appId
in interfaceMeterRequest
- Returns:
- an application id
-
unit
public Meter.Unit unit()
Description copied from interface:MeterRequest
The unit used within this meter.- Specified by:
unit
in interfaceMeterRequest
- Returns:
- the unit
-
isBurst
public boolean isBurst()
Description copied from interface:MeterRequest
Signals whether this meter applies to bursts only.- Specified by:
isBurst
in interfaceMeterRequest
- Returns:
- a boolean
-
bands
public java.util.Collection<Band> bands()
Description copied from interface:MeterRequest
The collection of bands to apply on the dataplane.- Specified by:
bands
in interfaceMeterRequest
- Returns:
- a collection of bands.
-
context
public java.util.Optional<MeterContext> context()
Description copied from interface:MeterRequest
Returns the callback context for this meter.- Specified by:
context
in interfaceMeterRequest
- Returns:
- an optional meter context
-
builder
public static DefaultMeterRequest.Builder builder()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-