com.logicbus.backend.message.tools.HostMask Maven / Gradle / Ivy
package com.logicbus.backend.message.tools;
import com.anysoft.util.Properties;
import com.anysoft.util.PropertiesConstants;
/**
* 主机mask工具
*/
public class HostMask {
protected boolean hostMask = true;
public HostMask(Properties props){
hostMask = PropertiesConstants.getBoolean(props,"servant.hostmask",hostMask);
}
public String getHost(String host){
return hostMask ? host.replaceFirst("\\d{1,}\\.\\d{1,}\\.\\d{1,}\\.","*.*.*."):host;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy