public static final class DefaultFlowRule.Builder extends Object implements FlowRule.Builder
| Constructor and Description |
|---|
Builder() |
| Modifier and Type | Method and Description |
|---|---|
FlowRule |
build()
Builds a flow rule object.
|
FlowRule.Builder |
forDevice(DeviceId deviceId)
Sets the deviceId for this flow rule.
|
FlowRule.Builder |
forTable(int tableId)
Sets the table id for this flow rule, when the identifier is of type
TableId.Type.INDEX. |
FlowRule.Builder |
forTable(TableId tableId)
Sets the table identifier for this flow rule.
|
FlowRule.Builder |
fromApp(ApplicationId appId)
Assigns the application that built this flow rule to this object.
|
FlowRule.Builder |
makePermanent()
Makes this rule permanent on the dataplane.
|
FlowRule.Builder |
makeTemporary(int timeout)
Makes this rule temporary and timeout after the specified amount
of time.
|
FlowRule.Builder |
withCookie(long cookie)
Assigns a cookie value to this flowrule.
|
FlowRule.Builder |
withHardTimeout(int timeout)
Sets hard timeout parameter in flow table.
|
FlowRule.Builder |
withPriority(int priority)
Sets the priority for this flow rule.
|
FlowRule.Builder |
withReason(FlowRule.FlowRemoveReason reason)
Sets reason parameter received from switches .
|
FlowRule.Builder |
withSelector(TrafficSelector selector)
Sets the selector (or match field) for this flow rule.
|
FlowRule.Builder |
withTreatment(TrafficTreatment treatment)
Sets the traffic treatment for this flow rule.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitwithIdleTimeoutpublic FlowRule.Builder withCookie(long cookie)
FlowRule.BuilderwithCookie in interface FlowRule.Buildercookie - a long valuepublic FlowRule.Builder fromApp(ApplicationId appId)
FlowRule.BuilderfromApp in interface FlowRule.BuilderappId - an application idpublic FlowRule.Builder withPriority(int priority)
FlowRule.BuilderwithPriority in interface FlowRule.Builderpriority - an integerpublic FlowRule.Builder forDevice(DeviceId deviceId)
FlowRule.BuilderforDevice in interface FlowRule.BuilderdeviceId - a device idpublic FlowRule.Builder forTable(int tableId)
FlowRule.BuilderTableId.Type.INDEX. Default
value is 0.
Important: This method is left here for backward compatibility with applications that specifies
table identifiers using integers, e.g. as in OpenFlow. Currently there is no plan to deprecate this method,
however, new applications should favor using FlowRule.Builder.forTable(TableId).
forTable in interface FlowRule.BuildertableId - an integerpublic FlowRule.Builder forTable(TableId tableId)
FlowRule.BuilderTableId.Type.INDEX and value 0.forTable in interface FlowRule.BuildertableId - table identifierpublic FlowRule.Builder withSelector(TrafficSelector selector)
FlowRule.BuilderwithSelector in interface FlowRule.Builderselector - a traffic selectorpublic FlowRule.Builder withTreatment(TrafficTreatment treatment)
FlowRule.BuilderwithTreatment in interface FlowRule.Buildertreatment - a traffic treatmentpublic FlowRule.Builder makePermanent()
FlowRule.BuildermakePermanent in interface FlowRule.Builderpublic FlowRule.Builder makeTemporary(int timeout)
FlowRule.BuildermakeTemporary in interface FlowRule.Buildertimeout - an integerpublic FlowRule.Builder withHardTimeout(int timeout)
FlowRule.BuilderwithHardTimeout in interface FlowRule.Buildertimeout - an integerpublic FlowRule.Builder withReason(FlowRule.FlowRemoveReason reason)
FlowRule.BuilderwithReason in interface FlowRule.Builderreason - a shortpublic FlowRule build()
FlowRule.Builderbuild in interface FlowRule.Builder