Class ForwardingActionRule.Builder
- java.lang.Object
-
- org.onosproject.net.behaviour.upf.ForwardingActionRule.Builder
-
- Enclosing class:
- ForwardingActionRule
public static class ForwardingActionRule.Builder extends Object
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ForwardingActionRule
build()
ForwardingActionRule.Builder
setBufferFlag(boolean flag)
Make this FAR buffer incoming packets.ForwardingActionRule.Builder
setDropFlag(boolean flag)
Make this FAR drop incoming packets.ForwardingActionRule.Builder
setFarId(int farId)
Set the PFCP Session-local ID of this FAR.ForwardingActionRule.Builder
setForwardFlag(boolean flag)
Make this FAR forward incoming packets.ForwardingActionRule.Builder
setNotifyFlag(boolean notifyCp)
Set a flag specifying if the control plane should be notified when this FAR is hit.ForwardingActionRule.Builder
setTunnel(Ip4Address src, Ip4Address dst, ImmutableByteSequence teid)
Set the unidirectional GTP tunnel that this FAR should encapsulate packets with.ForwardingActionRule.Builder
setTunnel(Ip4Address src, Ip4Address dst, ImmutableByteSequence teid, short srcPort)
Set the unidirectional GTP tunnel that this FAR should encapsulate packets with.ForwardingActionRule.Builder
setTunnel(GtpTunnel tunnel)
Set the GTP tunnel that this FAR should encapsulate packets with.ForwardingActionRule.Builder
withSessionId(long sessionId)
Set the ID of the PFCP session that created this FAR.ForwardingActionRule.Builder
withSessionId(ImmutableByteSequence sessionId)
Set the ID of the PFCP session that created this FAR.
-
-
-
Method Detail
-
withSessionId
public ForwardingActionRule.Builder withSessionId(ImmutableByteSequence sessionId)
Set the ID of the PFCP session that created this FAR.- Parameters:
sessionId
- PFC session ID- Returns:
- This builder object
-
withSessionId
public ForwardingActionRule.Builder withSessionId(long sessionId)
Set the ID of the PFCP session that created this FAR.- Parameters:
sessionId
- PFC session ID- Returns:
- This builder object
-
setFarId
public ForwardingActionRule.Builder setFarId(int farId)
Set the PFCP Session-local ID of this FAR.- Parameters:
farId
- PFCP session-local FAR ID- Returns:
- This builder object
-
setForwardFlag
public ForwardingActionRule.Builder setForwardFlag(boolean flag)
Make this FAR forward incoming packets.- Parameters:
flag
- the flag value to set- Returns:
- This builder object
-
setDropFlag
public ForwardingActionRule.Builder setDropFlag(boolean flag)
Make this FAR drop incoming packets.- Parameters:
flag
- the flag value to set- Returns:
- This builder object
-
setBufferFlag
public ForwardingActionRule.Builder setBufferFlag(boolean flag)
Make this FAR buffer incoming packets.- Parameters:
flag
- the flag value to set- Returns:
- This builder object
-
setNotifyFlag
public ForwardingActionRule.Builder setNotifyFlag(boolean notifyCp)
Set a flag specifying if the control plane should be notified when this FAR is hit.- Parameters:
notifyCp
- true if FAR notifies control plane- Returns:
- This builder object
-
setTunnel
public ForwardingActionRule.Builder setTunnel(GtpTunnel tunnel)
Set the GTP tunnel that this FAR should encapsulate packets with.- Parameters:
tunnel
- GTP tunnel- Returns:
- This builder object
-
setTunnel
public ForwardingActionRule.Builder setTunnel(Ip4Address src, Ip4Address dst, ImmutableByteSequence teid)
Set the unidirectional GTP tunnel that this FAR should encapsulate packets with.- Parameters:
src
- GTP tunnel source IPdst
- GTP tunnel destination IPteid
- GTP tunnel ID- Returns:
- This builder object
-
setTunnel
public ForwardingActionRule.Builder setTunnel(Ip4Address src, Ip4Address dst, ImmutableByteSequence teid, short srcPort)
Set the unidirectional GTP tunnel that this FAR should encapsulate packets with.- Parameters:
src
- GTP tunnel source IPdst
- GTP tunnel destination IPteid
- GTP tunnel IDsrcPort
- GTP tunnel UDP source port (destination port is hardcoded as 2152)- Returns:
- This builder object
-
build
public ForwardingActionRule build()
-
-