Jonathan Hart

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

Change-Id: Ica58c55d03c7e86ae259cc52a6c16ab9982d004f
(cherry picked from commit 2efe0c24)
...@@ -159,7 +159,7 @@ public class BgpSpeakerNeighbourHandler { ...@@ -159,7 +159,7 @@ public class BgpSpeakerNeighbourHandler {
159 if (h == null) { 159 if (h == null) {
160 context.drop(); 160 context.drop();
161 } else { 161 } else {
162 - context.proxy(h.location()); 162 + context.forward(h.location());
163 } 163 }
164 break; 164 break;
165 default: 165 default:
...@@ -182,7 +182,7 @@ public class BgpSpeakerNeighbourHandler { ...@@ -182,7 +182,7 @@ public class BgpSpeakerNeighbourHandler {
182 .stream() 182 .stream()
183 .filter(intf -> intf.vlan().equals(context.vlan())) 183 .filter(intf -> intf.vlan().equals(context.vlan()))
184 .map(intf -> intf.connectPoint()) 184 .map(intf -> intf.connectPoint())
185 - .forEach(context::proxy); 185 + .forEach(context::forward);
186 } 186 }
187 } 187 }
188 188
......
...@@ -127,14 +127,14 @@ public class VplsNeighbourHandler { ...@@ -127,14 +127,14 @@ public class VplsNeighbourHandler {
127 interfaceService.getInterfacesByVlan(context.vlan()) 127 interfaceService.getInterfacesByVlan(context.vlan())
128 .stream() 128 .stream()
129 .map(Interface::connectPoint) 129 .map(Interface::connectPoint)
130 - .forEach(context::proxy); 130 + .forEach(context::forward);
131 break; 131 break;
132 case REPLY: 132 case REPLY:
133 hostService.getHostsByMac(context.dstMac()) 133 hostService.getHostsByMac(context.dstMac())
134 .stream() 134 .stream()
135 .filter(host -> host.vlan().equals(context.vlan())) 135 .filter(host -> host.vlan().equals(context.vlan()))
136 .map(Host::location) 136 .map(Host::location)
137 - .forEach(context::proxy); 137 + .forEach(context::forward);
138 break; 138 break;
139 139
140 default: 140 default:
......
...@@ -39,7 +39,7 @@ public class DefaultNeighbourMessageHandler implements NeighbourMessageHandler { ...@@ -39,7 +39,7 @@ public class DefaultNeighbourMessageHandler implements NeighbourMessageHandler {
39 if (h == null) { 39 if (h == null) {
40 context.flood(); 40 context.flood();
41 } else { 41 } else {
42 - context.proxy(h.location()); 42 + context.forward(h.location());
43 } 43 }
44 break; 44 break;
45 case REQUEST: 45 case REQUEST:
......
...@@ -100,18 +100,22 @@ public interface NeighbourMessageContext { ...@@ -100,18 +100,22 @@ public interface NeighbourMessageContext {
100 IpAddress sender(); 100 IpAddress sender();
101 101
102 /** 102 /**
103 - * Proxies the message to a given output port. 103 + * Forwards the message to a given output port.
104 * 104 *
105 * @param outPort output port 105 * @param outPort output port
106 */ 106 */
107 - void proxy(ConnectPoint outPort); 107 + void forward(ConnectPoint outPort);
108 108
109 /** 109 /**
110 - * Proxies the message to a given interface. 110 + * Forwards the message to a given interface.
111 - * 111 + * <p>
112 + * The message will be modified to fit the parameters of the outgoing
113 + * interface. For example, if the interface has a VLAN configured, the
114 + * outgoing packet will have that VLAN tag added.
115 + * </p>
112 * @param outIntf output interface 116 * @param outIntf output interface
113 */ 117 */
114 - void proxy(Interface outIntf); 118 + void forward(Interface outIntf);
115 119
116 /** 120 /**
117 * Replies to the request message with a given MAC address. 121 * Replies to the request message with a given MAC address.
......
...@@ -124,12 +124,12 @@ public class DefaultNeighbourMessageContext implements NeighbourMessageContext { ...@@ -124,12 +124,12 @@ public class DefaultNeighbourMessageContext implements NeighbourMessageContext {
124 } 124 }
125 125
126 @Override 126 @Override
127 - public void proxy(ConnectPoint outPort) { 127 + public void forward(ConnectPoint outPort) {
128 actions.forward(this, outPort); 128 actions.forward(this, outPort);
129 } 129 }
130 130
131 @Override 131 @Override
132 - public void proxy(Interface outIntf) { 132 + public void forward(Interface outIntf) {
133 actions.forward(this, outIntf); 133 actions.forward(this, outIntf);
134 } 134 }
135 135
......