/** * Utility method to get the host for the currently running NSS. * If {@link NicUtil} returns a null pointer, it is set to the * value of {@link Config#DEFAULT_HOST}. * * @return The hostname for the running instance. * * @throws SocketException * @throws IOException */ protected static String getHost() throws SocketException, IOException { String hostAddr = NicUtil.getIpAddress("default.nic", "default", true/* loopbackOk */); if (hostAddr == null) { hostAddr = Config.DEFAULT_HOST; } return hostAddr; }
} else if( args[0].equals("getIpAddress") ) { if(args.length == 2) { String tmpIpAddress = NicUtil.getIpAddress(args[1]); if(tmpIpAddress != null) ipAddress = tmpIpAddress; } else if(args.length == 3) { String tmpIpAddress = NicUtil.getIpAddress(args[1],0,args[2],false); if(tmpIpAddress != null) ipAddress = tmpIpAddress;
/** * Utility method to get the host for the currently running NSS. * If {@link NicUtil} returns a null pointer, it is set to the * value of {@link Config#DEFAULT_HOST}. * * @return The hostname for the running instance. * * @throws SocketException * @throws IOException */ protected static String getHost() throws SocketException, IOException { String hostAddr = NicUtil.getIpAddress("default.nic", "default", true/* loopbackOk */); if (hostAddr == null) { hostAddr = Config.DEFAULT_HOST; } return hostAddr; }
} else if( args[0].equals("getIpAddress") ) { if(args.length == 2) { String tmpIpAddress = NicUtil.getIpAddress(args[1]); if(tmpIpAddress != null) ipAddress = tmpIpAddress; } else if(args.length == 3) { String tmpIpAddress = NicUtil.getIpAddress(args[1],0,args[2],false); if(tmpIpAddress != null) ipAddress = tmpIpAddress;
@Override public void setUp() throws Exception { resourceService = new ManagedResourceService(new InetSocketAddress( InetAddress.getByName(NicUtil.getIpAddress("default.nic", "default", true/* loopbackOk */)), 0/* port */ ), 0/* requestServicePoolSize */) { @Override protected File getResource(UUID uuid) throws Exception { throw new UnsupportedOperationException(); } }; }
@Override public void setUp() throws Exception { resourceService = new ManagedResourceService(new InetSocketAddress( InetAddress.getByName(NicUtil.getIpAddress("default.nic", "default", true/* loopbackOk */)), 0/* port */ ), 0/* requestServicePoolSize */) { @Override protected File getResource(UUID uuid) throws Exception { throw new UnsupportedOperationException(); } }; }
public AbstractEmbeddedLoadBalancerService(UUID serviceUUID, Properties properties) { super( properties ); // if (serviceUUID == null) // throw new IllegalArgumentException(); // this.serviceUUID = serviceUUID; setServiceUUID(serviceUUID); try { this.hostname = NicUtil.getIpAddress("default.nic", "default", false); } catch(Throwable t) { t.printStackTrace(); } }
public AbstractEmbeddedLoadBalancerService(UUID serviceUUID, Properties properties) { super( properties ); // if (serviceUUID == null) // throw new IllegalArgumentException(); // this.serviceUUID = serviceUUID; setServiceUUID(serviceUUID); try { this.hostname = NicUtil.getIpAddress("default.nic", "default", false); } catch(Throwable t) { t.printStackTrace(); } }
final int altport = NanoSparqlServer.getLocalPort(altfixture); final String hostAddr = NicUtil.getIpAddress("default.nic", "default", true/* loopbackOk */);
final String hostAddr = NicUtil.getIpAddress("default.nic", "default", true/* loopbackOk */);
final String hostAddr = NicUtil.getIpAddress("default.nic", "default", true/* loopbackOk */);
final String hostAddr = NicUtil.getIpAddress("default.nic", "default", true/* loopbackOk */);
final String hostAddr = NicUtil.getIpAddress("default.nic", "default", true/* loopbackOk */);
final String hostAddr = NicUtil.getIpAddress("default.nic", "default", true/* loopbackOk */);
final String hostAddr = NicUtil.getIpAddress("default.nic", "default", true/* loopbackOk */);
final int altport = NanoSparqlServer.getLocalPort(altfixture); final String hostAddr = NicUtil.getIpAddress("default.nic", "default", true/* loopbackOk */);
final String hostAddr = NicUtil.getIpAddress("default.nic", "default", true/* loopbackOk */);
final String hostAddr = NicUtil.getIpAddress("default.nic", "default", true/* loopbackOk */);
final String localIpAddr = NicUtil.getIpAddress("default.nic", "default", true);
final String localIpAddr = NicUtil.getIpAddress("default.nic", "default", true);