Jonathan Hart

NeighbourMessageContext: Change the name of the proxy API to forward.

Change-Id: Ica58c55d03c7e86ae259cc52a6c16ab9982d004f
......@@ -159,7 +159,7 @@ public class BgpSpeakerNeighbourHandler {
if (h == null) {
context.drop();
} else {
context.proxy(h.location());
context.forward(h.location());
}
break;
default:
......@@ -182,7 +182,7 @@ public class BgpSpeakerNeighbourHandler {
.stream()
.filter(intf -> intf.vlan().equals(context.vlan()))
.map(intf -> intf.connectPoint())
.forEach(context::proxy);
.forEach(context::forward);
}
}
......
......@@ -127,14 +127,14 @@ public class VplsNeighbourHandler {
interfaceService.getInterfacesByVlan(context.vlan())
.stream()
.map(Interface::connectPoint)
.forEach(context::proxy);
.forEach(context::forward);
break;
case REPLY:
hostService.getHostsByMac(context.dstMac())
.stream()
.filter(host -> host.vlan().equals(context.vlan()))
.map(Host::location)
.forEach(context::proxy);
.forEach(context::forward);
break;
default:
......
......@@ -39,7 +39,7 @@ public class DefaultNeighbourMessageHandler implements NeighbourMessageHandler {
if (h == null) {
context.flood();
} else {
context.proxy(h.location());
context.forward(h.location());
}
break;
case REQUEST:
......
......@@ -100,18 +100,22 @@ public interface NeighbourMessageContext {
IpAddress sender();
/**
* Proxies the message to a given output port.
* Forwards the message to a given output port.
*
* @param outPort output port
*/
void proxy(ConnectPoint outPort);
void forward(ConnectPoint outPort);
/**
* Proxies the message to a given interface.
*
* Forwards the message to a given interface.
* <p>
* The message will be modified to fit the parameters of the outgoing
* interface. For example, if the interface has a VLAN configured, the
* outgoing packet will have that VLAN tag added.
* </p>
* @param outIntf output interface
*/
void proxy(Interface outIntf);
void forward(Interface outIntf);
/**
* Replies to the request message with a given MAC address.
......
......@@ -124,12 +124,12 @@ public class DefaultNeighbourMessageContext implements NeighbourMessageContext {
}
@Override
public void proxy(ConnectPoint outPort) {
public void forward(ConnectPoint outPort) {
actions.forward(this, outPort);
}
@Override
public void proxy(Interface outIntf) {
public void forward(Interface outIntf) {
actions.forward(this, outIntf);
}
......