public ServiceDaemon(ServerService next, int port, String ip) { this.port = port; this.ip = ip; this.address = getAddress(ip); this.next = next; }
public ServiceDaemon(final ServerService next, final int port, final String ip) { this.port = port; this.ip = ip; this.inetAddress = getAddress(ip); this.next = next; }
public void init(Properties props) throws Exception { String formatString = props.getProperty("discovery"); if (formatString != null){ discoveryUriFormat = new StringTemplate(formatString); } ip = props.getProperty("bind"); address = getAddress(ip); Options options = new Options(props); port = options.get("port", 0); int threads = options.get("threads", 100); backlog = options.get("backlog", threads); secure = options.get("secure", false); timeout = 1000; next.init(props); }
@Override public void init(final Properties props) throws Exception { this.props = props; final String formatString = props.getProperty("discovery"); if (formatString != null) { this.discoveryUriFormat = new StringTemplate(formatString); } this.ip = PropertyPlaceHolderHelper.simpleValue(props.getProperty("bind")); this.inetAddress = getAddress(this.ip); final Options options = new Options(props); this.port = Integer.parseInt(PropertyPlaceHolderHelper.simpleValue(options.get("port", "0"))); final int threads = options.get("threads", 100); this.backlog = options.get("backlog", threads); this.secure = options.get("secure", false); this.timeout = options.get("timeout", this.timeout); this.enabledCipherSuites = options.get("enabledCipherSuites", "SSL_DH_anon_WITH_RC4_128_MD5").split(","); this.next.init(props); }