Examples of NetInfoObject


Examples of systeminformationmonitor.system.object.NetInfoObject

        private String networkName;

        public UpdateNetworkInformation(String networkName) {
            this.networkName = networkName;
            this.netInterface = new NetInterfaceObject();
            this.netInfoObj = new NetInfoObject();
        }
View Full Code Here

Examples of systeminformationmonitor.system.object.NetInfoObject

*/
public class NetInformation{
  
    public static NetInfoObject getNetInfo() {
        SigarProxy sigar = SigarHolder.getInstance();
        NetInfoObject netObj = new NetInfoObject();
        try {
            org.hyperic.sigar.NetInfo netInfo = sigar.getNetInfo();
            netObj.setDefaultGateway(netInfo.getDefaultGateway());
            netObj.setDomainName(netInfo.getDomainName());
            netObj.setHostName(netInfo.getHostName());
            netObj.setPrimaryDns(netInfo.getPrimaryDns());
            netObj.setSecondaryDns(netInfo.getSecondaryDns());
            SigarHolder.clearCache();
        } catch (SigarException ex) {
            Logger.getLogger(NetInformation.class.getName()).log(Level.SEVERE, null, ex);
        }
        return netObj;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.