The following document contains the results of Rat (Release Audit Tool).
*****************************************************
Summary
-------
Generated at: 2017-03-11T23:57:15-05:00
Notes: 0
Binaries: 0
Archives: 0
Standards: 67
Apache Licensed: 0
Generated Documents: 0
JavaDocs are generated, thus a license header is optional.
Generated files do not require license headers.
66 Unknown Licenses
*****************************************************
Files with unapproved licenses:
C:/projects/fgsms/fgsms-server/fgsms-sla-processor/pom.xml
C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/actions/AMQPAlerter.java
C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/actions/EmailAlerter.java
C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/actions/JMSAlerter.java
C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/actions/SimpleMulticastAlerter.java
C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/actions/SLAActionLog.java
C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/actions/SLAActionRestart.java
C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/actions/SLAActionRunScript.java
C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/actions/WSNotificationAlerter.java
C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/AlertRunner.java
C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/AuxHelper.java
C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/NonTransactionalSLAProcessor.java
C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/package-info.java
C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/PolicyExistsException.java
C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/rules/ActionContainsIgnoreCase.java
C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/rules/ActionEqualsIgnoreCase.java
C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/rules/AllFaults.java
C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/rules/AllSuccesses.java
C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/rules/BrokerQueueSizeGreaterThan.java
C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/rules/ChangeInAvailabilityStatus.java
C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/rules/ConsumerContainsIgnoreCase.java
C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/rules/ConsumerEqualsIgnoreCase.java
C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/rules/FaultsOverTimeGreaterThan.java
C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/rules/FaultsOverTimeLessThan.java
C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/rules/HighCPUUsage.java
C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/rules/HighCPUUsageOverTime.java
C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/rules/HighDiskUsageOverTime.java
C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/rules/HighMemoryUsage.java
C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/rules/HighMemoryUsageOverTime.java
C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/rules/HighNetworkUsageOverTime.java
C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/rules/HighOpenFileHandles.java
C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/rules/HighThreadCount.java
C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/rules/InvocationsOverTimeGreatThan.java
C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/rules/InvocationsOverTimeLessThan.java
C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/rules/LowDiskSpace.java
C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/rules/MeanTimeBetweenFailureGreatThan.java
C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/rules/MeanTimeBetweenFailureLessThan.java
C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/rules/QueueOrTopicDoesNotExist.java
C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/rules/RequestContentContainsIgnoreCase.java
C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/rules/RequestMessageSizeGreaterThan.java
C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/rules/RequestMessageSizeLessThan.java
C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/rules/ResponseContentContainsIgnoreCase.java
C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/rules/ResponseMessageSizeGreaterThan.java
C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/rules/ResponseMessageSizeLessThan.java
C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/rules/ResponseTimeGreaterThan.java
C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/rules/ResponseTimeLessThan.java
C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/rules/StaleData.java
C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/rules/TransactionalAgentMemoContainsIgnoreCase.java
C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/rules/XPathExpression.java
C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/SLACommon.java
C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/SLAProcessorController.java
C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/SLAProcessorControllerMBean.java
C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/SLAProcessorSingleton.java
C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/SLAWorker.java
C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/TransactionalSLAProcessor.java
C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/resources/log4j.properties
C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/resources/META-INF/wsdds_service.wsdl
C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/resources/META-INF/wsdds_types.xsd
C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/resources/META-INF/xml.xsd
C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/resources/org/miloss/fgsms/sla/SLAResources.properties
C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/test/java/org/miloss/fgsms/sla/InitialContextFactoryForTest.java
C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/test/java/org/miloss/fgsms/sla/MainTest.java
C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/test/java/org/miloss/fgsms/sla/NonTransactionalSLAProcessorTest.java
C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/test/java/org/miloss/fgsms/sla/SlaSuite.java
C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/test/java/org/miloss/fgsms/sla/TransactionalSLAProcessorTest.java
C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/test/java/org/miloss/fgsms/sla/WSNotificationAlerterTest.java
*****************************************************
*****************************************************
Files with Apache License headers will be marked AL
Binary files (which do not require any license headers) will be marked B
Compressed archives will be marked A
Notices, licenses etc. will be marked N
!????? C:/projects/fgsms/fgsms-server/fgsms-sla-processor/pom.xml
!????? C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/actions/AMQPAlerter.java
!????? C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/actions/EmailAlerter.java
!????? C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/actions/JMSAlerter.java
!????? C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/actions/SimpleMulticastAlerter.java
!????? C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/actions/SLAActionLog.java
!????? C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/actions/SLAActionRestart.java
!????? C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/actions/SLAActionRunScript.java
!????? C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/actions/WSNotificationAlerter.java
!????? C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/AlertRunner.java
!????? C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/AuxHelper.java
!????? C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/NonTransactionalSLAProcessor.java
!????? C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/package-info.java
!????? C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/PolicyExistsException.java
!????? C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/rules/ActionContainsIgnoreCase.java
!????? C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/rules/ActionEqualsIgnoreCase.java
!????? C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/rules/AllFaults.java
!????? C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/rules/AllSuccesses.java
!????? C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/rules/BrokerQueueSizeGreaterThan.java
!????? C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/rules/ChangeInAvailabilityStatus.java
!????? C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/rules/ConsumerContainsIgnoreCase.java
!????? C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/rules/ConsumerEqualsIgnoreCase.java
!????? C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/rules/FaultsOverTimeGreaterThan.java
!????? C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/rules/FaultsOverTimeLessThan.java
!????? C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/rules/HighCPUUsage.java
!????? C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/rules/HighCPUUsageOverTime.java
!????? C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/rules/HighDiskUsageOverTime.java
!????? C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/rules/HighMemoryUsage.java
!????? C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/rules/HighMemoryUsageOverTime.java
!????? C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/rules/HighNetworkUsageOverTime.java
!????? C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/rules/HighOpenFileHandles.java
!????? C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/rules/HighThreadCount.java
!????? C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/rules/InvocationsOverTimeGreatThan.java
!????? C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/rules/InvocationsOverTimeLessThan.java
!????? C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/rules/LowDiskSpace.java
!????? C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/rules/MeanTimeBetweenFailureGreatThan.java
!????? C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/rules/MeanTimeBetweenFailureLessThan.java
!????? C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/rules/QueueOrTopicDoesNotExist.java
!????? C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/rules/RequestContentContainsIgnoreCase.java
!????? C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/rules/RequestMessageSizeGreaterThan.java
!????? C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/rules/RequestMessageSizeLessThan.java
!????? C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/rules/ResponseContentContainsIgnoreCase.java
!????? C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/rules/ResponseMessageSizeGreaterThan.java
!????? C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/rules/ResponseMessageSizeLessThan.java
!????? C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/rules/ResponseTimeGreaterThan.java
!????? C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/rules/ResponseTimeLessThan.java
!????? C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/rules/StaleData.java
!????? C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/rules/TransactionalAgentMemoContainsIgnoreCase.java
!????? C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/rules/XPathExpression.java
!????? C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/SLACommon.java
!????? C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/SLAProcessorController.java
!????? C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/SLAProcessorControllerMBean.java
!????? C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/SLAProcessorSingleton.java
!????? C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/SLAWorker.java
!????? C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/TransactionalSLAProcessor.java
!????? C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/resources/log4j.properties
W3C C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/resources/META-INF/ws-addr.xsd
!????? C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/resources/META-INF/wsdds_service.wsdl
!????? C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/resources/META-INF/wsdds_types.xsd
!????? C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/resources/META-INF/xml.xsd
!????? C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/resources/org/miloss/fgsms/sla/SLAResources.properties
!????? C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/test/java/org/miloss/fgsms/sla/InitialContextFactoryForTest.java
!????? C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/test/java/org/miloss/fgsms/sla/MainTest.java
!????? C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/test/java/org/miloss/fgsms/sla/NonTransactionalSLAProcessorTest.java
!????? C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/test/java/org/miloss/fgsms/sla/SlaSuite.java
!????? C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/test/java/org/miloss/fgsms/sla/TransactionalSLAProcessorTest.java
!????? C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/test/java/org/miloss/fgsms/sla/WSNotificationAlerterTest.java
*****************************************************
Printing headers for text files without a valid license header...
=====================================================
== File: C:/projects/fgsms/fgsms-server/fgsms-sla-processor/pom.xml
=====================================================
<?xml version="1.0" encoding="UTF-8"?>
<!--
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
If it is not possible or desirable to put the notice in a particular
file, then You may include the notice in a location (such as a LICENSE
file in a relevant directory) where a recipient would be likely to look
for such a notice.
U.S. Government, Department of the Army
Army Materiel Command
Research Development Engineering Command
Communications Electronics Research Development and Engineering Center
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.mil-oss</groupId>
<artifactId>fgsms-server</artifactId>
<version>7.0.0</version>
</parent>
<artifactId>fgsms-sla-processor</artifactId>
<packaging>bundle</packaging>
<name>fgsms Service Level Agreement Processor</name>
<description>The SLA processor handles rules and actions invocations based on service owner defined rules</description>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mil-oss</groupId>
<artifactId>fgsms-common</artifactId>
<version>${project.parent.version}</version>
</dependency>
<dependency>
<groupId>org.mil-oss</groupId>
<artifactId>fgsms-common-interfaces</artifactId>
<version>${project.parent.version}</version>
</dependency>
=====================================================
== File: C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/actions/AMQPAlerter.java
=====================================================
/**
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* If it is not possible or desirable to put the notice in a particular
* file, then You may include the notice in a location (such as a LICENSE
* file in a relevant directory) where a recipient would be likely to look
* for such a notice.
*
*/
/* ---------------------------------------------------------------------------
* U.S. Government, Department of the Army
* Army Materiel Command
* Research Development Engineering Command
* Communications Electronics Research Development and Engineering Center
* ---------------------------------------------------------------------------
*/
package org.miloss.fgsms.sla.actions;
import java.io.File;
import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.atomic.AtomicReference;
import javax.jms.*;
import javax.naming.Context;
import org.apache.log4j.Level;
import org.miloss.fgsms.common.Logger;;
import org.apache.qpid.client.AMQConnection;
import org.miloss.fgsms.common.DBSettingsLoader;
import org.miloss.fgsms.common.SLAUtils;
import org.miloss.fgsms.common.Utility;
import org.miloss.fgsms.plugins.sla.AlertContainer;
import org.miloss.fgsms.plugins.sla.SLAActionInterface;
import org.miloss.fgsms.services.interfaces.common.NameValuePair;
import org.miloss.fgsms.services.interfaces.common.PolicyType;
import org.miloss.fgsms.services.interfaces.policyconfiguration.KeyNameValueEnc;
import org.miloss.fgsms.sla.SLACommon;
/**
* Uses the Qpid AMQP client library to publish alerts
*
* @author AO
* @since 5.0, major refactor since 6.3
*/
public class AMQPAlerter implements SLAActionInterface {
=====================================================
== File: C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/actions/EmailAlerter.java
=====================================================
/**
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* If it is not possible or desirable to put the notice in a particular
* file, then You may include the notice in a location (such as a LICENSE
* file in a relevant directory) where a recipient would be likely to look
* for such a notice.
*
*/
/* ---------------------------------------------------------------------------
* U.S. Government, Department of the Army
* Army Materiel Command
* Research Development Engineering Command
* Communications Electronics Research Development and Engineering Center
* ---------------------------------------------------------------------------
*/
package org.miloss.fgsms.sla.actions;
import java.util.ArrayList;
import java.util.List;
import java.util.Properties;
import java.util.concurrent.atomic.AtomicReference;
import javax.mail.Message;
import javax.mail.Session;
import javax.mail.Transport;
import javax.mail.internet.InternetAddress;
import javax.mail.internet.MimeMessage;
import org.apache.log4j.Level;
import org.miloss.fgsms.common.Logger;;
import org.miloss.fgsms.common.Utility;
import org.miloss.fgsms.plugins.sla.AlertContainer;
import org.miloss.fgsms.plugins.sla.SLAActionInterface;
import org.miloss.fgsms.services.interfaces.common.NameValuePair;
import org.miloss.fgsms.services.interfaces.common.PolicyType;
import org.miloss.fgsms.services.interfaces.policyconfiguration.SLAAction;
import org.miloss.fgsms.sla.SLACommon;
/**
*
* @author AO
*/
public class EmailAlerter implements SLAActionInterface {
private static Logger log = Logger.getLogger("fgsms.SLAProcessor");
=====================================================
== File: C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/actions/JMSAlerter.java
=====================================================
/**
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* If it is not possible or desirable to put the notice in a particular
* file, then You may include the notice in a location (such as a LICENSE
* file in a relevant directory) where a recipient would be likely to look
* for such a notice.
*
*/
/* ---------------------------------------------------------------------------
* U.S. Government, Department of the Army
* Army Materiel Command
* Research Development Engineering Command
* Communications Electronics Research Development and Engineering Center
* ---------------------------------------------------------------------------
*/
package org.miloss.fgsms.sla.actions;
import java.util.ArrayList;
import java.util.List;
import java.util.Properties;
import java.util.concurrent.atomic.AtomicReference;
import javax.jms.*;
import javax.naming.Context;
import javax.naming.InitialContext;
import org.apache.log4j.Level;
import org.miloss.fgsms.common.Logger;;
import org.miloss.fgsms.common.DBSettingsLoader;
import org.miloss.fgsms.common.SLAUtils;
import org.miloss.fgsms.common.Utility;
import org.miloss.fgsms.plugins.sla.AlertContainer;
import org.miloss.fgsms.plugins.sla.SLAActionInterface;
import org.miloss.fgsms.services.interfaces.common.NameValuePair;
import org.miloss.fgsms.services.interfaces.common.PolicyType;
import org.miloss.fgsms.services.interfaces.policyconfiguration.KeyNameValueEnc;
/**
* Sends a JMS Alert
*
* @author AO
*/
public class JMSAlerter implements SLAActionInterface {
static final Logger log = Logger.getLogger("fgsms.JMSAlerting");
private static boolean isconfigured = false;
private static boolean Topic = true; //if false, queue
=====================================================
== File: C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/actions/SimpleMulticastAlerter.java
=====================================================
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package org.miloss.fgsms.sla.actions;
import java.net.DatagramPacket;
import java.net.InetAddress;
import java.net.MulticastSocket;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.atomic.AtomicReference;
import org.apache.log4j.Level;
import org.miloss.fgsms.common.Constants;
import org.miloss.fgsms.common.DBSettingsLoader;
import org.miloss.fgsms.common.Logger;
import org.miloss.fgsms.common.SLAUtils;
import org.miloss.fgsms.common.Utility;
import org.miloss.fgsms.plugins.sla.AlertContainer;
import org.miloss.fgsms.plugins.sla.SLAActionInterface;
import org.miloss.fgsms.services.interfaces.common.NameValuePair;
import org.miloss.fgsms.services.interfaces.common.PolicyType;
import org.miloss.fgsms.services.interfaces.policyconfiguration.KeyNameValueEnc;
/**
* This is an super simple UDP Multicast alerting mechanism. It transmits an XML
* WSDN alert over the specified Multicast group and port.
*
* Because it sends XML formatted messages, it is not recommended to forward
* this particular multicast group over metered or low bandwidth networks.
*
* @author AO
*/
public class SimpleMulticastAlerter implements SLAActionInterface {
private static final String KEY = "MulticastAlerting";
static final Logger log = Logger.getLogger("fgsms.MulticastAlerting");
private static boolean isconfigured = false;
private static String ConnectionURL = "";
private static long LastConfigRefresh = 0;
/**
* Returns true if the message was delivered successfully
*
* @param alert
* @return
=====================================================
== File: C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/actions/SLAActionLog.java
=====================================================
/**
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* If it is not possible or desirable to put the notice in a particular
* file, then You may include the notice in a location (such as a LICENSE
* file in a relevant directory) where a recipient would be likely to look
* for such a notice.
*
*/
/* ---------------------------------------------------------------------------
* U.S. Government, Department of the Army
* Army Materiel Command
* Research Development Engineering Command
* Communications Electronics Research Development and Engineering Center
* ---------------------------------------------------------------------------
*/
package org.miloss.fgsms.sla.actions;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.concurrent.atomic.AtomicReference;
import org.apache.log4j.Level;
import org.miloss.fgsms.common.Logger;;
import org.miloss.fgsms.common.Utility;
import org.miloss.fgsms.plugins.sla.AlertContainer;
import org.miloss.fgsms.plugins.sla.SLAActionInterface;
import org.miloss.fgsms.services.interfaces.common.NameValuePair;
import org.miloss.fgsms.services.interfaces.common.PolicyType;
import org.miloss.fgsms.services.interfaces.policyconfiguration.SLAAction;
import org.miloss.fgsms.sla.SLACommon;
/**
*
* @author AO
*/
public class SLAActionLog implements SLAActionInterface {
private static Logger log = Logger.getLogger("fgsms.SLAProcessor");
// @Override
public void ProcessAction(AlertContainer alert) {
SendLogger(alert.getFaultMsg(), alert.getSlaActionBaseType(), alert.getModifiedurl(), alert.getIncidentid());
}
=====================================================
== File: C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/actions/SLAActionRestart.java
=====================================================
/**
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* If it is not possible or desirable to put the notice in a particular
* file, then You may include the notice in a location (such as a LICENSE
* file in a relevant directory) where a recipient would be likely to look
* for such a notice.
*
*/
/* ---------------------------------------------------------------------------
* U.S. Government, Department of the Army
* Army Materiel Command
* Research Development Engineering Command
* Communications Electronics Research Development and Engineering Center
* ---------------------------------------------------------------------------
*/
package org.miloss.fgsms.sla.actions;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.atomic.AtomicReference;
import org.miloss.fgsms.common.Logger;;
import org.miloss.fgsms.common.Utility;
import org.miloss.fgsms.plugins.sla.AlertContainer;
import org.miloss.fgsms.plugins.sla.SLAActionInterface;
import org.miloss.fgsms.services.interfaces.common.NameValuePair;
import org.miloss.fgsms.services.interfaces.common.PolicyType;
/**
*
* @author AO
*/
public class SLAActionRestart implements SLAActionInterface {
private static Logger log = Logger.getLogger("fgsms.SLAProcessor");
public static final String RUNAT = "runAtLocation";
@Override
public List<NameValuePair> GetRequiredParameters() {
return new ArrayList<NameValuePair>();
}
=====================================================
== File: C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/actions/SLAActionRunScript.java
=====================================================
/**
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* If it is not possible or desirable to put the notice in a particular
* file, then You may include the notice in a location (such as a LICENSE
* file in a relevant directory) where a recipient would be likely to look
* for such a notice.
*
*
*/
/* ---------------------------------------------------------------------------
* U.S. Government, Department of the Army
* Army Materiel Command
* Research Development Engineering Command
* Communications Electronics Research Development and Engineering Center
* ---------------------------------------------------------------------------
*/
package org.miloss.fgsms.sla.actions;
import java.io.File;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.atomic.AtomicReference;
import org.apache.log4j.Level;
import org.miloss.fgsms.common.Logger;
;
import org.miloss.fgsms.common.Utility;
import org.miloss.fgsms.plugins.sla.AlertContainer;
import org.miloss.fgsms.plugins.sla.SLAActionInterface;
import org.miloss.fgsms.services.interfaces.common.NameValuePair;
import org.miloss.fgsms.services.interfaces.common.PolicyType;
import org.miloss.fgsms.services.interfaces.policyconfiguration.RunAtLocation;
import org.miloss.fgsms.services.interfaces.policyconfiguration.SLAAction;
import org.miloss.fgsms.sla.SLACommon;
/**
*
* @author AO
*/
public class SLAActionRunScript implements SLAActionInterface {
private static Logger log = Logger.getLogger("fgsms.SLAProcessor");
public static final String RUNAT = "runAt";
// @Override
public void ProcessAction(AlertContainer alert) {
=====================================================
== File: C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/actions/WSNotificationAlerter.java
=====================================================
/**
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* If it is not possible or desirable to put the notice in a particular
* file, then You may include the notice in a location (such as a LICENSE
* file in a relevant directory) where a recipient would be likely to look
* for such a notice.
*
*/
/* ---------------------------------------------------------------------------
* U.S. Government, Department of the Army
* Army Materiel Command
* Research Development Engineering Command
* Communications Electronics Research Development and Engineering Center
* ---------------------------------------------------------------------------
*/
package org.miloss.fgsms.sla.actions;
import java.io.File;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.atomic.AtomicReference;
import javax.xml.ws.BindingProvider;
import org.apache.log4j.Level;
import org.miloss.fgsms.common.DBSettingsLoader;
import org.miloss.fgsms.common.Logger;
import org.miloss.fgsms.common.SLAUtils;
import org.miloss.fgsms.common.Utility;
import org.miloss.fgsms.plugins.sla.AlertContainer;
import org.miloss.fgsms.plugins.sla.SLAActionInterface;
import org.miloss.fgsms.services.interfaces.common.NameValuePair;
import org.miloss.fgsms.services.interfaces.common.PolicyType;
import org.miloss.fgsms.services.interfaces.policyconfiguration.KeyNameValueEnc;
import org.miloss.fgsms.sla.SLACommon;
import org.miloss.fgsms.wsn.WSNConstants;
import org.oasis_open.docs.wsn.b_2.NotificationMessageHolderType;
import org.oasis_open.docs.wsn.b_2.NotificationMessageHolderType.Message;
import org.oasis_open.docs.wsn.b_2.Notify;
import org.oasis_open.docs.wsn.b_2.TopicExpressionType;
import org.oasis_open.docs.wsn.br_2.RegisterPublisher;
import org.oasis_open.docs.wsn.br_2.RegisterPublisherResponse;
import org.oasis_open.docs.wsn.brw_2.NotificationBroker;
import org.oasis_open.docs.wsn.client.NotificationService;
import org.w3c.dom.Element;
=====================================================
== File: C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/AlertRunner.java
=====================================================
/**
* This Source Code Form is subject to the terms of the Mozilla Public License,
* v. 2.0. If a copy of the MPL was not distributed with this file, You can
* obtain one at http://mozilla.org/MPL/2.0/.
*
* If it is not possible or desirable to put the notice in a particular file,
* then You may include the notice in a location (such as a LICENSE file in a
* relevant directory) where a recipient would be likely to look for such a
* notice.
*
*
*/
/* ---------------------------------------------------------------------------
* U.S. Government, Department of the Army
* Army Materiel Command
* Research Development Engineering Command
* Communications Electronics Research Development and Engineering Center
* ---------------------------------------------------------------------------
*/
package org.miloss.fgsms.sla;
import java.util.Queue;
import org.miloss.fgsms.plugins.sla.AlertContainer;
import org.miloss.fgsms.common.Logger;;
/**
* Performs alerting functions when not running in Jboss (i.e. thread
* pooling)
*
* @author AO
*/
public class AlertRunner implements Runnable {
private Queue<AlertContainer> queue = null;
AlertRunner(Queue<AlertContainer> q) {
queue = q;
}
static final Logger log = Logger.getLogger("fgsms.SLAProcessor");
@Override
public void run() {
try {
AlertContainer poll = queue.poll();
if (poll != null) {
SLACommon slac = new SLACommon();
do {
slac.DoAlerts(poll);
poll = queue.poll();
} while (poll != null);
=====================================================
== File: C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/AuxHelper.java
=====================================================
/**
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* If it is not possible or desirable to put the notice in a particular
* file, then You may include the notice in a location (such as a LICENSE
* file in a relevant directory) where a recipient would be likely to look
* for such a notice.
*
*
*/
/* ---------------------------------------------------------------------------
* U.S. Government, Department of the Army
* Army Materiel Command
* Research Development Engineering Command
* Communications Electronics Research Development and Engineering Center
* ---------------------------------------------------------------------------
*/
package org.miloss.fgsms.sla;
import java.io.StringWriter;
import java.sql.*;
import java.util.UUID;
import javax.xml.bind.JAXBContext;
import javax.xml.bind.Marshaller;
import javax.xml.datatype.DatatypeFactory;
import org.miloss.fgsms.common.DBSettingsLoader;
import org.miloss.fgsms.common.Utility;
import org.miloss.fgsms.services.interfaces.common.PolicyType;
import org.miloss.fgsms.services.interfaces.policyconfiguration.*;
import org.apache.log4j.Level;
import org.miloss.fgsms.common.Constants;
import org.miloss.fgsms.common.DBUtils;
import org.miloss.fgsms.common.Logger;
;
/**
* Provides helper functions for getting/setting the status of items that run
* outside of a web container Such as Qpid Py, Aux.Services Quartz jobs, etc
*
* @author AO most functions support pooled (JNDI) or non pooled connections via
* fgsms.Common
*/
public class AuxHelper {
private static Logger log = Logger.getLogger("fgsms.SLAProcessor");
public enum FLAGS {
=====================================================
== File: C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/NonTransactionalSLAProcessor.java
=====================================================
/**
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* If it is not possible or desirable to put the notice in a particular
* file, then You may include the notice in a location (such as a LICENSE
* file in a relevant directory) where a recipient would be likely to look
* for such a notice.
*
*/
/* ---------------------------------------------------------------------------
* U.S. Government, Department of the Army
* Army Materiel Command
* Research Development Engineering Command
* Communications Electronics Research Development and Engineering Center
* ---------------------------------------------------------------------------
*/
package org.miloss.fgsms.sla;
import java.net.URLEncoder;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.util.List;
import java.util.Properties;
import java.util.UUID;
import java.util.concurrent.atomic.AtomicReference;
import javax.mail.Message;
import javax.mail.Session;
import javax.mail.Transport;
import javax.mail.internet.InternetAddress;
import javax.mail.internet.MimeMessage;
import javax.xml.datatype.Duration;
import org.apache.log4j.Level;
import org.miloss.fgsms.common.Logger;;
import org.miloss.fgsms.common.Utility;
import org.miloss.fgsms.plugins.sla.AlertType;
import org.miloss.fgsms.plugins.sla.SLARuleInterface;
import org.miloss.fgsms.services.interfaces.common.PolicyType;
import org.miloss.fgsms.services.interfaces.policyconfiguration.*;
/**
* NonTransactionalSLAProcessor - handles most non transactional SLA
* rules for web services, processes, operating systems, status What
* is a Non Transactional SLA? Something that occurs over a range of time or
* grouping of records
=====================================================
== File: C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/package-info.java
=====================================================
/**
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* If it is not possible or desirable to put the notice in a particular
* file, then You may include the notice in a location (such as a LICENSE
* file in a relevant directory) where a recipient would be likely to look
* for such a notice.
*
*/
/* ---------------------------------------------------------------------------
* U.S. Government, Department of the Army
* Army Materiel Command
* Research Development Engineering Command
* Communications Electronics Research Development and Engineering Center
* ---------------------------------------------------------------------------
*/
/**
* This package is for processing Service Level Agreement Rules and Actions in fgsms. These rules and actions are processed in a number of different ways
* and in a number of different class loading contexts.
*/
package org.miloss.fgsms.sla;
=====================================================
== File: C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/PolicyExistsException.java
=====================================================
/**
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* If it is not possible or desirable to put the notice in a particular
* file, then You may include the notice in a location (such as a LICENSE
* file in a relevant directory) where a recipient would be likely to look
* for such a notice.
*
*/
/* ---------------------------------------------------------------------------
* U.S. Government, Department of the Army
* Army Materiel Command
* Research Development Engineering Command
* Communications Electronics Research Development and Engineering Center
* ---------------------------------------------------------------------------
*/
package org.miloss.fgsms.sla;
/**
* PolicyExistsException, typically thrown when attempting to insert a service
* policy into the database, when one already exists with the same URL
*
* @author AO
* @since 5.0
*/
public class PolicyExistsException extends Exception {
}
=====================================================
== File: C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/rules/ActionContainsIgnoreCase.java
=====================================================
/**
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* If it is not possible or desirable to put the notice in a particular
* file, then You may include the notice in a location (such as a LICENSE
* file in a relevant directory) where a recipient would be likely to look
* for such a notice.
*
*/
/* ---------------------------------------------------------------------------
* U.S. Government, Department of the Army
* Army Materiel Command
* Research Development Engineering Command
* Communications Electronics Research Development and Engineering Center
* ---------------------------------------------------------------------------
*/
package org.miloss.fgsms.sla.rules;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.atomic.AtomicReference;
import org.miloss.fgsms.common.Utility;
import org.miloss.fgsms.plugins.sla.AlertType;
import org.miloss.fgsms.plugins.sla.SLARuleInterface;
import org.miloss.fgsms.services.interfaces.common.MachinePerformanceData;
import org.miloss.fgsms.services.interfaces.common.NameValuePair;
import org.miloss.fgsms.services.interfaces.common.PolicyType;
import org.miloss.fgsms.services.interfaces.common.ProcessPerformanceData;
import org.miloss.fgsms.services.interfaces.datacollector.AddDataRequestMsg;
import org.miloss.fgsms.services.interfaces.datacollector.BrokerData;
import org.miloss.fgsms.services.interfaces.policyconfiguration.ServicePolicy;
import org.miloss.fgsms.services.interfaces.policyconfiguration.TransactionalWebServicePolicy;
import org.miloss.fgsms.services.interfaces.status.SetStatusRequestMsg;
/**
*
* @author AO
*/
public class ActionContainsIgnoreCase implements SLARuleInterface {
@Override
public boolean CheckTransactionalRule(SetStatusRequestMsg req, List<NameValuePair> params, AtomicReference<String> nullableFaultMsg) {
return false;
}
@Override
=====================================================
== File: C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/rules/ActionEqualsIgnoreCase.java
=====================================================
/**
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* If it is not possible or desirable to put the notice in a particular
* file, then You may include the notice in a location (such as a LICENSE
* file in a relevant directory) where a recipient would be likely to look
* for such a notice.
*
*/
/* ---------------------------------------------------------------------------
* U.S. Government, Department of the Army
* Army Materiel Command
* Research Development Engineering Command
* Communications Electronics Research Development and Engineering Center
* ---------------------------------------------------------------------------
*/
package org.miloss.fgsms.sla.rules;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.atomic.AtomicReference;
import org.miloss.fgsms.common.Utility;
import org.miloss.fgsms.plugins.sla.SLARuleInterface;
import org.miloss.fgsms.services.interfaces.common.MachinePerformanceData;
import org.miloss.fgsms.services.interfaces.common.NameValuePair;
import org.miloss.fgsms.services.interfaces.common.PolicyType;
import org.miloss.fgsms.services.interfaces.common.ProcessPerformanceData;
import org.miloss.fgsms.services.interfaces.dataaccessservice.AlertType;
import org.miloss.fgsms.services.interfaces.datacollector.AddDataRequestMsg;
import org.miloss.fgsms.services.interfaces.datacollector.BrokerData;
import org.miloss.fgsms.services.interfaces.policyconfiguration.ServicePolicy;
import org.miloss.fgsms.services.interfaces.policyconfiguration.TransactionalWebServicePolicy;
import org.miloss.fgsms.services.interfaces.status.SetStatusRequestMsg;
/**
*
* @author AO
*/
public class ActionEqualsIgnoreCase implements SLARuleInterface {
@Override
public boolean CheckTransactionalRule(SetStatusRequestMsg req, List<NameValuePair> params, AtomicReference<String> nullableFaultMsg) {
return false;
}
@Override
=====================================================
== File: C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/rules/AllFaults.java
=====================================================
/**
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* If it is not possible or desirable to put the notice in a particular
* file, then You may include the notice in a location (such as a LICENSE
* file in a relevant directory) where a recipient would be likely to look
* for such a notice.
*
*/
/* ---------------------------------------------------------------------------
* U.S. Government, Department of the Army
* Army Materiel Command
* Research Development Engineering Command
* Communications Electronics Research Development and Engineering Center
* ---------------------------------------------------------------------------
*/
package org.miloss.fgsms.sla.rules;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.atomic.AtomicReference;
import org.miloss.fgsms.common.Utility;
import org.miloss.fgsms.plugins.sla.SLARuleInterface;
import org.miloss.fgsms.services.interfaces.common.MachinePerformanceData;
import org.miloss.fgsms.services.interfaces.common.NameValuePair;
import org.miloss.fgsms.services.interfaces.common.PolicyType;
import org.miloss.fgsms.services.interfaces.common.ProcessPerformanceData;
import org.miloss.fgsms.services.interfaces.datacollector.AddDataRequestMsg;
import org.miloss.fgsms.services.interfaces.datacollector.BrokerData;
import org.miloss.fgsms.services.interfaces.policyconfiguration.ServicePolicy;
import org.miloss.fgsms.services.interfaces.policyconfiguration.TransactionalWebServicePolicy;
import org.miloss.fgsms.services.interfaces.status.SetStatusRequestMsg;
/**
*
* @author AO
*/
public class AllFaults implements SLARuleInterface {
@Override
public boolean CheckTransactionalRule(SetStatusRequestMsg req, List<NameValuePair> params, AtomicReference<String> nullableFaultMsg) {
return false;
}
@Override
public boolean CheckTransactionalRule(ProcessPerformanceData req, List<NameValuePair> params, AtomicReference<String> nullableFaultMsg) {
=====================================================
== File: C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/rules/AllSuccesses.java
=====================================================
/**
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* If it is not possible or desirable to put the notice in a particular
* file, then You may include the notice in a location (such as a LICENSE
* file in a relevant directory) where a recipient would be likely to look
* for such a notice.
*
*/
/* ---------------------------------------------------------------------------
* U.S. Government, Department of the Army
* Army Materiel Command
* Research Development Engineering Command
* Communications Electronics Research Development and Engineering Center
* ---------------------------------------------------------------------------
*/
package org.miloss.fgsms.sla.rules;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.atomic.AtomicReference;
import org.miloss.fgsms.common.Utility;
import org.miloss.fgsms.plugins.sla.SLARuleInterface;
import org.miloss.fgsms.services.interfaces.common.MachinePerformanceData;
import org.miloss.fgsms.services.interfaces.common.NameValuePair;
import org.miloss.fgsms.services.interfaces.common.PolicyType;
import org.miloss.fgsms.services.interfaces.common.ProcessPerformanceData;
import org.miloss.fgsms.services.interfaces.datacollector.AddDataRequestMsg;
import org.miloss.fgsms.services.interfaces.datacollector.BrokerData;
import org.miloss.fgsms.services.interfaces.policyconfiguration.ServicePolicy;
import org.miloss.fgsms.services.interfaces.policyconfiguration.TransactionalWebServicePolicy;
import org.miloss.fgsms.services.interfaces.status.SetStatusRequestMsg;
/**
*
* @author AO
*/
public class AllSuccesses implements SLARuleInterface {
@Override
public boolean CheckTransactionalRule(SetStatusRequestMsg req, List<NameValuePair> params, AtomicReference<String> nullableFaultMsg) {
return false;
}
@Override
public boolean CheckTransactionalRule(ProcessPerformanceData req, List<NameValuePair> params, AtomicReference<String> nullableFaultMsg) {
=====================================================
== File: C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/rules/BrokerQueueSizeGreaterThan.java
=====================================================
/**
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* If it is not possible or desirable to put the notice in a particular
* file, then You may include the notice in a location (such as a LICENSE
* file in a relevant directory) where a recipient would be likely to look
* for such a notice.
*
*/
/* ---------------------------------------------------------------------------
* U.S. Government, Department of the Army
* Army Materiel Command
* Research Development Engineering Command
* Communications Electronics Research Development and Engineering Center
* ---------------------------------------------------------------------------
*/
package org.miloss.fgsms.sla.rules;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.atomic.AtomicReference;
import org.miloss.fgsms.common.Utility;
import org.miloss.fgsms.plugins.sla.SLARuleInterface;
import org.miloss.fgsms.services.interfaces.common.MachinePerformanceData;
import org.miloss.fgsms.services.interfaces.common.NameValuePair;
import org.miloss.fgsms.services.interfaces.common.PolicyType;
import org.miloss.fgsms.services.interfaces.common.ProcessPerformanceData;
import org.miloss.fgsms.services.interfaces.datacollector.AddDataRequestMsg;
import org.miloss.fgsms.services.interfaces.datacollector.BrokerData;
import org.miloss.fgsms.services.interfaces.policyconfiguration.ServicePolicy;
import org.miloss.fgsms.services.interfaces.policyconfiguration.StatisticalServicePolicy;
import org.miloss.fgsms.services.interfaces.status.SetStatusRequestMsg;
/**
*
* @author AO
*/
public class BrokerQueueSizeGreaterThan implements SLARuleInterface {
@Override
public boolean CheckTransactionalRule(SetStatusRequestMsg req, List<NameValuePair> params, AtomicReference<String> nullableFaultMsg) {
return false;
}
@Override
public boolean CheckTransactionalRule(ProcessPerformanceData req, List<NameValuePair> params, AtomicReference<String> nullableFaultMsg) {
=====================================================
== File: C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/rules/ChangeInAvailabilityStatus.java
=====================================================
/**
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* If it is not possible or desirable to put the notice in a particular
* file, then You may include the notice in a location (such as a LICENSE
* file in a relevant directory) where a recipient would be likely to look
* for such a notice.
*
*/
/* ---------------------------------------------------------------------------
* U.S. Government, Department of the Army
* Army Materiel Command
* Research Development Engineering Command
* Communications Electronics Research Development and Engineering Center
* ---------------------------------------------------------------------------
*/
package org.miloss.fgsms.sla.rules;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.atomic.AtomicReference;
import org.miloss.fgsms.common.Utility;
import org.miloss.fgsms.plugins.sla.AlertType;
import org.miloss.fgsms.plugins.sla.SLARuleInterface;
import org.miloss.fgsms.services.interfaces.common.MachinePerformanceData;
import org.miloss.fgsms.services.interfaces.common.NameValuePair;
import org.miloss.fgsms.services.interfaces.common.PolicyType;
import org.miloss.fgsms.services.interfaces.common.ProcessPerformanceData;
import org.miloss.fgsms.services.interfaces.datacollector.AddDataRequestMsg;
import org.miloss.fgsms.services.interfaces.datacollector.BrokerData;
import org.miloss.fgsms.services.interfaces.policyconfiguration.ServicePolicy;
import org.miloss.fgsms.services.interfaces.status.SetStatusRequestMsg;
/**
*Note, this rule is triggered from other functions
* @author AO
*/
public class ChangeInAvailabilityStatus implements SLARuleInterface {
@Override
public boolean CheckTransactionalRule(SetStatusRequestMsg req, List<NameValuePair> params, AtomicReference<String> nullableFaultMsg) {
return false;
}
@Override
public boolean CheckTransactionalRule(ProcessPerformanceData req, List<NameValuePair> params, AtomicReference<String> nullableFaultMsg) {
=====================================================
== File: C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/rules/ConsumerContainsIgnoreCase.java
=====================================================
/**
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* If it is not possible or desirable to put the notice in a particular
* file, then You may include the notice in a location (such as a LICENSE
* file in a relevant directory) where a recipient would be likely to look
* for such a notice.
*
*/
/* ---------------------------------------------------------------------------
* U.S. Government, Department of the Army
* Army Materiel Command
* Research Development Engineering Command
* Communications Electronics Research Development and Engineering Center
* ---------------------------------------------------------------------------
*/
package org.miloss.fgsms.sla.rules;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.atomic.AtomicReference;
import org.miloss.fgsms.common.Utility;
import org.miloss.fgsms.plugins.sla.SLARuleInterface;
import org.miloss.fgsms.services.interfaces.common.MachinePerformanceData;
import org.miloss.fgsms.services.interfaces.common.NameValuePair;
import org.miloss.fgsms.services.interfaces.common.PolicyType;
import org.miloss.fgsms.services.interfaces.common.ProcessPerformanceData;
import org.miloss.fgsms.services.interfaces.datacollector.AddDataRequestMsg;
import org.miloss.fgsms.services.interfaces.datacollector.BrokerData;
import org.miloss.fgsms.services.interfaces.policyconfiguration.ServicePolicy;
import org.miloss.fgsms.services.interfaces.policyconfiguration.TransactionalWebServicePolicy;
import org.miloss.fgsms.services.interfaces.status.SetStatusRequestMsg;
/**
*
* @author AO
*/
public class ConsumerContainsIgnoreCase implements SLARuleInterface {
@Override
public boolean CheckTransactionalRule(SetStatusRequestMsg req, List<NameValuePair> params, AtomicReference<String> nullableFaultMsg) {
return false;
}
@Override
=====================================================
== File: C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/rules/ConsumerEqualsIgnoreCase.java
=====================================================
/**
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* If it is not possible or desirable to put the notice in a particular
* file, then You may include the notice in a location (such as a LICENSE
* file in a relevant directory) where a recipient would be likely to look
* for such a notice.
*
*/
/* ---------------------------------------------------------------------------
* U.S. Government, Department of the Army
* Army Materiel Command
* Research Development Engineering Command
* Communications Electronics Research Development and Engineering Center
* ---------------------------------------------------------------------------
*/
package org.miloss.fgsms.sla.rules;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.atomic.AtomicReference;
import org.miloss.fgsms.common.Utility;
import org.miloss.fgsms.plugins.sla.SLARuleInterface;
import org.miloss.fgsms.services.interfaces.common.MachinePerformanceData;
import org.miloss.fgsms.services.interfaces.common.NameValuePair;
import org.miloss.fgsms.services.interfaces.common.PolicyType;
import org.miloss.fgsms.services.interfaces.common.ProcessPerformanceData;
import org.miloss.fgsms.services.interfaces.datacollector.AddDataRequestMsg;
import org.miloss.fgsms.services.interfaces.datacollector.BrokerData;
import org.miloss.fgsms.services.interfaces.policyconfiguration.ServicePolicy;
import org.miloss.fgsms.services.interfaces.policyconfiguration.TransactionalWebServicePolicy;
import org.miloss.fgsms.services.interfaces.status.SetStatusRequestMsg;
/**
*
* @author AO
*/
public class ConsumerEqualsIgnoreCase implements SLARuleInterface {
@Override
public boolean CheckTransactionalRule(SetStatusRequestMsg req, List<NameValuePair> params, AtomicReference<String> nullableFaultMsg) {
return false;
}
@Override
public boolean CheckTransactionalRule(ProcessPerformanceData req, List<NameValuePair> params, AtomicReference<String> nullableFaultMsg) {
=====================================================
== File: C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/rules/FaultsOverTimeGreaterThan.java
=====================================================
/**
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* If it is not possible or desirable to put the notice in a particular
* file, then You may include the notice in a location (such as a LICENSE
* file in a relevant directory) where a recipient would be likely to look
* for such a notice.
*
*/
/* ---------------------------------------------------------------------------
* U.S. Government, Department of the Army
* Army Materiel Command
* Research Development Engineering Command
* Communications Electronics Research Development and Engineering Center
* ---------------------------------------------------------------------------
*/
package org.miloss.fgsms.sla.rules;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.atomic.AtomicReference;
import org.miloss.fgsms.common.Utility;
import org.miloss.fgsms.plugins.sla.SLARuleInterface;
import org.miloss.fgsms.services.interfaces.common.MachinePerformanceData;
import org.miloss.fgsms.services.interfaces.common.NameValuePair;
import org.miloss.fgsms.services.interfaces.common.PolicyType;
import org.miloss.fgsms.services.interfaces.common.ProcessPerformanceData;
import org.miloss.fgsms.services.interfaces.datacollector.AddDataRequestMsg;
import org.miloss.fgsms.services.interfaces.datacollector.BrokerData;
import org.miloss.fgsms.services.interfaces.policyconfiguration.ServicePolicy;
import org.miloss.fgsms.services.interfaces.policyconfiguration.TransactionalWebServicePolicy;
import org.miloss.fgsms.services.interfaces.status.SetStatusRequestMsg;
import org.miloss.fgsms.sla.NonTransactionalSLAProcessor;
/**
*
* @author AO
*/
public class FaultsOverTimeGreaterThan implements SLARuleInterface {
@Override
public boolean CheckTransactionalRule(SetStatusRequestMsg req, List<NameValuePair> params, AtomicReference<String> nullableFaultMsg) {
return false;
}
@Override
=====================================================
== File: C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/rules/FaultsOverTimeLessThan.java
=====================================================
/**
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* If it is not possible or desirable to put the notice in a particular
* file, then You may include the notice in a location (such as a LICENSE
* file in a relevant directory) where a recipient would be likely to look
* for such a notice.
*
*/
/* ---------------------------------------------------------------------------
* U.S. Government, Department of the Army
* Army Materiel Command
* Research Development Engineering Command
* Communications Electronics Research Development and Engineering Center
* ---------------------------------------------------------------------------
*/
package org.miloss.fgsms.sla.rules;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.atomic.AtomicReference;
import org.miloss.fgsms.common.Utility;
import org.miloss.fgsms.plugins.sla.SLARuleInterface;
import org.miloss.fgsms.services.interfaces.common.MachinePerformanceData;
import org.miloss.fgsms.services.interfaces.common.NameValuePair;
import org.miloss.fgsms.services.interfaces.common.PolicyType;
import org.miloss.fgsms.services.interfaces.common.ProcessPerformanceData;
import org.miloss.fgsms.services.interfaces.datacollector.AddDataRequestMsg;
import org.miloss.fgsms.services.interfaces.datacollector.BrokerData;
import org.miloss.fgsms.services.interfaces.policyconfiguration.ServicePolicy;
import org.miloss.fgsms.services.interfaces.policyconfiguration.TransactionalWebServicePolicy;
import org.miloss.fgsms.services.interfaces.status.SetStatusRequestMsg;
import org.miloss.fgsms.sla.NonTransactionalSLAProcessor;
/**
*
* @author AO
*/
public class FaultsOverTimeLessThan implements SLARuleInterface {
@Override
public boolean CheckTransactionalRule(SetStatusRequestMsg req, List<NameValuePair> params, AtomicReference<String> nullableFaultMsg) {
return false;
}
@Override
=====================================================
== File: C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/rules/HighCPUUsage.java
=====================================================
/**
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* If it is not possible or desirable to put the notice in a particular
* file, then You may include the notice in a location (such as a LICENSE
* file in a relevant directory) where a recipient would be likely to look
* for such a notice.
*
*/
/* ---------------------------------------------------------------------------
* U.S. Government, Department of the Army
* Army Materiel Command
* Research Development Engineering Command
* Communications Electronics Research Development and Engineering Center
* ---------------------------------------------------------------------------
*/
package org.miloss.fgsms.sla.rules;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.atomic.AtomicReference;
import org.miloss.fgsms.common.Utility;
import org.miloss.fgsms.plugins.sla.SLARuleInterface;
import org.miloss.fgsms.services.interfaces.common.MachinePerformanceData;
import org.miloss.fgsms.services.interfaces.common.NameValuePair;
import org.miloss.fgsms.services.interfaces.common.PolicyType;
import org.miloss.fgsms.services.interfaces.common.ProcessPerformanceData;
import org.miloss.fgsms.services.interfaces.datacollector.AddDataRequestMsg;
import org.miloss.fgsms.services.interfaces.datacollector.BrokerData;
import org.miloss.fgsms.services.interfaces.policyconfiguration.MachinePolicy;
import org.miloss.fgsms.services.interfaces.policyconfiguration.ProcessPolicy;
import org.miloss.fgsms.services.interfaces.policyconfiguration.ServicePolicy;
import org.miloss.fgsms.services.interfaces.status.SetStatusRequestMsg;
/**
*
* @author AO
*/
public class HighCPUUsage implements SLARuleInterface {
@Override
public boolean CheckTransactionalRule(SetStatusRequestMsg req, List<NameValuePair> params, AtomicReference<String> nullableFaultMsg) {
return false;
}
@Override
=====================================================
== File: C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/rules/HighCPUUsageOverTime.java
=====================================================
/**
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* If it is not possible or desirable to put the notice in a particular
* file, then You may include the notice in a location (such as a LICENSE
* file in a relevant directory) where a recipient would be likely to look
* for such a notice.
*
*/
/* ---------------------------------------------------------------------------
* U.S. Government, Department of the Army
* Army Materiel Command
* Research Development Engineering Command
* Communications Electronics Research Development and Engineering Center
* ---------------------------------------------------------------------------
*/
package org.miloss.fgsms.sla.rules;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.atomic.AtomicReference;
import org.miloss.fgsms.common.Utility;
import org.miloss.fgsms.plugins.sla.SLARuleInterface;
import org.miloss.fgsms.services.interfaces.common.MachinePerformanceData;
import org.miloss.fgsms.services.interfaces.common.NameValuePair;
import org.miloss.fgsms.services.interfaces.common.PolicyType;
import org.miloss.fgsms.services.interfaces.common.ProcessPerformanceData;
import org.miloss.fgsms.services.interfaces.datacollector.AddDataRequestMsg;
import org.miloss.fgsms.services.interfaces.datacollector.BrokerData;
import org.miloss.fgsms.services.interfaces.policyconfiguration.MachinePolicy;
import org.miloss.fgsms.services.interfaces.policyconfiguration.ProcessPolicy;
import org.miloss.fgsms.services.interfaces.policyconfiguration.ServicePolicy;
import org.miloss.fgsms.services.interfaces.status.SetStatusRequestMsg;
import org.miloss.fgsms.sla.NonTransactionalSLAProcessor;
/**
*
* @author AO
*/
public class HighCPUUsageOverTime implements SLARuleInterface {
@Override
public boolean CheckTransactionalRule(SetStatusRequestMsg req, List<NameValuePair> params, AtomicReference<String> nullableFaultMsg) {
return false;
}
=====================================================
== File: C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/rules/HighDiskUsageOverTime.java
=====================================================
/**
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* If it is not possible or desirable to put the notice in a particular
* file, then You may include the notice in a location (such as a LICENSE
* file in a relevant directory) where a recipient would be likely to look
* for such a notice.
*
*/
/* ---------------------------------------------------------------------------
* U.S. Government, Department of the Army
* Army Materiel Command
* Research Development Engineering Command
* Communications Electronics Research Development and Engineering Center
* ---------------------------------------------------------------------------
*/
package org.miloss.fgsms.sla.rules;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.atomic.AtomicReference;
import org.miloss.fgsms.common.Utility;
import org.miloss.fgsms.plugins.sla.SLARuleInterface;
import org.miloss.fgsms.services.interfaces.common.MachinePerformanceData;
import org.miloss.fgsms.services.interfaces.common.NameValuePair;
import org.miloss.fgsms.services.interfaces.common.PolicyType;
import org.miloss.fgsms.services.interfaces.common.ProcessPerformanceData;
import org.miloss.fgsms.services.interfaces.datacollector.AddDataRequestMsg;
import org.miloss.fgsms.services.interfaces.datacollector.BrokerData;
import org.miloss.fgsms.services.interfaces.policyconfiguration.MachinePolicy;
import org.miloss.fgsms.services.interfaces.policyconfiguration.ServicePolicy;
import org.miloss.fgsms.services.interfaces.status.SetStatusRequestMsg;
import org.miloss.fgsms.sla.NonTransactionalSLAProcessor;
/**
*
* @author AO
*/
public class HighDiskUsageOverTime implements SLARuleInterface {
@Override
public boolean CheckTransactionalRule(SetStatusRequestMsg req, List<NameValuePair> params, AtomicReference<String> nullableFaultMsg) {
return false;
}
=====================================================
== File: C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/rules/HighMemoryUsage.java
=====================================================
/**
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* If it is not possible or desirable to put the notice in a particular
* file, then You may include the notice in a location (such as a LICENSE
* file in a relevant directory) where a recipient would be likely to look
* for such a notice.
*
*/
/* ---------------------------------------------------------------------------
* U.S. Government, Department of the Army
* Army Materiel Command
* Research Development Engineering Command
* Communications Electronics Research Development and Engineering Center
* ---------------------------------------------------------------------------
*/
package org.miloss.fgsms.sla.rules;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.atomic.AtomicReference;
import org.miloss.fgsms.common.Utility;
import org.miloss.fgsms.plugins.sla.SLARuleInterface;
import org.miloss.fgsms.services.interfaces.common.MachinePerformanceData;
import org.miloss.fgsms.services.interfaces.common.NameValuePair;
import org.miloss.fgsms.services.interfaces.common.PolicyType;
import org.miloss.fgsms.services.interfaces.common.ProcessPerformanceData;
import org.miloss.fgsms.services.interfaces.datacollector.AddDataRequestMsg;
import org.miloss.fgsms.services.interfaces.datacollector.BrokerData;
import org.miloss.fgsms.services.interfaces.policyconfiguration.MachinePolicy;
import org.miloss.fgsms.services.interfaces.policyconfiguration.ProcessPolicy;
import org.miloss.fgsms.services.interfaces.policyconfiguration.ServicePolicy;
import org.miloss.fgsms.services.interfaces.status.SetStatusRequestMsg;
/**
*
* @author AO
*/
public class HighMemoryUsage implements SLARuleInterface {
@Override
public boolean CheckTransactionalRule(SetStatusRequestMsg req, List<NameValuePair> params, AtomicReference<String> nullableFaultMsg) {
return false;
}
=====================================================
== File: C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/rules/HighMemoryUsageOverTime.java
=====================================================
/**
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* If it is not possible or desirable to put the notice in a particular
* file, then You may include the notice in a location (such as a LICENSE
* file in a relevant directory) where a recipient would be likely to look
* for such a notice.
*
*/
/* ---------------------------------------------------------------------------
* U.S. Government, Department of the Army
* Army Materiel Command
* Research Development Engineering Command
* Communications Electronics Research Development and Engineering Center
* ---------------------------------------------------------------------------
*/
package org.miloss.fgsms.sla.rules;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.atomic.AtomicReference;
import org.miloss.fgsms.common.Utility;
import org.miloss.fgsms.plugins.sla.SLARuleInterface;
import org.miloss.fgsms.services.interfaces.common.MachinePerformanceData;
import org.miloss.fgsms.services.interfaces.common.NameValuePair;
import org.miloss.fgsms.services.interfaces.common.PolicyType;
import org.miloss.fgsms.services.interfaces.common.ProcessPerformanceData;
import org.miloss.fgsms.services.interfaces.datacollector.AddDataRequestMsg;
import org.miloss.fgsms.services.interfaces.datacollector.BrokerData;
import org.miloss.fgsms.services.interfaces.policyconfiguration.MachinePolicy;
import org.miloss.fgsms.services.interfaces.policyconfiguration.ProcessPolicy;
import org.miloss.fgsms.services.interfaces.policyconfiguration.ServicePolicy;
import org.miloss.fgsms.services.interfaces.status.SetStatusRequestMsg;
import org.miloss.fgsms.sla.NonTransactionalSLAProcessor;
/**
*
* @author AO
*/
public class HighMemoryUsageOverTime implements SLARuleInterface {
@Override
public boolean CheckTransactionalRule(SetStatusRequestMsg req, List<NameValuePair> params, AtomicReference<String> nullableFaultMsg) {
return false;
}
=====================================================
== File: C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/rules/HighNetworkUsageOverTime.java
=====================================================
/**
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* If it is not possible or desirable to put the notice in a particular
* file, then You may include the notice in a location (such as a LICENSE
* file in a relevant directory) where a recipient would be likely to look
* for such a notice.
*
*/
/* ---------------------------------------------------------------------------
* U.S. Government, Department of the Army
* Army Materiel Command
* Research Development Engineering Command
* Communications Electronics Research Development and Engineering Center
* ---------------------------------------------------------------------------
*/
package org.miloss.fgsms.sla.rules;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.atomic.AtomicReference;
import org.miloss.fgsms.common.Utility;
import org.miloss.fgsms.plugins.sla.SLARuleInterface;
import org.miloss.fgsms.services.interfaces.common.MachinePerformanceData;
import org.miloss.fgsms.services.interfaces.common.NameValuePair;
import org.miloss.fgsms.services.interfaces.common.PolicyType;
import org.miloss.fgsms.services.interfaces.common.ProcessPerformanceData;
import org.miloss.fgsms.services.interfaces.datacollector.AddDataRequestMsg;
import org.miloss.fgsms.services.interfaces.datacollector.BrokerData;
import org.miloss.fgsms.services.interfaces.policyconfiguration.MachinePolicy;
import org.miloss.fgsms.services.interfaces.policyconfiguration.ServicePolicy;
import org.miloss.fgsms.services.interfaces.status.SetStatusRequestMsg;
import org.miloss.fgsms.sla.NonTransactionalSLAProcessor;
/**
*
* @author AO
*/
public class HighNetworkUsageOverTime implements SLARuleInterface {
@Override
public boolean CheckTransactionalRule(SetStatusRequestMsg req, List<NameValuePair> params, AtomicReference<String> nullableFaultMsg) {
return false;
}
@Override
=====================================================
== File: C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/rules/HighOpenFileHandles.java
=====================================================
/**
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* If it is not possible or desirable to put the notice in a particular
* file, then You may include the notice in a location (such as a LICENSE
* file in a relevant directory) where a recipient would be likely to look
* for such a notice.
*
*/
/* ---------------------------------------------------------------------------
* U.S. Government, Department of the Army
* Army Materiel Command
* Research Development Engineering Command
* Communications Electronics Research Development and Engineering Center
* ---------------------------------------------------------------------------
*/
package org.miloss.fgsms.sla.rules;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.atomic.AtomicReference;
import org.miloss.fgsms.common.Utility;
import org.miloss.fgsms.plugins.sla.AlertType;
import org.miloss.fgsms.plugins.sla.SLARuleInterface;
import org.miloss.fgsms.services.interfaces.common.MachinePerformanceData;
import org.miloss.fgsms.services.interfaces.common.NameValuePair;
import org.miloss.fgsms.services.interfaces.common.PolicyType;
import org.miloss.fgsms.services.interfaces.common.ProcessPerformanceData;
import org.miloss.fgsms.services.interfaces.datacollector.AddDataRequestMsg;
import org.miloss.fgsms.services.interfaces.datacollector.BrokerData;
import org.miloss.fgsms.services.interfaces.policyconfiguration.MachinePolicy;
import org.miloss.fgsms.services.interfaces.policyconfiguration.ProcessPolicy;
import org.miloss.fgsms.services.interfaces.policyconfiguration.ServicePolicy;
import org.miloss.fgsms.services.interfaces.status.SetStatusRequestMsg;
/**
*
* @author AO
*/
public class HighOpenFileHandles implements SLARuleInterface {
@Override
public boolean CheckTransactionalRule(SetStatusRequestMsg req, List<NameValuePair> params, AtomicReference<String> nullableFaultMsg) {
return false;
}
=====================================================
== File: C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/rules/HighThreadCount.java
=====================================================
/**
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* If it is not possible or desirable to put the notice in a particular
* file, then You may include the notice in a location (such as a LICENSE
* file in a relevant directory) where a recipient would be likely to look
* for such a notice.
*
*/
/* ---------------------------------------------------------------------------
* U.S. Government, Department of the Army
* Army Materiel Command
* Research Development Engineering Command
* Communications Electronics Research Development and Engineering Center
* ---------------------------------------------------------------------------
*/
package org.miloss.fgsms.sla.rules;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.atomic.AtomicReference;
import org.miloss.fgsms.common.Utility;
import org.miloss.fgsms.plugins.sla.AlertType;
import org.miloss.fgsms.plugins.sla.SLARuleInterface;
import org.miloss.fgsms.services.interfaces.common.MachinePerformanceData;
import org.miloss.fgsms.services.interfaces.common.NameValuePair;
import org.miloss.fgsms.services.interfaces.common.PolicyType;
import org.miloss.fgsms.services.interfaces.common.ProcessPerformanceData;
import org.miloss.fgsms.services.interfaces.datacollector.AddDataRequestMsg;
import org.miloss.fgsms.services.interfaces.datacollector.BrokerData;
import org.miloss.fgsms.services.interfaces.policyconfiguration.MachinePolicy;
import org.miloss.fgsms.services.interfaces.policyconfiguration.ProcessPolicy;
import org.miloss.fgsms.services.interfaces.policyconfiguration.ServicePolicy;
import org.miloss.fgsms.services.interfaces.status.SetStatusRequestMsg;
/**
*
* @author AO
*/
public class HighThreadCount implements SLARuleInterface {
@Override
public boolean CheckTransactionalRule(SetStatusRequestMsg req, List<NameValuePair> params, AtomicReference<String> nullableFaultMsg) {
return false;
}
=====================================================
== File: C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/rules/InvocationsOverTimeGreatThan.java
=====================================================
/**
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* If it is not possible or desirable to put the notice in a particular
* file, then You may include the notice in a location (such as a LICENSE
* file in a relevant directory) where a recipient would be likely to look
* for such a notice.
*
*/
/* ---------------------------------------------------------------------------
* U.S. Government, Department of the Army
* Army Materiel Command
* Research Development Engineering Command
* Communications Electronics Research Development and Engineering Center
* ---------------------------------------------------------------------------
*/
package org.miloss.fgsms.sla.rules;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.atomic.AtomicReference;
import org.miloss.fgsms.common.Utility;
import org.miloss.fgsms.plugins.sla.AlertType;
import org.miloss.fgsms.plugins.sla.SLARuleInterface;
import org.miloss.fgsms.services.interfaces.common.MachinePerformanceData;
import org.miloss.fgsms.services.interfaces.common.NameValuePair;
import org.miloss.fgsms.services.interfaces.common.PolicyType;
import org.miloss.fgsms.services.interfaces.common.ProcessPerformanceData;
import org.miloss.fgsms.services.interfaces.datacollector.AddDataRequestMsg;
import org.miloss.fgsms.services.interfaces.datacollector.BrokerData;
import org.miloss.fgsms.services.interfaces.policyconfiguration.ServicePolicy;
import org.miloss.fgsms.services.interfaces.policyconfiguration.TransactionalWebServicePolicy;
import org.miloss.fgsms.services.interfaces.status.SetStatusRequestMsg;
import org.miloss.fgsms.sla.NonTransactionalSLAProcessor;
/**
*
* @author AO
*/
public class InvocationsOverTimeGreatThan implements SLARuleInterface {
@Override
public boolean CheckTransactionalRule(SetStatusRequestMsg req, List<NameValuePair> params, AtomicReference<String> nullableFaultMsg) {
return false;
}
=====================================================
== File: C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/rules/InvocationsOverTimeLessThan.java
=====================================================
/**
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* If it is not possible or desirable to put the notice in a particular
* file, then You may include the notice in a location (such as a LICENSE
* file in a relevant directory) where a recipient would be likely to look
* for such a notice.
*
*/
/* ---------------------------------------------------------------------------
* U.S. Government, Department of the Army
* Army Materiel Command
* Research Development Engineering Command
* Communications Electronics Research Development and Engineering Center
* ---------------------------------------------------------------------------
*/
package org.miloss.fgsms.sla.rules;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.atomic.AtomicReference;
import org.miloss.fgsms.common.Utility;
import org.miloss.fgsms.plugins.sla.AlertType;
import org.miloss.fgsms.plugins.sla.SLARuleInterface;
import org.miloss.fgsms.services.interfaces.common.MachinePerformanceData;
import org.miloss.fgsms.services.interfaces.common.NameValuePair;
import org.miloss.fgsms.services.interfaces.common.PolicyType;
import org.miloss.fgsms.services.interfaces.common.ProcessPerformanceData;
import org.miloss.fgsms.services.interfaces.datacollector.AddDataRequestMsg;
import org.miloss.fgsms.services.interfaces.datacollector.BrokerData;
import org.miloss.fgsms.services.interfaces.policyconfiguration.ServicePolicy;
import org.miloss.fgsms.services.interfaces.policyconfiguration.TransactionalWebServicePolicy;
import org.miloss.fgsms.services.interfaces.status.SetStatusRequestMsg;
import org.miloss.fgsms.sla.NonTransactionalSLAProcessor;
/**
*
* @author AO
*/
public class InvocationsOverTimeLessThan implements SLARuleInterface {
@Override
public boolean CheckTransactionalRule(SetStatusRequestMsg req, List<NameValuePair> params, AtomicReference<String> nullableFaultMsg) {
return false;
}
=====================================================
== File: C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/rules/LowDiskSpace.java
=====================================================
/**
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* If it is not possible or desirable to put the notice in a particular
* file, then You may include the notice in a location (such as a LICENSE
* file in a relevant directory) where a recipient would be likely to look
* for such a notice.
*
*/
/* ---------------------------------------------------------------------------
* U.S. Government, Department of the Army
* Army Materiel Command
* Research Development Engineering Command
* Communications Electronics Research Development and Engineering Center
* ---------------------------------------------------------------------------
*/
package org.miloss.fgsms.sla.rules;
import java.io.ByteArrayInputStream;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.util.ArrayList;
import java.util.GregorianCalendar;
import java.util.List;
import java.util.concurrent.atomic.AtomicReference;
import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBElement;
import javax.xml.bind.Unmarshaller;
import javax.xml.datatype.DatatypeFactory;
import javax.xml.stream.XMLInputFactory;
import javax.xml.stream.XMLStreamReader;
import org.apache.log4j.Level;
import org.miloss.fgsms.common.Logger;;
import org.miloss.fgsms.common.Utility;
import org.miloss.fgsms.plugins.sla.AlertType;
import org.miloss.fgsms.plugins.sla.SLARuleInterface;
import org.miloss.fgsms.services.interfaces.common.MachinePerformanceData;
import org.miloss.fgsms.services.interfaces.common.NameValuePair;
import org.miloss.fgsms.services.interfaces.common.PolicyType;
import org.miloss.fgsms.services.interfaces.common.ProcessPerformanceData;
import org.miloss.fgsms.services.interfaces.datacollector.AddDataRequestMsg;
import org.miloss.fgsms.services.interfaces.datacollector.BrokerData;
import org.miloss.fgsms.services.interfaces.policyconfiguration.GetProcessesListByMachineResponseMsg;
import org.miloss.fgsms.services.interfaces.policyconfiguration.MachinePolicy;
import org.miloss.fgsms.services.interfaces.policyconfiguration.ServicePolicy;
=====================================================
== File: C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/rules/MeanTimeBetweenFailureGreatThan.java
=====================================================
/**
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* If it is not possible or desirable to put the notice in a particular
* file, then You may include the notice in a location (such as a LICENSE
* file in a relevant directory) where a recipient would be likely to look
* for such a notice.
*
*/
/* ---------------------------------------------------------------------------
* U.S. Government, Department of the Army
* Army Materiel Command
* Research Development Engineering Command
* Communications Electronics Research Development and Engineering Center
* ---------------------------------------------------------------------------
*/
package org.miloss.fgsms.sla.rules;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.atomic.AtomicReference;
import org.miloss.fgsms.common.Utility;
import org.miloss.fgsms.plugins.sla.AlertType;
import org.miloss.fgsms.plugins.sla.SLARuleInterface;
import org.miloss.fgsms.services.interfaces.common.MachinePerformanceData;
import org.miloss.fgsms.services.interfaces.common.NameValuePair;
import org.miloss.fgsms.services.interfaces.common.PolicyType;
import org.miloss.fgsms.services.interfaces.common.ProcessPerformanceData;
import org.miloss.fgsms.services.interfaces.datacollector.AddDataRequestMsg;
import org.miloss.fgsms.services.interfaces.datacollector.BrokerData;
import org.miloss.fgsms.services.interfaces.policyconfiguration.ServicePolicy;
import org.miloss.fgsms.services.interfaces.policyconfiguration.TransactionalWebServicePolicy;
import org.miloss.fgsms.services.interfaces.status.SetStatusRequestMsg;
import org.miloss.fgsms.sla.NonTransactionalSLAProcessor;
/**
*
* @author AO
*/
public class MeanTimeBetweenFailureGreatThan implements SLARuleInterface {
@Override
public boolean CheckTransactionalRule(SetStatusRequestMsg req, List<NameValuePair> params, AtomicReference<String> nullableFaultMsg) {
return false;
}
=====================================================
== File: C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/rules/MeanTimeBetweenFailureLessThan.java
=====================================================
/**
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* If it is not possible or desirable to put the notice in a particular
* file, then You may include the notice in a location (such as a LICENSE
* file in a relevant directory) where a recipient would be likely to look
* for such a notice.
*
*/
/* ---------------------------------------------------------------------------
* U.S. Government, Department of the Army
* Army Materiel Command
* Research Development Engineering Command
* Communications Electronics Research Development and Engineering Center
* ---------------------------------------------------------------------------
*/
package org.miloss.fgsms.sla.rules;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.atomic.AtomicReference;
import org.miloss.fgsms.common.Utility;
import org.miloss.fgsms.plugins.sla.AlertType;
import org.miloss.fgsms.plugins.sla.SLARuleInterface;
import org.miloss.fgsms.services.interfaces.common.MachinePerformanceData;
import org.miloss.fgsms.services.interfaces.common.NameValuePair;
import org.miloss.fgsms.services.interfaces.common.PolicyType;
import org.miloss.fgsms.services.interfaces.common.ProcessPerformanceData;
import org.miloss.fgsms.services.interfaces.datacollector.AddDataRequestMsg;
import org.miloss.fgsms.services.interfaces.datacollector.BrokerData;
import org.miloss.fgsms.services.interfaces.policyconfiguration.ServicePolicy;
import org.miloss.fgsms.services.interfaces.policyconfiguration.TransactionalWebServicePolicy;
import org.miloss.fgsms.services.interfaces.status.SetStatusRequestMsg;
import org.miloss.fgsms.sla.NonTransactionalSLAProcessor;
/**
*
* @author AO
*/
public class MeanTimeBetweenFailureLessThan implements SLARuleInterface {
@Override
public boolean CheckTransactionalRule(SetStatusRequestMsg req, List<NameValuePair> params, AtomicReference<String> nullableFaultMsg) {
return false;
}
=====================================================
== File: C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/rules/QueueOrTopicDoesNotExist.java
=====================================================
/**
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* If it is not possible or desirable to put the notice in a particular
* file, then You may include the notice in a location (such as a LICENSE
* file in a relevant directory) where a recipient would be likely to look
* for such a notice.
*
*/
/* ---------------------------------------------------------------------------
* U.S. Government, Department of the Army
* Army Materiel Command
* Research Development Engineering Command
* Communications Electronics Research Development and Engineering Center
* ---------------------------------------------------------------------------
*/
package org.miloss.fgsms.sla.rules;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.atomic.AtomicReference;
import org.miloss.fgsms.common.Utility;
import org.miloss.fgsms.plugins.sla.AlertType;
import org.miloss.fgsms.plugins.sla.SLARuleInterface;
import org.miloss.fgsms.services.interfaces.common.MachinePerformanceData;
import org.miloss.fgsms.services.interfaces.common.NameValuePair;
import org.miloss.fgsms.services.interfaces.common.PolicyType;
import org.miloss.fgsms.services.interfaces.common.ProcessPerformanceData;
import org.miloss.fgsms.services.interfaces.datacollector.AddDataRequestMsg;
import org.miloss.fgsms.services.interfaces.datacollector.BrokerData;
import org.miloss.fgsms.services.interfaces.policyconfiguration.ServicePolicy;
import org.miloss.fgsms.services.interfaces.policyconfiguration.StatisticalServicePolicy;
import org.miloss.fgsms.services.interfaces.policyconfiguration.TransactionalWebServicePolicy;
import org.miloss.fgsms.services.interfaces.status.SetStatusRequestMsg;
/**
*
* @author AO
*/
public class QueueOrTopicDoesNotExist implements SLARuleInterface {
@Override
public boolean CheckTransactionalRule(SetStatusRequestMsg req, List<NameValuePair> params, AtomicReference<String> nullableFaultMsg) {
return false;
}
=====================================================
== File: C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/rules/RequestContentContainsIgnoreCase.java
=====================================================
/**
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* If it is not possible or desirable to put the notice in a particular
* file, then You may include the notice in a location (such as a LICENSE
* file in a relevant directory) where a recipient would be likely to look
* for such a notice.
*
*/
/* ---------------------------------------------------------------------------
* U.S. Government, Department of the Army
* Army Materiel Command
* Research Development Engineering Command
* Communications Electronics Research Development and Engineering Center
* ---------------------------------------------------------------------------
*/
package org.miloss.fgsms.sla.rules;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.atomic.AtomicReference;
import org.miloss.fgsms.common.Utility;
import org.miloss.fgsms.plugins.sla.AlertType;
import org.miloss.fgsms.plugins.sla.SLARuleInterface;
import org.miloss.fgsms.services.interfaces.common.MachinePerformanceData;
import org.miloss.fgsms.services.interfaces.common.NameValuePair;
import org.miloss.fgsms.services.interfaces.common.PolicyType;
import org.miloss.fgsms.services.interfaces.common.ProcessPerformanceData;
import org.miloss.fgsms.services.interfaces.datacollector.AddDataRequestMsg;
import org.miloss.fgsms.services.interfaces.datacollector.BrokerData;
import org.miloss.fgsms.services.interfaces.policyconfiguration.ServicePolicy;
import org.miloss.fgsms.services.interfaces.policyconfiguration.TransactionalWebServicePolicy;
import org.miloss.fgsms.services.interfaces.status.SetStatusRequestMsg;
/**
*
* @author AO
*/
public class RequestContentContainsIgnoreCase implements SLARuleInterface {
@Override
public boolean CheckTransactionalRule(SetStatusRequestMsg req, List<NameValuePair> params, AtomicReference<String> nullableFaultMsg) {
return false;
}
=====================================================
== File: C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/rules/RequestMessageSizeGreaterThan.java
=====================================================
/**
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* If it is not possible or desirable to put the notice in a particular
* file, then You may include the notice in a location (such as a LICENSE
* file in a relevant directory) where a recipient would be likely to look
* for such a notice.
*
*/
/* ---------------------------------------------------------------------------
* U.S. Government, Department of the Army
* Army Materiel Command
* Research Development Engineering Command
* Communications Electronics Research Development and Engineering Center
* ---------------------------------------------------------------------------
*/
package org.miloss.fgsms.sla.rules;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.atomic.AtomicReference;
import org.miloss.fgsms.common.Utility;
import org.miloss.fgsms.plugins.sla.AlertType;
import org.miloss.fgsms.plugins.sla.SLARuleInterface;
import org.miloss.fgsms.services.interfaces.common.MachinePerformanceData;
import org.miloss.fgsms.services.interfaces.common.NameValuePair;
import org.miloss.fgsms.services.interfaces.common.PolicyType;
import org.miloss.fgsms.services.interfaces.common.ProcessPerformanceData;
import org.miloss.fgsms.services.interfaces.datacollector.AddDataRequestMsg;
import org.miloss.fgsms.services.interfaces.datacollector.BrokerData;
import org.miloss.fgsms.services.interfaces.policyconfiguration.ServicePolicy;
import org.miloss.fgsms.services.interfaces.policyconfiguration.TransactionalWebServicePolicy;
import org.miloss.fgsms.services.interfaces.status.SetStatusRequestMsg;
/**
*
* @author AO
*/
public class RequestMessageSizeGreaterThan implements SLARuleInterface {
@Override
public boolean CheckTransactionalRule(SetStatusRequestMsg req, List<NameValuePair> params, AtomicReference<String> nullableFaultMsg) {
return false;
}
=====================================================
== File: C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/rules/RequestMessageSizeLessThan.java
=====================================================
/**
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* If it is not possible or desirable to put the notice in a particular
* file, then You may include the notice in a location (such as a LICENSE
* file in a relevant directory) where a recipient would be likely to look
* for such a notice.
*
*/
/* ---------------------------------------------------------------------------
* U.S. Government, Department of the Army
* Army Materiel Command
* Research Development Engineering Command
* Communications Electronics Research Development and Engineering Center
* ---------------------------------------------------------------------------
*/
package org.miloss.fgsms.sla.rules;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.atomic.AtomicReference;
import org.miloss.fgsms.common.Utility;
import org.miloss.fgsms.plugins.sla.AlertType;
import org.miloss.fgsms.plugins.sla.SLARuleInterface;
import org.miloss.fgsms.services.interfaces.common.MachinePerformanceData;
import org.miloss.fgsms.services.interfaces.common.NameValuePair;
import org.miloss.fgsms.services.interfaces.common.PolicyType;
import org.miloss.fgsms.services.interfaces.common.ProcessPerformanceData;
import org.miloss.fgsms.services.interfaces.datacollector.AddDataRequestMsg;
import org.miloss.fgsms.services.interfaces.datacollector.BrokerData;
import org.miloss.fgsms.services.interfaces.policyconfiguration.ServicePolicy;
import org.miloss.fgsms.services.interfaces.policyconfiguration.TransactionalWebServicePolicy;
import org.miloss.fgsms.services.interfaces.status.SetStatusRequestMsg;
/**
*
* @author AO
*/
public class RequestMessageSizeLessThan implements SLARuleInterface {
@Override
public boolean CheckTransactionalRule(SetStatusRequestMsg req, List<NameValuePair> params, AtomicReference<String> nullableFaultMsg) {
return false;
}
=====================================================
== File: C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/rules/ResponseContentContainsIgnoreCase.java
=====================================================
/**
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* If it is not possible or desirable to put the notice in a particular
* file, then You may include the notice in a location (such as a LICENSE
* file in a relevant directory) where a recipient would be likely to look
* for such a notice.
*
*/
/* ---------------------------------------------------------------------------
* U.S. Government, Department of the Army
* Army Materiel Command
* Research Development Engineering Command
* Communications Electronics Research Development and Engineering Center
* ---------------------------------------------------------------------------
*/
package org.miloss.fgsms.sla.rules;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.atomic.AtomicReference;
import org.miloss.fgsms.common.Utility;
import org.miloss.fgsms.plugins.sla.AlertType;
import org.miloss.fgsms.plugins.sla.SLARuleInterface;
import org.miloss.fgsms.services.interfaces.common.MachinePerformanceData;
import org.miloss.fgsms.services.interfaces.common.NameValuePair;
import org.miloss.fgsms.services.interfaces.common.PolicyType;
import org.miloss.fgsms.services.interfaces.common.ProcessPerformanceData;
import org.miloss.fgsms.services.interfaces.datacollector.AddDataRequestMsg;
import org.miloss.fgsms.services.interfaces.datacollector.BrokerData;
import org.miloss.fgsms.services.interfaces.policyconfiguration.ServicePolicy;
import org.miloss.fgsms.services.interfaces.policyconfiguration.TransactionalWebServicePolicy;
import org.miloss.fgsms.services.interfaces.status.SetStatusRequestMsg;
/**
*
* @author AO
*/
public class ResponseContentContainsIgnoreCase implements SLARuleInterface {
@Override
public boolean CheckTransactionalRule(SetStatusRequestMsg req, List<NameValuePair> params, AtomicReference<String> nullableFaultMsg) {
return false;
}
=====================================================
== File: C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/rules/ResponseMessageSizeGreaterThan.java
=====================================================
/**
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* If it is not possible or desirable to put the notice in a particular
* file, then You may include the notice in a location (such as a LICENSE
* file in a relevant directory) where a recipient would be likely to look
* for such a notice.
*
*/
/* ---------------------------------------------------------------------------
* U.S. Government, Department of the Army
* Army Materiel Command
* Research Development Engineering Command
* Communications Electronics Research Development and Engineering Center
* ---------------------------------------------------------------------------
*/
package org.miloss.fgsms.sla.rules;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.atomic.AtomicReference;
import org.miloss.fgsms.common.Utility;
import org.miloss.fgsms.plugins.sla.AlertType;
import org.miloss.fgsms.plugins.sla.SLARuleInterface;
import org.miloss.fgsms.services.interfaces.common.MachinePerformanceData;
import org.miloss.fgsms.services.interfaces.common.NameValuePair;
import org.miloss.fgsms.services.interfaces.common.PolicyType;
import org.miloss.fgsms.services.interfaces.common.ProcessPerformanceData;
import org.miloss.fgsms.services.interfaces.datacollector.AddDataRequestMsg;
import org.miloss.fgsms.services.interfaces.datacollector.BrokerData;
import org.miloss.fgsms.services.interfaces.policyconfiguration.ServicePolicy;
import org.miloss.fgsms.services.interfaces.policyconfiguration.TransactionalWebServicePolicy;
import org.miloss.fgsms.services.interfaces.status.SetStatusRequestMsg;
/**
*
* @author AO
*/
public class ResponseMessageSizeGreaterThan implements SLARuleInterface {
@Override
public boolean CheckTransactionalRule(SetStatusRequestMsg req, List<NameValuePair> params, AtomicReference<String> nullableFaultMsg) {
return false;
}
=====================================================
== File: C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/rules/ResponseMessageSizeLessThan.java
=====================================================
/**
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* If it is not possible or desirable to put the notice in a particular
* file, then You may include the notice in a location (such as a LICENSE
* file in a relevant directory) where a recipient would be likely to look
* for such a notice.
*
*/
/* ---------------------------------------------------------------------------
* U.S. Government, Department of the Army
* Army Materiel Command
* Research Development Engineering Command
* Communications Electronics Research Development and Engineering Center
* ---------------------------------------------------------------------------
*/
package org.miloss.fgsms.sla.rules;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.atomic.AtomicReference;
import org.miloss.fgsms.common.Utility;
import org.miloss.fgsms.plugins.sla.AlertType;
import org.miloss.fgsms.plugins.sla.SLARuleInterface;
import org.miloss.fgsms.services.interfaces.common.MachinePerformanceData;
import org.miloss.fgsms.services.interfaces.common.NameValuePair;
import org.miloss.fgsms.services.interfaces.common.PolicyType;
import org.miloss.fgsms.services.interfaces.common.ProcessPerformanceData;
import org.miloss.fgsms.services.interfaces.datacollector.AddDataRequestMsg;
import org.miloss.fgsms.services.interfaces.datacollector.BrokerData;
import org.miloss.fgsms.services.interfaces.policyconfiguration.ServicePolicy;
import org.miloss.fgsms.services.interfaces.policyconfiguration.TransactionalWebServicePolicy;
import org.miloss.fgsms.services.interfaces.status.SetStatusRequestMsg;
/**
*
* @author AO
*/
public class ResponseMessageSizeLessThan implements SLARuleInterface {
@Override
public boolean CheckTransactionalRule(SetStatusRequestMsg req, List<NameValuePair> params, AtomicReference<String> nullableFaultMsg) {
return false;
}
=====================================================
== File: C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/rules/ResponseTimeGreaterThan.java
=====================================================
/**
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* If it is not possible or desirable to put the notice in a particular
* file, then You may include the notice in a location (such as a LICENSE
* file in a relevant directory) where a recipient would be likely to look
* for such a notice.
*
*/
/* ---------------------------------------------------------------------------
* U.S. Government, Department of the Army
* Army Materiel Command
* Research Development Engineering Command
* Communications Electronics Research Development and Engineering Center
* ---------------------------------------------------------------------------
*/
package org.miloss.fgsms.sla.rules;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.atomic.AtomicReference;
import org.miloss.fgsms.common.Utility;
import org.miloss.fgsms.plugins.sla.AlertType;
import org.miloss.fgsms.plugins.sla.SLARuleInterface;
import org.miloss.fgsms.services.interfaces.common.MachinePerformanceData;
import org.miloss.fgsms.services.interfaces.common.NameValuePair;
import org.miloss.fgsms.services.interfaces.common.PolicyType;
import org.miloss.fgsms.services.interfaces.common.ProcessPerformanceData;
import org.miloss.fgsms.services.interfaces.datacollector.AddDataRequestMsg;
import org.miloss.fgsms.services.interfaces.datacollector.BrokerData;
import org.miloss.fgsms.services.interfaces.policyconfiguration.ServicePolicy;
import org.miloss.fgsms.services.interfaces.policyconfiguration.TransactionalWebServicePolicy;
import org.miloss.fgsms.services.interfaces.status.SetStatusRequestMsg;
/**
*
* @author AO
*/
public class ResponseTimeGreaterThan implements SLARuleInterface {
@Override
public boolean CheckTransactionalRule(SetStatusRequestMsg req, List<NameValuePair> params, AtomicReference<String> nullableFaultMsg) {
return false;
}
=====================================================
== File: C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/rules/ResponseTimeLessThan.java
=====================================================
/**
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* If it is not possible or desirable to put the notice in a particular
* file, then You may include the notice in a location (such as a LICENSE
* file in a relevant directory) where a recipient would be likely to look
* for such a notice.
*
*/
/* ---------------------------------------------------------------------------
* U.S. Government, Department of the Army
* Army Materiel Command
* Research Development Engineering Command
* Communications Electronics Research Development and Engineering Center
* ---------------------------------------------------------------------------
*/
package org.miloss.fgsms.sla.rules;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.atomic.AtomicReference;
import org.miloss.fgsms.common.Utility;
import org.miloss.fgsms.plugins.sla.AlertType;
import org.miloss.fgsms.plugins.sla.SLARuleInterface;
import org.miloss.fgsms.services.interfaces.common.MachinePerformanceData;
import org.miloss.fgsms.services.interfaces.common.NameValuePair;
import org.miloss.fgsms.services.interfaces.common.PolicyType;
import org.miloss.fgsms.services.interfaces.common.ProcessPerformanceData;
import org.miloss.fgsms.services.interfaces.datacollector.AddDataRequestMsg;
import org.miloss.fgsms.services.interfaces.datacollector.BrokerData;
import org.miloss.fgsms.services.interfaces.policyconfiguration.ServicePolicy;
import org.miloss.fgsms.services.interfaces.policyconfiguration.TransactionalWebServicePolicy;
import org.miloss.fgsms.services.interfaces.status.SetStatusRequestMsg;
/**
*
* @author AO
*/
public class ResponseTimeLessThan implements SLARuleInterface {
@Override
public boolean CheckTransactionalRule(SetStatusRequestMsg req, List<NameValuePair> params, AtomicReference<String> nullableFaultMsg) {
return false;
}
=====================================================
== File: C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/rules/StaleData.java
=====================================================
/**
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* If it is not possible or desirable to put the notice in a particular
* file, then You may include the notice in a location (such as a LICENSE
* file in a relevant directory) where a recipient would be likely to look
* for such a notice.
*
*/
/* ---------------------------------------------------------------------------
* U.S. Government, Department of the Army
* Army Materiel Command
* Research Development Engineering Command
* Communications Electronics Research Development and Engineering Center
* ---------------------------------------------------------------------------
*/
package org.miloss.fgsms.sla.rules;
import java.util.ArrayList;
import java.util.GregorianCalendar;
import java.util.List;
import java.util.concurrent.atomic.AtomicReference;
import javax.xml.datatype.DatatypeConfigurationException;
import javax.xml.datatype.DatatypeFactory;
import java.util.Calendar;
import org.miloss.fgsms.common.DBSettingsLoader;
import org.miloss.fgsms.common.Utility;
import org.miloss.fgsms.plugins.sla.AlertType;
import org.miloss.fgsms.plugins.sla.SLARuleInterface;
import org.miloss.fgsms.services.interfaces.common.MachinePerformanceData;
import org.miloss.fgsms.services.interfaces.common.NameValuePair;
import org.miloss.fgsms.services.interfaces.common.PolicyType;
import org.miloss.fgsms.services.interfaces.common.ProcessPerformanceData;
import org.miloss.fgsms.services.interfaces.datacollector.AddDataRequestMsg;
import org.miloss.fgsms.services.interfaces.datacollector.BrokerData;
import org.miloss.fgsms.services.interfaces.policyconfiguration.KeyNameValueEnc;
import org.miloss.fgsms.services.interfaces.policyconfiguration.ServicePolicy;
import org.miloss.fgsms.services.interfaces.status.SetStatusRequestMsg;
import org.miloss.fgsms.sla.NonTransactionalSLAProcessor;
import org.miloss.fgsms.sla.SLACommon;
/**
* This rule is triggered when data becomes stale. I.e. an agent stopped
* responding or functioning, a server went offline. This behaves different
* depending on what the policy type of the item is Transactional Web
=====================================================
== File: C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/rules/TransactionalAgentMemoContainsIgnoreCase.java
=====================================================
/**
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* If it is not possible or desirable to put the notice in a particular
* file, then You may include the notice in a location (such as a LICENSE
* file in a relevant directory) where a recipient would be likely to look
* for such a notice.
*
*/
/* ---------------------------------------------------------------------------
* U.S. Government, Department of the Army
* Army Materiel Command
* Research Development Engineering Command
* Communications Electronics Research Development and Engineering Center
* ---------------------------------------------------------------------------
*/
package org.miloss.fgsms.sla.rules;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.atomic.AtomicReference;
import org.miloss.fgsms.common.Utility;
import org.miloss.fgsms.plugins.sla.AlertType;
import org.miloss.fgsms.plugins.sla.SLARuleInterface;
import org.miloss.fgsms.services.interfaces.common.MachinePerformanceData;
import org.miloss.fgsms.services.interfaces.common.NameValuePair;
import org.miloss.fgsms.services.interfaces.common.PolicyType;
import org.miloss.fgsms.services.interfaces.common.ProcessPerformanceData;
import org.miloss.fgsms.services.interfaces.datacollector.AddDataRequestMsg;
import org.miloss.fgsms.services.interfaces.datacollector.BrokerData;
import org.miloss.fgsms.services.interfaces.policyconfiguration.ServicePolicy;
import org.miloss.fgsms.services.interfaces.policyconfiguration.TransactionalWebServicePolicy;
import org.miloss.fgsms.services.interfaces.status.SetStatusRequestMsg;
/**
*
* @author AO
*/
public class TransactionalAgentMemoContainsIgnoreCase implements SLARuleInterface {
@Override
public boolean CheckTransactionalRule(SetStatusRequestMsg req, List<NameValuePair> params, AtomicReference<String> nullableFaultMsg) {
return false;
}
=====================================================
== File: C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/rules/XPathExpression.java
=====================================================
/**
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* If it is not possible or desirable to put the notice in a particular
* file, then You may include the notice in a location (such as a LICENSE
* file in a relevant directory) where a recipient would be likely to look
* for such a notice.
*
*
*/
/* ---------------------------------------------------------------------------
* U.S. Government, Department of the Army
* Army Materiel Command
* Research Development Engineering Command
* Communications Electronics Research Development and Engineering Center
* ---------------------------------------------------------------------------
*/
package org.miloss.fgsms.sla.rules;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.atomic.AtomicReference;
import java.util.logging.Level;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.xpath.XPath;
import javax.xml.xpath.XPathConstants;
import javax.xml.xpath.XPathFactory;
import org.miloss.fgsms.common.Constants;
import org.miloss.fgsms.common.Logger;
;
import org.miloss.fgsms.common.Utility;
import org.miloss.fgsms.plugins.sla.AlertType;
import org.miloss.fgsms.plugins.sla.SLARuleInterface;
import org.miloss.fgsms.services.interfaces.common.MachinePerformanceData;
import org.miloss.fgsms.services.interfaces.common.NameValuePair;
import org.miloss.fgsms.services.interfaces.common.PolicyType;
import org.miloss.fgsms.services.interfaces.common.ProcessPerformanceData;
import org.miloss.fgsms.services.interfaces.datacollector.AddDataRequestMsg;
import org.miloss.fgsms.services.interfaces.datacollector.BrokerData;
import org.miloss.fgsms.services.interfaces.policyconfiguration.ServicePolicy;
import org.miloss.fgsms.services.interfaces.policyconfiguration.TransactionalWebServicePolicy;
import org.miloss.fgsms.services.interfaces.status.SetStatusRequestMsg;
import org.w3c.dom.Document;
/**
=====================================================
== File: C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/SLACommon.java
=====================================================
/**
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* If it is not possible or desirable to put the notice in a particular
* file, then You may include the notice in a location (such as a LICENSE
* file in a relevant directory) where a recipient would be likely to look
* for such a notice.
*
*
*/
/* ---------------------------------------------------------------------------
* U.S. Government, Department of the Army
* Army Materiel Command
* Research Development Engineering Command
* Communications Electronics Research Development and Engineering Center
* ---------------------------------------------------------------------------
*/
package org.miloss.fgsms.sla;
import java.io.*;
import java.net.URLEncoder;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.*;
import java.util.concurrent.atomic.AtomicReference;
import javax.mail.Message;
import javax.mail.Session;
import javax.mail.Transport;
import javax.mail.internet.InternetAddress;
import javax.mail.internet.MimeMessage;
import javax.xml.bind.*;
import javax.xml.stream.XMLInputFactory;
import javax.xml.stream.XMLStreamReader;
import org.apache.log4j.Level;
import org.miloss.fgsms.common.Constants;
import org.miloss.fgsms.common.Logger;
;
import org.miloss.fgsms.common.DBSettingsLoader;
import org.miloss.fgsms.common.DBUtils;
import org.miloss.fgsms.common.Utility;
import org.miloss.fgsms.plugins.sla.AlertContainer;
import org.miloss.fgsms.plugins.sla.AlertType;
import org.miloss.fgsms.plugins.sla.SLAActionInterface;
import org.miloss.fgsms.plugins.sla.SLARuleInterface;
import org.miloss.fgsms.services.interfaces.common.DriveInformation;
import org.miloss.fgsms.services.interfaces.common.PolicyType;
=====================================================
== File: C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/SLAProcessorController.java
=====================================================
/**
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* If it is not possible or desirable to put the notice in a particular
* file, then You may include the notice in a location (such as a LICENSE
* file in a relevant directory) where a recipient would be likely to look
* for such a notice.
*
*/
/* ---------------------------------------------------------------------------
* U.S. Government, Department of the Army
* Army Materiel Command
* Research Development Engineering Command
* Communications Electronics Research Development and Engineering Center
* ---------------------------------------------------------------------------
*/
package org.miloss.fgsms.sla;
/**
* This is a managed bean adapter instance for the singleton SLA
* Processor Only needed when jboss thread pools are not available
*
* @author AO
*/
public class SLAProcessorController implements SLAProcessorControllerMBean {
@Override
public void Start() {
SLAProcessorSingleton instance = SLAProcessorSingleton.getInstance();
SLAProcessorSingleton.setRunning(true);
SLAProcessorSingleton.run();
}
@Override
public void Stop() {
SLAProcessorSingleton instance = SLAProcessorSingleton.getInstance();
SLAProcessorSingleton.setRunning(false);
}
@Override
public int SizeOfQueue() {
SLAProcessorSingleton instance = SLAProcessorSingleton.getInstance();
return SLAProcessorSingleton.GetQueueSize();
}
}
=====================================================
== File: C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/SLAProcessorControllerMBean.java
=====================================================
/**
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* If it is not possible or desirable to put the notice in a particular
* file, then You may include the notice in a location (such as a LICENSE
* file in a relevant directory) where a recipient would be likely to look
* for such a notice.
*
*/
/* ---------------------------------------------------------------------------
* U.S. Government, Department of the Army
* Army Materiel Command
* Research Development Engineering Command
* Communications Electronics Research Development and Engineering Center
* ---------------------------------------------------------------------------
*/
package org.miloss.fgsms.sla;
/**
* This is a managed bean adapter interface for the singleton SLA
* Processor Only needed when jboss thread pools are not available
* @author AO
*/
public interface SLAProcessorControllerMBean {
void Start();
void Stop();
int SizeOfQueue();
}
=====================================================
== File: C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/SLAProcessorSingleton.java
=====================================================
/**
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* If it is not possible or desirable to put the notice in a particular
* file, then You may include the notice in a location (such as a LICENSE
* file in a relevant directory) where a recipient would be likely to look
* for such a notice.
*
*/
/* ---------------------------------------------------------------------------
* U.S. Government, Department of the Army
* Army Materiel Command
* Research Development Engineering Command
* Communications Electronics Research Development and Engineering Center
* ---------------------------------------------------------------------------
*/
package org.miloss.fgsms.sla;
import org.miloss.fgsms.plugins.sla.AlertContainer;
import java.util.Queue;
import java.util.UUID;
import java.util.concurrent.ConcurrentLinkedQueue;
import java.util.concurrent.locks.ReentrantLock;
import org.apache.log4j.Level;
import org.miloss.fgsms.common.Logger;;
/**
* SLA Processor Singleton Provides basic thread pool
* management and is only used when jboss's thread pooling isn't available
*
* @author AO
*/
public class SLAProcessorSingleton {
private static boolean running = true;
static synchronized void EnqueueAlert(AlertContainer alertContainer) {
queue.add(alertContainer);
log.log(Level.DEBUG, "Enqueue alert " + alertContainer.getSLAID());
run();
}
/**
* @return the running
*/
=====================================================
== File: C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/SLAWorker.java
=====================================================
/**
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* If it is not possible or desirable to put the notice in a particular
* file, then You may include the notice in a location (such as a LICENSE
* file in a relevant directory) where a recipient would be likely to look
* for such a notice.
*
*/
/* ---------------------------------------------------------------------------
* U.S. Government, Department of the Army
* Army Materiel Command
* Research Development Engineering Command
* Communications Electronics Research Development and Engineering Center
* ---------------------------------------------------------------------------
*/
package org.miloss.fgsms.sla;
import javax.resource.spi.work.Work;
import org.miloss.fgsms.plugins.sla.AlertContainer;
/**
* Provides a wrapper that enables Jboss's WorkManager to handle fgsms's
* AlertContainer class
*
* @author AO
*/
public class SLAWorker implements Work {
public SLAWorker(AlertContainer alert) {
a = alert;
}
AlertContainer a = null;
@Override
public void release() {
}
@Override
public void run() {
if (a == null) {
return;
}
SLACommon slac = new SLACommon();
slac.DoAlerts(a);
}
=====================================================
== File: C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/java/org/miloss/fgsms/sla/TransactionalSLAProcessor.java
=====================================================
/**
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* If it is not possible or desirable to put the notice in a particular
* file, then You may include the notice in a location (such as a LICENSE
* file in a relevant directory) where a recipient would be likely to look
* for such a notice.
*
*/
/* ---------------------------------------------------------------------------
* U.S. Government, Department of the Army
* Army Materiel Command
* Research Development Engineering Command
* Communications Electronics Research Development and Engineering Center
* ---------------------------------------------------------------------------
*/
package org.miloss.fgsms.sla;
import java.net.URLEncoder;
import java.util.Properties;
import java.util.UUID;
import java.util.concurrent.atomic.AtomicReference;
import org.miloss.fgsms.plugins.sla.SLARuleInterface;
import org.miloss.fgsms.services.interfaces.datacollector.AddDataRequestMsg;
import org.miloss.fgsms.services.interfaces.policyconfiguration.*;
import org.apache.log4j.Level;
import org.miloss.fgsms.common.Logger;;
import org.miloss.fgsms.plugins.sla.AlertType;
/**
* Provides SLA processing for web service transactions
*
* @author AO
*/
public class TransactionalSLAProcessor {
private static Logger log = Logger.getLogger("fgsms.SLAProcessor");
private static Logger syslog = Logger.getLogger("fgsms.SLAProcessor.Syslog");
private static Logger eventlog = Logger.getLogger("fgsms.SLAProcessor.EventLog");
private static Logger udplog = Logger.getLogger("fgsms.SLAProcessor.UdpLog");
private static Logger filelog = Logger.getLogger("fgsms.SLAProcessor.FileLog");
/*
* Use this for transactional updates
*/
=====================================================
== File: C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/resources/log4j.properties
=====================================================
log4j.rootLogger=INFO, CONSOLE
log4j.appender.jaxws.JAXWSWebServiceMetaDataBuilder=ERROR,CONSOLE
log4j.appender.jaxws=ERROR,CONSOLE
log4j.appender.org.jboss.ws.metadata=ERROR,CONSOLE
log4j.appender.org.jboss.ws.metadata.builder=ERROR,CONSOLE
log4j.appender.org.jboss.ws.metadata.builder.MetaDataBuilder=ERROR,CONSOLE
log4j.appender.builder.MetaDataBuilder=ERROR,CONSOLE
log4j.appender.builder=ERROR,CONSOLE
log4j.appender.org.apache.cxf.service.factory.ReflectionServiceFactoryBean=ERROR,CONSOLE
log4j.appender.handler.HandlerChainExecutor=ERROR,CONSOLE
log4j.appender.handler=ERROR,CONSOLE
log4j.appender.soap.MessageContextAssociation=ERROR,CONSOLE
log4j.appender.httpclient.wire.content=WARN, CONSOLE
log4j.appender.httpclient.wire=WARN, CONSOLE
log4j.appender.org.apache.commons.httpclient=WARN, CONSOLE
log4j.appender.httpclient.wire.content=WARN, CONSOLE
log4j.appender.httpclient.wire=WARN, CONSOLE
log4j.appender.org.apache.commons.httpclient=WARN, CONSOLE
log4j.appender.umdm.EndpointMetaData==ERROR, CONSOLE
log4j.appender.handler.HandlerResolverImpl==ERROR, CONSOLE
log4j.appender.binding.BindingImpl==ERROR, CONSOLE
log4j.appender.jaxws.JAXWSWebServiceMetaDataBuilder==ERROR, CONSOLE
log4j.appender.utils.JBossWSEntityResolver==ERROR, CONSOLE
log4j.appender.fgsms.ServiceMixJMX=INFO,CONSOLE
log4j.appender.fgsms.Utility=INFO,CONSOLE
log4j.appender.fgsms.StatusBueller=INFO,CONSOLE
log4j.appender.fgsms.DataCollectorService=INFO,CONSOLE
log4j.appender.fgsms.DataAccessService=INFO,CONSOLE
log4j.appender.org.miloss.fgsms.common.AuditLogger=INFO,CONSOLE
log4j.appender.fgsms.UserIdentityUtil=INFO,CONSOLE
log4j.appender.fgsms.StatusBueller=INFO,CONSOLE
log4j.appender.fgsms.QpidPython=INFO,CONSOLE
log4j.appender.fgsms.QpidJMX=INFO,CONSOLE
log4j.appender.fgsms.DataPruner=INFO,CONSOLE
log4j.appender.fgsms.UDDIPublisher=INFO,CONSOLE
log4j.appender.fgsms.MulticastAlerting=INFO,CONSOLE
log4j.appender.fgsms.SLAProcessor=INFO,CONSOLE
#the following items are used for sending SLA Alerts to specific loggers. Configure them as necessary to pipe log output whereever you need it
log4j.appender.fgsms.SLAProcessor.SysLog=INFO,CONSOLE
log4j.appender.fgsms.SLAProcessor.UdpLog=INFO,CONSOLE
log4j.appender.fgsms.SLAProcessor.EventLog=INFO,CONSOLE
=====================================================
== File: C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/resources/META-INF/wsdds_service.wsdl
=====================================================
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<wsdl:definitions name="wsddsService"
targetNamespace="http://www.rti.com/wsdds/wsdds_types.xsd"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:wsdds="http://www.rti.com/wsdds/wsdds_types.xsd"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<wsdl:types>
<xsd:schema
targetNamespace="http://www.rti.com/wsdds/wsdds_types.xsd"
elementFormDefault="qualified"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:wsdds="http://www.rti.com/wsdds/wsdds_types.xsd">
<xsd:include schemaLocation="wsdds_types.xsd"></xsd:include>
</xsd:schema>
</wsdl:types>
<wsdl:message name="loginRequest">
<wsdl:part name="loginRequest" element="wsdds:loginRequestParameter" />
</wsdl:message>
<wsdl:message name="loginResponse">
<wsdl:part name="loginResponse" element="wsdds:loginResponseParameter" />
</wsdl:message>
<wsdl:message name="logoutRequest">
<wsdl:part name="logoutRequest" element="wsdds:logoutRequestParameter"></wsdl:part>
</wsdl:message>
<wsdl:message name="logoutResponse">
<wsdl:part name="logoutResponse" element="wsdds:logoutResponseParameter"></wsdl:part>
</wsdl:message>
<wsdl:message name="createSubscriptionRequest">
<wsdl:part name="createSubscriptionRequest" element="wsdds:createSubscriptionRequestParameter"></wsdl:part>
</wsdl:message>
<wsdl:message name="createSubscriptionResponse">
<wsdl:part name="createSubscriptionResponse" element="wsdds:createSubscriptionResponseParameter"></wsdl:part>
</wsdl:message>
<wsdl:message name="createPublicationRequest">
<wsdl:part name="createPublicationRequest" element="wsdds:createPublicationRequestParameter"></wsdl:part>
</wsdl:message>
<wsdl:message name="createPublicationResponse">
<wsdl:part name="createPublicationResponse" element="wsdds:createPublicationResponseParameter"></wsdl:part>
</wsdl:message>
<wsdl:message name="removeSubscriptionRequest">
<wsdl:part name="removeSubscriptionRequest" element="wsdds:removeSubscriptionRequestParameter"></wsdl:part>
</wsdl:message>
<wsdl:message name="removeSubscriptionResponse">
<wsdl:part name="removeSubscriptionResponse" element="wsdds:removeSubscriptionResponseParameter"></wsdl:part>
</wsdl:message>
<wsdl:message name="getSubscriptionsRequest">
<wsdl:part name="getSubscriptionsRequest" element="wsdds:getSubscriptionsRequestParameter"></wsdl:part>
=====================================================
== File: C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/resources/META-INF/wsdds_types.xsd
=====================================================
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema targetNamespace="http://www.rti.com/wsdds/wsdds_types.xsd"
elementFormDefault="qualified"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:wsdds="http://www.rti.com/wsdds/wsdds_types.xsd">
<xsd:simpleType name="second">
<xsd:restriction base="xsd:int">
<xsd:minInclusive value="0"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="nanosecond">
<xsd:restriction base="xsd:unsignedInt">
<xsd:maxExclusive value="1000000000"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="sessionIdentifier">
<xsd:restriction base="xsd:string"/>
</xsd:simpleType>
<xsd:simpleType name="returnCode">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="OK"/>
<xsd:enumeration value="SERVER_ERROR"/>
<xsd:enumeration value="DDS_ERROR"/>
<xsd:enumeration value="INVALID_INPUT_ERROR"/>
<xsd:enumeration value="INVALID_USER_NAME_ERROR"/>
<xsd:enumeration value="INVALID_PASSWORD_ERROR"/>
<xsd:enumeration value="INVALID_SESSION_ID_ERROR"/>
<xsd:enumeration value="INVALID_IP_ADDRESS_ERROR"/>
<xsd:enumeration value="INVALID_SUBSCRIPTION_ID_ERROR"/>
<xsd:enumeration value="INVALID_PUBLICATION_ID_ERROR"/>
<xsd:enumeration value="INVALID_NOTIFICATION_ENDPOINT_ERROR"/>
<xsd:enumeration value="INVALID_NOTIFICATION_ENDPOINT_PORT_NUMBER_ERROR"/>
<xsd:enumeration value="INVALID_NOTIFICATION_ENDPOINT_ID_ERROR"/>
<xsd:enumeration value="BAD_TYPE_SCHEMA_ERROR"/>
<xsd:enumeration value="BAD_CONTENT_FILTER_EXPRESSION_ERROR"/>
<xsd:enumeration value="BAD_DATA_SAMPLE_ERROR"/>
<xsd:enumeration value="QOS_PROFILE_NOT_FOUND_ERROR"/>
<xsd:enumeration value="EXPIRED_SESSION_ERROR"/>
<xsd:enumeration value="NO_RIGHTS_JOINING_DOMAIN_ERROR"/>
<xsd:enumeration value="NO_RIGHTS_SUBSCRIBING_ERROR"/>
<xsd:enumeration value="NO_RIGHTS_PUBLISHING_ERROR"/>
<xsd:enumeration value="NO_RIGHTS_BEING_NOTIFIED_ERROR"/>
<xsd:enumeration value="MAX_SESSION_COUNT_REACHED_ERROR"/>
<xsd:enumeration value="INCOMPATIBLE_TOPIC_ERROR"/>
<xsd:enumeration value="TOPIC_CREATED_WITH_DIFFERENT_TYPE_SCHEMA_ERROR"/>
<xsd:enumeration value="TOPIC_DEFINED_WITH_DIFFERENT_TYPE_SCHEMA_ERROR"/>
=====================================================
== File: C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/resources/META-INF/xml.xsd
=====================================================
<?xml version='1.0'?>
<xs:schema targetNamespace="http://www.w3.org/XML/1998/namespace" xmlns:xs="http://www.w3.org/2001/XMLSchema" xml:lang="en">
<xs:annotation>
<xs:documentation>
See http://www.w3.org/XML/1998/namespace.html and
http://www.w3.org/TR/REC-xml for information about this namespace.
This schema document describes the XML namespace, in a form
suitable for import by other schema documents.
Note that local names in this namespace are intended to be defined
only by the World Wide Web Consortium or its subgroups. The
following names are currently defined in this namespace and should
not be used with conflicting semantics by any Working Group,
specification, or document instance:
base (as an attribute name): denotes an attribute whose value
provides a URI to be used as the base for interpreting any
relative URIs in the scope of the element on which it
appears; its value is inherited. This name is reserved
by virtue of its definition in the XML Base specification.
id (as an attribute name): denotes an attribute whose value
should be interpreted as if declared to be of type ID.
This name is reserved by virtue of its definition in the
xml:id specification.
lang (as an attribute name): denotes an attribute whose value
is a language code for the natural language of the content of
any element; its value is inherited. This name is reserved
by virtue of its definition in the XML specification.
space (as an attribute name): denotes an attribute whose
value is a keyword indicating what whitespace processing
discipline is intended for the content of the element; its
value is inherited. This name is reserved by virtue of its
definition in the XML specification.
Father (in any context at all): denotes Jon Bosak, the chair of
the original XML Working Group. This name is reserved by
the following decision of the W3C XML Plenary and
XML Coordination groups:
In appreciation for his vision, leadership and dedication
the W3C XML Plenary on this 10th day of February, 2000
reserves for Jon Bosak in perpetuity the XML name
xml:Father
</xs:documentation>
</xs:annotation>
=====================================================
== File: C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/main/resources/org/miloss/fgsms/sla/SLAResources.properties
=====================================================
#To access these messages, try SLACommon.getBundleString("key")
MachinePolicyNull=policy is unexpectedly null or empty
ProcessPolicyNull=policy is unexpectedly null or empty
WSPolicyNull=policy is unexpectedly null or empty
StatusPolicyNull=policy is unexpectedly null or empty
BrokerPolicyNull=policy is unexpectedly null or empty
ErrorLoadingPolicyForSLA=Error obtaining service policies for SLA processing
ErrorLoadingPolicy=unable to load service policy list
ErrorClosingDB=trouble closing the sql connection, this is probably ignorable
ErrorMarshallingPolicy=error retrieving policy from database, serialization error
ErrorSQLException=unexpected error talking to the database
ErrorUncaughtException=an unexpected error occurred
ErrorExceptionPolicyCreation=Error writing policy to database, this could be ignorable if the policy exists already. The transaction will be rolled back
WSDMLangauge=english
WSDMEventIdPrefix=urn:
ErrorDataTypeFactorLoad=unable to load the Datatype Factory, date and time stamps may not be available
ErrorWSDMMarshalling=unable to marshal WSDM message
ErrorWSDMCreateDomElement=can't create dom element, WSDM based alerts may not be sendable
AlertingSettings=You are currently subscribed to receive email alerts for this service. <a href="%s/alertingSettings.jsp">Click here</a> to manage your subscriptions.
ManageLink=<a href="%s/manage.jsp?url=%s">Manage this policy</a>
AlertGlobalAdminsNewPolicyCreated=A new policy has been created by:<br><br>%s<br><br>URL: %s<br><br>The Policy Type for this service is %s<br><br>This email is just an informative alert that a new service has been detected and that users may wish to gain access to it.<Br><a href="%s">fgsms</a><br>
AlertGlobalAdminsNewPolicyCreatedSubject=fgsms - New Policy Created
AlertSubscriptionSubject=fgsms SLA Alert Subscriptions
AlertSubscriptionBody1=<br><br>You have just updated your SLA subscriptions for services with Email alerts. You will received emails for services matching the following URLs and SLA IDs.<ul>
AlertSubscriptionBody2=<br><br>If you feel this is in error, report this to your system administrator immediately.<br><br>
EmailEncodingType=text/html; charset=ISO-8859-1
AlertSubscriptionDeletedSubject=fgsms SLA Alert Unsubscribed
AlertSubscriptionDeletedBody=%s<br><br>The SLA subscription for the service located at<br><br>%s<br><br>with the id %s has been removed because either the SLA parameters were removed or the service is no longer monitored and was removed. This action was performed by %s.<br><a href="%s">fgsms</a><br><br>
ErrorCreateInternetAddress=Error creating InternetAddress object which is used to send email to %s, perhaps its an invalid email address
StatusChangeEmailAlertPlain=Change In Status Alert for %s current status is %s
StatusChangeEmailAlertHtml=<br>The service identified by %s current availability status has changed. It was previously %s and is now %s <br><h2>Current Status: %s </h2>
ErrorSavingSLAViolation=Unable to save SLA violation in performance database! Check to ensure that the table slaViolations exists within the database
ErrorLoadingSendMailSettings=trouble getting email settings from the config database
ErrorSendingEmail=Error sending SLA alert email to
ErrorUnableToUpdateStatus=unable to update status for %s
ErrorUnableToRunSLAScript=Could not process the SLA Run Script action
SLALoggerPrefix=fgsms SLA Processor - Service Level Alert for service
ErrorSLAPluginRuleNCDF=Unable to load class for rule generic
ErrorSLAPluginActionNCDF=Unable to load class for action generic
ErrorSLAPluginRuleRunning=Error caught running plugin rule
ErrorSLAPluginActionRunning=Error caught running plugin action
ErrorCheckPolicyExists=error caught checking for policy existence
ErrorGetJbossWorkManagerReference=Unable to get a reference to the Jboss service Work Manager, we are probably not running in jboss. Falling back to a slower alerting queuing mechanism
=====================================================
== File: C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/test/java/org/miloss/fgsms/sla/InitialContextFactoryForTest.java
=====================================================
/**
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* If it is not possible or desirable to put the notice in a particular
* file, then You may include the notice in a location (such as a LICENSE
* file in a relevant directory) where a recipient would be likely to look
* for such a notice.
*
*/
/* ---------------------------------------------------------------------------
* U.S. Government, Department of the Army
* Army Materiel Command
* Research Development Engineering Command
* Communications Electronics Research Development and Engineering Center
* ---------------------------------------------------------------------------
*/
package org.miloss.fgsms.sla;
import java.util.HashMap;
import java.util.Hashtable;
import java.util.Map;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;
import javax.naming.spi.InitialContextFactory;
/**
*
* @author AO
*/
public class InitialContextFactoryForTest implements InitialContextFactory {
private static Context context;
static {
try {
context = new InitialContext(true) {
Map<String, Object> bindings = new HashMap<String, Object>();
@Override
public void bind(String name, Object obj)
throws NamingException {
bindings.put(name, obj);
}
=====================================================
== File: C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/test/java/org/miloss/fgsms/sla/MainTest.java
=====================================================
/**
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* If it is not possible or desirable to put the notice in a particular
* file, then You may include the notice in a location (such as a LICENSE
* file in a relevant directory) where a recipient would be likely to look
* for such a notice.
*
*/
/* ---------------------------------------------------------------------------
* U.S. Government, Department of the Army
* Army Materiel Command
* Research Development Engineering Command
* Communications Electronics Research Development and Engineering Center
* ---------------------------------------------------------------------------
*/
package org.miloss.fgsms.sla;
import org.miloss.fgsms.sla.SLACommon;
import org.junit.Test;
import static org.junit.Assert.*;
/**
*
* @author AO
*/
public class MainTest {
public MainTest() {
}
@org.junit.BeforeClass
public static void setUpClass() throws Exception {
}
@org.junit.AfterClass
public static void tearDownClass() throws Exception {
}
/**
* Test of main method, of class Main.
*/
@org.junit.Test
public void testMain() throws Exception {
/* System.out.println("main");
=====================================================
== File: C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/test/java/org/miloss/fgsms/sla/NonTransactionalSLAProcessorTest.java
=====================================================
/**
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* If it is not possible or desirable to put the notice in a particular
* file, then You may include the notice in a location (such as a LICENSE
* file in a relevant directory) where a recipient would be likely to look
* for such a notice.
*
*/
/* ---------------------------------------------------------------------------
* U.S. Government, Department of the Army
* Army Materiel Command
* Research Development Engineering Command
* Communications Electronics Research Development and Engineering Center
* ---------------------------------------------------------------------------
*/
package org.miloss.fgsms.sla;
import java.io.File;
import java.io.FileInputStream;
import org.miloss.fgsms.sla.SLACommon;
import org.miloss.fgsms.sla.NonTransactionalSLAProcessor;
import java.net.Inet4Address;
import java.net.UnknownHostException;
import java.util.Properties;
import javax.naming.Context;
import static org.junit.Assert.*;
import org.postgresql.ds.PGPoolingDataSource;
/**
*
* @author AO
*/
public class NonTransactionalSLAProcessorTest {
public NonTransactionalSLAProcessorTest() throws Exception {
}
protected static PGPoolingDataSource ds =null;
@org.junit.BeforeClass
public static void setUpClass() throws Exception {
File f = new File("../resources/test-database.properties");
=====================================================
== File: C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/test/java/org/miloss/fgsms/sla/SlaSuite.java
=====================================================
/**
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* If it is not possible or desirable to put the notice in a particular
* file, then You may include the notice in a location (such as a LICENSE
* file in a relevant directory) where a recipient would be likely to look
* for such a notice.
*
*/
/* ---------------------------------------------------------------------------
* U.S. Government, Department of the Army
* Army Materiel Command
* Research Development Engineering Command
* Communications Electronics Research Development and Engineering Center
* ---------------------------------------------------------------------------
*/
package org.miloss.fgsms.sla;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
/**
*
* @author AO
*/
@org.junit.runner.RunWith(org.junit.runners.Suite.class)
@org.junit.runners.Suite.SuiteClasses({MainTest.class, TransactionalSLAProcessorTest.class, NonTransactionalSLAProcessorTest.class})
public class SlaSuite {
@org.junit.BeforeClass
public static void setUpClass() throws Exception {
}
@org.junit.AfterClass
public static void tearDownClass() throws Exception {
}
}
=====================================================
== File: C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/test/java/org/miloss/fgsms/sla/TransactionalSLAProcessorTest.java
=====================================================
/**
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* If it is not possible or desirable to put the notice in a particular
* file, then You may include the notice in a location (such as a LICENSE
* file in a relevant directory) where a recipient would be likely to look
* for such a notice.
*
*/
/* ---------------------------------------------------------------------------
* U.S. Government, Department of the Army
* Army Materiel Command
* Research Development Engineering Command
* Communications Electronics Research Development and Engineering Center
* ---------------------------------------------------------------------------
*/
package org.miloss.fgsms.sla;
/**
*
* @author AO
*/
public class TransactionalSLAProcessorTest {
public TransactionalSLAProcessorTest() {
}
@org.junit.BeforeClass
public static void setUpClass() throws Exception {
//TODO insert a service policy with an SLA rule record set to true, insert a single record
}
@org.junit.AfterClass
public static void tearDownClass() throws Exception {
//TODO delete service policy, transaction records, and sla faults
}
/**
* Test of ProcessNewTransaction method, of class TransactionalSLAProcessor.
*/
@org.junit.Test
public void testProcessNewTransaction() {
/* System.out.println("ProcessNewTransaction");
AddDataRequestMsg req = null;
String transactionid = "";
=====================================================
== File: C:/projects/fgsms/fgsms-server/fgsms-sla-processor/src/test/java/org/miloss/fgsms/sla/WSNotificationAlerterTest.java
=====================================================
/**
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* If it is not possible or desirable to put the notice in a particular
* file, then You may include the notice in a location (such as a LICENSE
* file in a relevant directory) where a recipient would be likely to look
* for such a notice.
*
*/
/* ---------------------------------------------------------------------------
* U.S. Government, Department of the Army
* Army Materiel Command
* Research Development Engineering Command
* Communications Electronics Research Development and Engineering Center
* ---------------------------------------------------------------------------
*/
package org.miloss.fgsms.sla;
import org.junit.AfterClass;
import static org.junit.Assert.*;
import org.junit.BeforeClass;
import org.junit.Test;
import org.miloss.fgsms.common.SLAUtils;
import org.miloss.fgsms.plugins.sla.AlertContainer;
import org.miloss.fgsms.services.interfaces.policyconfiguration.SLAAction;
import org.miloss.fgsms.services.interfaces.policyconfiguration.TransactionalWebServicePolicy;
import org.miloss.fgsms.sla.actions.WSNotificationAlerter;
import org.oasis_open.docs.wsdm.muws1_2.ManagementEventType;
import org.oasis_open.docs.wsdm.muws2_2.AvailabilitySituation;
import org.w3c.dom.Element;
/**
*
* @author AO
*/
public class WSNotificationAlerterTest {
public WSNotificationAlerterTest() {
}
@BeforeClass
public static void setUpClass() throws Exception {
}
@AfterClass