@Test public void setNetmask() throws Exception { service.setNetmask(IpAddressBuilder.getDefaultInstance("255.255.0.0")); Assert.assertEquals("Expected \"255.255.0.0\", got", "255.255.0.0", addressToString(service.getNetmask())); service.addRouteForCurrentService(); service.setNetmask(IpAddressBuilder.getDefaultInstance("255.255.0.0")); Assert.assertEquals("Expected \"255.255.0.0\", got", "255.255.0.0", addressToString(service.getNetmask())); service.setNetmask(IpAddressBuilder.getDefaultInstance("255.0.0.0")); Assert.assertEquals("Expected \"255.0.0.0\", got", "255.0.0.0", addressToString(service.getNetmask())); }
@Override public Routing setNetmask(final IpAddress netmask) { if (Objects.requireNonNull(netmask).equals(this.netmask)) { return this; } this.netmask = netmask; return this; }
LinuxRoutingService implements Routing { @Override public Routing setNetmask(final IpAddress netmask) { if (Objects.requireNonNull(netmask).equals(this.netmask)) { return this; } this.netmask = netmask; return this; } }
LinuxRoutingService implements Routing { @Override public Routing setNetmask(final IpAddress netmask) { if (Objects.requireNonNull(netmask).equals(this.netmask)) { return this; } this.netmask = netmask; return this; } LinuxRoutingService(SystemCall systemCall, RoutingDefinition initializer); }
LinuxRoutingService implements Routing { @Override public Routing setNetmask(final IpAddress netmask) { if (Objects.requireNonNull(netmask).equals(this.netmask)) { return this; } this.netmask = netmask; return this; } LinuxRoutingService(SystemCall systemCall, RoutingDefinition initializer); String executeCommand(String command); int executeCommandRC(String command); @Override synchronized Routing setInterface(String inf); @Override Routing setNetmask(final IpAddress netmask); @Override IpAddress getNetmask(); @Override synchronized String getInterface(); @Override synchronized IpAddress getVirtualIp(); @Override synchronized boolean isActive(); @Override synchronized boolean removeRouteForCurrentService(); @Override synchronized boolean addRouteForCurrentService(); @Override boolean updateArpTableForCurrentService(); @Override String toString(); }
LinuxRoutingService implements Routing { @Override public Routing setNetmask(final IpAddress netmask) { if (Objects.requireNonNull(netmask).equals(this.netmask)) { return this; } this.netmask = netmask; return this; } LinuxRoutingService(SystemCall systemCall, RoutingDefinition initializer); String executeCommand(String command); int executeCommandRC(String command); @Override synchronized Routing setInterface(String inf); @Override Routing setNetmask(final IpAddress netmask); @Override IpAddress getNetmask(); @Override synchronized String getInterface(); @Override synchronized IpAddress getVirtualIp(); @Override synchronized boolean isActive(); @Override synchronized boolean removeRouteForCurrentService(); @Override synchronized boolean addRouteForCurrentService(); @Override boolean updateArpTableForCurrentService(); @Override String toString();  }