package org.bench4q.master.domain.valueobject.datastatistics;

import org.bench4q.master.infrastructure.communication.MonitorMessenger;
import org.bench4q.share.models.monitor.MonitorMain;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class TestMonitorSampler {

	private MonitorMessenger monitorMessenger;

	@Autowired
	private void setMonitorMessenger(MonitorMessenger monitorMessenger) {
		this.monitorMessenger = monitorMessenger;
	}

	public MonitorMain getMonitorResult(String hostName, int port) {
		return this.monitorMessenger.monitorModel(hostName, port);
	}

}
