List of usage examples for java.net InetAddress getLoopbackAddress
public static InetAddress getLoopbackAddress()
From source file:com.alliander.osgp.acceptancetests.adhocmanagement.SetLightSteps.java
private void createDevice(final String deviceIdentification, final Boolean activated) { LOGGER.info("Creating device [{}] with active [{}]", deviceIdentification, activated); this.device = new DeviceBuilder().withDeviceIdentification(deviceIdentification) .withNetworkAddress(activated ? InetAddress.getLoopbackAddress() : null) .withPublicKeyPresent(PUBLIC_KEY_PRESENT) .withProtocolInfo(ProtocolInfoTestUtils.getProtocolInfo(PROTOCOL, PROTOCOL_VERSION)) .isActivated(activated).build(); this.oslpDevice = new OslpDeviceBuilder().withDeviceIdentification(deviceIdentification) .withDeviceUid(DEVICE_UID).build(); }
From source file:com.alliander.osgp.acceptancetests.configurationmanagement.SetConfigurationDataSteps.java
private void createDevice(final String deviceIdentification, final Boolean activated) { LOGGER.info("Creating device [{}] with active [{}]", deviceIdentification, activated); this.device = (Ssld) new DeviceBuilder().withDeviceIdentification(deviceIdentification) .withNetworkAddress(activated ? InetAddress.getLoopbackAddress() : null) .withPublicKeyPresent(PUBLIC_KEY_PRESENT) .withProtocolInfo(ProtocolInfoTestUtils.getProtocolInfo(PROTOCOL, PROTOCOL_VERSION)) .isActivated(activated).build(); this.oslpDevice = new OslpDeviceBuilder().withDeviceIdentification(deviceIdentification) .withDeviceUid(DEVICE_UID).build(); }
From source file:com.alliander.osgp.acceptancetests.adhocmanagement.GetStatusSteps.java
private void createDevice(final String deviceIdentification, final boolean activated) { LOGGER.info("Creating device [{}] with active [{}]", deviceIdentification, activated); this.device = (Ssld) new DeviceBuilder().withDeviceIdentification(deviceIdentification) .withNetworkAddress(activated ? InetAddress.getLoopbackAddress() : null) .withPublicKeyPresent(PUBLIC_KEY_PRESENT) .withProtocolInfo(ProtocolInfoTestUtils.getProtocolInfo(PROTOCOL, PROTOCOL_VERSION)) .isActivated(activated).build(); this.oslpDevice = new OslpDeviceBuilder().withDeviceIdentification(deviceIdentification) .withDeviceUid(DEVICE_UID).build(); }
From source file:net.sf.freecol.FreeCol.java
/** * Get the default server host name.// w w w .j a v a 2 s . c om * * @return The host name. */ public static String getServerHost() { return InetAddress.getLoopbackAddress().getHostAddress(); }