package org.bench4q.monitor.service.linux;

import java.io.IOException;

import org.bench4q.monitor.model.NetworkInterfaceModel;
import org.bench4q.monitor.performance.linux.NetworkInterfaceMonitor;

public class NetworkInterfaceServiceLinux {
	public NetworkInterfaceServiceLinux() throws IOException {
		this.networkInterfaceMonitor = new NetworkInterfaceMonitor();
	}

	private NetworkInterfaceMonitor networkInterfaceMonitor;

	public NetworkInterfaceMonitor getNetworkInterfaceMonitor() {
		return networkInterfaceMonitor;
	}

	public void setNetworkInterfaceMonitor(
			NetworkInterfaceMonitor networkInterfaceMonitor) {
		this.networkInterfaceMonitor = networkInterfaceMonitor;
	}

	public NetworkInterfaceModel getNetworkInterfaceInfo(int idleTime)
			throws IOException, InterruptedException {
		return this.getNetworkInterfaceMonitor().getNetworkInterfaceInfo(
				idleTime);
	}
}
