Package nz.co.abrahams.asithappens.collectors

Examples of nz.co.abrahams.asithappens.collectors.DataCollector


    public DataSets retrieveTemplate(int sessionID) throws DBException, UnknownHostException, SNMPException, DAOCreationException {
        PreparedStatement statement;
        ResultSet results;
        DataCollectorDAO collectorDAO;
        DataCollector collector;
        DataSets data;
        //Device device;
        //int dataTypeID;
        //boolean storing;
        //String portString;
        //String collectorType;

        try {
            collectorDAO = DAOFactory.getDataCollectorDAO(connection, sessionID);
            collector = collectorDAO.retrieve(sessionID);

            statement = connection.prepareStatement(RETRIEVE_TEMPLATE);
            statement.setInt(1, sessionID);
            results = statement.executeQuery();
            results.next();

            data = new DataSets(collector.getDataType(), collector, collector.getDevice(), results.getInt("pollInterval"),
                    results.getString("port"), results.getInt("direction"), results.getString("title"), results.getBoolean("storing"));
            results.close();
            statement.close();
           
            // Nasty - fix it up please
            if ( collector.getDataType() == DataType.OID ) {
                CustomOIDCollector oidCollector;
                oidCollector = (CustomOIDCollector)collector;
                for (int i = 0; i < oidCollector.getOIDs().size() ; i++) {
                    data.addSet(oidCollector.getOIDs().elementAt(i).label);
                }
View Full Code Here


   
    /** Creates a new response graph. */
    private void responseButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_responseButtonActionPerformed
        Device device;
        int pollInterval;
        DataCollector collector;
        DataSets data;
        TimeSeriesContext context;
        DataGraph graphFrame;
       
        try {
View Full Code Here

        processorsPane.setViewportView(new javax.swing.JList());
        storagePane.setViewportView(new javax.swing.JList());
    }//GEN-LAST:event_collectorTypeComboBoxActionPerformed
   
    private void storageButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_storageButtonActionPerformed
        DataCollector collector;
        DataSets data;
        TimeSeriesContext context;
        DataGraph graphFrame;
        int storageIndex;
        String storageString;
View Full Code Here

        }
    }//GEN-LAST:event_storageButtonActionPerformed
   
    /** Creates a new processor graph. */
    private void processorButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_processorButtonActionPerformed
        DataCollector collector;
        DataSets data;
        TimeSeriesContext context;
        DataGraph graphFrame;
        int processorIndex;
        String processorString;
View Full Code Here

TOP

Related Classes of nz.co.abrahams.asithappens.collectors.DataCollector

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.