/** * Convenient three-argument version of <code>computeCodebase</code> * that will always return a codebase <code>String</code> represented * in standard <i>http</i> protocol format. */ public static String computeCodebase(String name, String jarFile, int port) throws IOException { return computeCodebase(name, jarFile, port, null, null); }
public static String getDefaultIpv4Address() throws SocketException, IOException { return getDefaultIpv4Address(false);//localhost NOT ok }
/** * 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; }
public void publish(LogRecord record) { if(! isLoggable(record)) return; String formattedMessage; try { formattedMessage = getFormatter().formatMessage(record); } catch(Exception e) { reportError(null, e, ErrorManager.FORMAT_FAILURE); return; } log4jLogger.callAppenders ( new XLoggingEvent(log4jLogger, record, formattedMessage) ); }
public static String getIpAddress(String name, int index) { InetAddress inetAddr = getInetAddress(name, index, name, false); if(inetAddr != null) return inetAddr.getHostAddress(); return null; }
public XLoggingEvent(org.apache.log4j.Logger log4jLogger, LogRecord record, String formattedMessage) { super( "org.apache.log4j.Logger", log4jLogger, record.getMillis(), translateLevel(record.getLevel()), formattedMessage, record.getThrown() ); this.origLoggerName = record.getLoggerName(); }
public static String getIpAddress(String name, int index, boolean localHost) { InetAddress inetAddr = getInetAddress(name, index, name, localHost); if(inetAddr != null) return inetAddr.getHostAddress(); return null; }
public static String getDefaultIpv4Address() throws SocketException, IOException { return getDefaultIpv4Address(false);//localhost NOT ok }
public static String getIpAddressByHost(String host, boolean localHost) { InetAddress inetAddr = getInetAddress(null, 0, host, localHost); if(inetAddr != null) return inetAddr.getHostAddress(); return null; }
public static String getIpAddress(String name, boolean localHost) { InetAddress inetAddr = getInetAddress(name, 0, name, localHost); if(inetAddr != null) return inetAddr.getHostAddress(); return null; }
public static String getIpAddressByHost(String host) { InetAddress inetAddr = getInetAddress(null, 0, host, false); if(inetAddr != null) return inetAddr.getHostAddress(); return null; }
public static String getIpAddress(String name, boolean localHost) { InetAddress inetAddr = getInetAddress(name, 0, name, localHost); if(inetAddr != null) return inetAddr.getHostAddress(); return null; }
public static String getIpAddressByHost(String host, boolean localHost) { InetAddress inetAddr = getInetAddress(null, 0, host, localHost); if(inetAddr != null) return inetAddr.getHostAddress(); return null; }
public static String getIpAddress(String name, String host) { InetAddress inetAddr = getInetAddress(name, 0, host, false); if(inetAddr != null) return inetAddr.getHostAddress(); return null; }
public static String getIpAddress(String name, int index, String host) { InetAddress inetAddr = getInetAddress(name, index, host, false); if(inetAddr != null) return inetAddr.getHostAddress(); return null; }
public static String getIpAddress(String name, int index, String host, boolean localHost) { InetAddress inetAddr = getInetAddress(name, index, host, localHost); if(inetAddr != null) return inetAddr.getHostAddress(); return null; }
/** * Returns the <code>String</code> value of the 0-th IP address assigned * to the network interface or host having the given <code>name</code>, * or <code>null</code> if that IP address cannot be retrieved. */ public static String getIpAddress(String name) { InetAddress inetAddr = getInetAddress(name, 0, name, false); if(inetAddr != null) return inetAddr.getHostAddress(); return null; }
public static String getIpAddress(String name, int index, String host) { InetAddress inetAddr = getInetAddress(name, index, host, false); if(inetAddr != null) return inetAddr.getHostAddress(); return null; }
public static String getIpAddress(String name, int index, String host, boolean localHost) { InetAddress inetAddr = getInetAddress(name, index, host, localHost); if(inetAddr != null) return inetAddr.getHostAddress(); return null; }
public static String getIpAddressByLocalHost() { InetAddress inetAddr = getInetAddress(null, 0, null, true); if(inetAddr != null) return inetAddr.getHostAddress(); return null; }