All Downloads are FREE. Search and download functionalities are using the official Maven repository.

prompto.config.PortRangeConfiguration Maven / Gradle / Ivy

package prompto.config;

import java.util.function.Supplier;

public class PortRangeConfiguration implements IPortRangeConfiguration  {

	IConfigurationReader reader;
	Supplier minPort;
	Supplier maxPort;

	public PortRangeConfiguration(IConfigurationReader reader) {
		this.reader = reader;
		this.minPort = ()->reader.getIntegerOrDefault("minPort", 1024);
		this.maxPort = ()->reader.getIntegerOrDefault("maxPort", 65535);
	}
	
	@Override
	public int getMinPort() {
		return minPort.get();
	}
	
	@Override
	public int getMaxPort() {
		return maxPort.get();
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy