Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Documentation + Cleanup
- Loading branch information
Markus von Rüden
committed
Jul 29, 2014
1 parent
a2481b6
commit e2b5859
Showing
28 changed files
with
745 additions
and
271 deletions.
There are no files selected for viewing
47 changes: 46 additions & 1 deletion
47
core/jmx/api/src/main/java/org/opennms/netmgt/jmx/JmxCollector.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,54 @@ | ||
/******************************************************************************* | ||
* This file is part of OpenNMS(R). | ||
* | ||
* Copyright (C) 2014 The OpenNMS Group, Inc. | ||
* OpenNMS(R) is Copyright (C) 1999-2014 The OpenNMS Group, Inc. | ||
* | ||
* OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc. | ||
* | ||
* OpenNMS(R) is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published | ||
* by the Free Software Foundation, either version 3 of the License, | ||
* or (at your option) any later version. | ||
* | ||
* OpenNMS(R) is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with OpenNMS(R). If not, see: | ||
* http://www.gnu.org/licenses/ | ||
* | ||
* For more information contact: | ||
* OpenNMS(R) Licensing <license@opennms.org> | ||
* http://www.opennms.org/ | ||
* http://www.opennms.com/ | ||
*******************************************************************************/ | ||
|
||
package org.opennms.netmgt.jmx; | ||
|
||
import org.opennms.netmgt.jmx.connection.JmxServerConnectionException; | ||
|
||
/** | ||
* The JmxCollector is responsible to collect the configured data at the configured ip address. | ||
*/ | ||
public interface JmxCollector { | ||
|
||
|
||
/** | ||
* Implements the logic for the jmx data collection. | ||
* <p/> | ||
* Therefore it should somehow: | ||
* 1. establish the connection to the configured ip address. | ||
* 2. collect the configured data. | ||
* 3. inform the {@link org.opennms.netmgt.jmx.JmxSampleProcessor} about the collected data. | ||
* <p/> | ||
* The {@link org.opennms.netmgt.jmx.JmxSampleProcessor} is a callback for each sample collected. | ||
* Therefore each sample can be transformed to another data structure (e.g. collectd). | ||
* | ||
* @param config The configuration to use for the collection. | ||
* @param sampleProcessor The callback to process each sample. | ||
* @throws JmxServerConnectionException If the connection to the jmx server could not be established (whatever the reason). | ||
*/ | ||
void collect(JmxCollectorConfig config, JmxSampleProcessor sampleProcessor) throws JmxServerConnectionException; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
core/jmx/api/src/main/java/org/opennms/netmgt/jmx/JmxSampleProcessor.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,51 @@ | ||
/******************************************************************************* | ||
* This file is part of OpenNMS(R). | ||
* | ||
* Copyright (C) 2014 The OpenNMS Group, Inc. | ||
* OpenNMS(R) is Copyright (C) 1999-2014 The OpenNMS Group, Inc. | ||
* | ||
* OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc. | ||
* | ||
* OpenNMS(R) is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published | ||
* by the Free Software Foundation, either version 3 of the License, | ||
* or (at your option) any later version. | ||
* | ||
* OpenNMS(R) is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with OpenNMS(R). If not, see: | ||
* http://www.gnu.org/licenses/ | ||
* | ||
* For more information contact: | ||
* OpenNMS(R) Licensing <license@opennms.org> | ||
* http://www.opennms.org/ | ||
* http://www.opennms.com/ | ||
*******************************************************************************/ | ||
|
||
package org.opennms.netmgt.jmx; | ||
|
||
import org.opennms.netmgt.jmx.samples.JmxAttributeSample; | ||
import org.opennms.netmgt.jmx.samples.JmxCompositeSample; | ||
|
||
/** | ||
* Processes collected JMX Samples. | ||
*/ | ||
public interface JmxSampleProcessor { | ||
/** | ||
* Callback method for each collected MBean Attribute. | ||
* | ||
* @param attributeSample The collected sample. | ||
*/ | ||
void process(JmxAttributeSample attributeSample); | ||
|
||
/** | ||
* Callback method for each collected Composite Member. | ||
* | ||
* @param compositeSample The collected sample. | ||
*/ | ||
void process(JmxCompositeSample compositeSample); | ||
} |
31 changes: 29 additions & 2 deletions
31
core/jmx/api/src/main/java/org/opennms/netmgt/jmx/JmxUtils.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
59 changes: 59 additions & 0 deletions
59
core/jmx/api/src/main/java/org/opennms/netmgt/jmx/connection/JmxConnectionManager.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 31 additions & 1 deletion
32
core/jmx/api/src/main/java/org/opennms/netmgt/jmx/connection/JmxConnectors.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
...jmx/api/src/main/java/org/opennms/netmgt/jmx/connection/JmxServerConnectionException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
core/jmx/api/src/main/java/org/opennms/netmgt/jmx/connection/JmxServerConnectionWrapper.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.