Package juNetMonitor.dataStructures

Examples of juNetMonitor.dataStructures.hostItem


    // Retrieve data from database
    public void retrieveData() {
        Statement   sql = null;
        ResultSet   rs = null;
        String      stmt;
        hostItem    host;
        monitorItem monitor;
       
        dbConnection();
        hostList.clear();
        monitorList.clear();
       
        try {
            // Retrieve hosts
            sql = DBconn.createStatement();
            stmt  = "SELECT h.id, h.name hostname, h.address, h.status, h.maxstatus, g.name groupname ";
            stmt += "FROM hosts h, groups g ";
            stmt += "WHERE h.group = g.id";
           
            rs = sql.executeQuery(stmt);
            while (rs.next()) {
                host = new hostItem();
               
                host.id = rs.getInt("id");
                host.status = rs.getInt("status");
                host.maxStatus = rs.getInt("maxstatus");
                host.name = rs.getString("hostname");
View Full Code Here


    }

    // monitor-PING
    private boolean monitorPing(int hostId, int timeout) {
        // Find host
        hostItem    host = hosts.findHost(hostId);
        if (host == null) {
            return false;
        }

        // Monitor status
View Full Code Here

    }

    // monitor-TCP
    private boolean monitorTCP(int hostId, int tcpPort) {
        // Find host
        hostItem    host = hosts.findHost(hostId);
        if (host == null) {
            return false;
        }

        // Monitor status
View Full Code Here

TOP

Related Classes of juNetMonitor.dataStructures.hostItem

Copyright © 2018 www.massapicom. 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.