@Service public class MockAccessBorderRouterService extends AbstractAccessBorderRouterService
existBorderRouter()
and getSensorIpByBorderRouterIp()
Modifier and Type | Field | Description |
---|---|---|
private static org.apache.log4j.Logger |
logger |
borderRouterRepository, sensorRepository
Constructor | Description |
---|---|
MockAccessBorderRouterService() |
Modifier and Type | Method | Description |
---|---|---|
boolean |
existBorderRouter(java.lang.String borderRouterIp) |
Check if a border router IP is exist, notice that this method doesn't check
if the IP is in database, it checks if the router IP exists in the real network.
|
java.util.List<java.lang.String> |
getSensorIpByBorderRouterIp(java.lang.String borderRouterIp) |
Take as input a
String of borderRouterIp, return a list of
IPv6 address of sensors that are connected to the given border router. |
saveBorderRouter, saveSensorsForBorderRouterIp
public boolean existBorderRouter(java.lang.String borderRouterIp)
existBorderRouter
in class AbstractAccessBorderRouterService
borderRouterIp
- The IPv6 address of the border router you want to check.true
for border router exists, false
otherwise.public java.util.List<java.lang.String> getSensorIpByBorderRouterIp(java.lang.String borderRouterIp)
String
of borderRouterIp, return a list of
IPv6 address of sensors that are connected to the given border router.
If the input borderRouterIp is inValid, return null instead.
This method just create dummy sensor ip for each input borde router. The
number of sensor will be a random number from 0 to 6.getSensorIpByBorderRouterIp
in class AbstractAccessBorderRouterService
borderRouterIp
- The IPv6 address of border router you want to query.