public class RequestMessageSizeLessThan extends Object implements SLARuleInterface
ENCRYPTED_MASK, UNDEFINED_VALUE
Constructor and Description |
---|
RequestMessageSizeLessThan() |
Modifier and Type | Method and Description |
---|---|
boolean |
CheckNonTransactionalRule(ServicePolicy pol,
List<NameValuePair> params,
AtomicReference<String> nullableFaultMsg,
boolean pooled)
Returns True is the rule's conditions have been met (SLA
Violation).
|
boolean |
CheckTransactionalRule(AddDataRequestMsg req,
List<NameValuePair> params,
AtomicReference<String> nullableFaultMsg)
Returns True is the rule's conditions have been met (SLA Violation) Web
Service Transaction performance data This function should never throw an
exception
|
boolean |
CheckTransactionalRule(MachinePerformanceData req,
List<NameValuePair> params,
AtomicReference<String> nullableFaultMsg)
Returns True is the rule's conditions have been met (SLA Violation)
Machine Performance data This function should never throw an exception
|
boolean |
CheckTransactionalRule(ProcessPerformanceData req,
List<NameValuePair> params,
AtomicReference<String> nullableFaultMsg)
Returns True is the rule's conditions have been met (SLA Violation)
Process Performance data This function should never throw an exception
|
boolean |
CheckTransactionalRule(SetStatusRequestMsg req,
List<NameValuePair> params,
AtomicReference<String> nullableFaultMsg)
Returns True is the rule's conditions have been met (SLA Violation) This
represents when a Status message comes in to the status service, such as
from an OS agent.
|
boolean |
CheckTransactionalRule(String url,
List<BrokerData> data,
List<NameValuePair> params,
AtomicReference<String> nullableFaultMsg)
Returns True is the rule's conditions have been met (SLA Violation)
Statistical Message Broker data This function should never throw an
exception
|
List<PolicyType> |
GetAppliesTo()
Returns a list of service policy types that this plugin can be applied to
use Utility.getAllPolicyTypes() if it applies to everything.
|
String |
GetDisplayName()
end user facing display name
|
String |
GetHtmlFormattedDisplay(List<NameValuePair> params)
returns a html encoded string contain usually the rule name plus the configured values.
|
String |
GetHtmlFormattedHelp()
returns html formatted help to guide users towards proper usage.
|
List<NameValuePair> |
GetOptionalParameters()
returns a list of optional parameters
|
List<NameValuePair> |
GetRequiredParameters()
returns a list of required parameters
|
AlertType |
GetType()
If the rule is triggered, this defines what type of rule this is.
|
boolean |
ValidateConfiguration(List<NameValuePair> params,
AtomicReference<String> outError,
ServicePolicy policy)
Validates the configuration settings.
|
public boolean CheckTransactionalRule(SetStatusRequestMsg req, List<NameValuePair> params, AtomicReference<String> nullableFaultMsg)
SLARuleInterface
CheckTransactionalRule
in interface SLARuleInterface
req
- Set Status messageparams
- per service policy, rule instance parameters this can be
nullnullableFaultMsg
- the human readable text explaining what happened
or why the rule was triggeredpublic boolean CheckTransactionalRule(ProcessPerformanceData req, List<NameValuePair> params, AtomicReference<String> nullableFaultMsg)
SLARuleInterface
CheckTransactionalRule
in interface SLARuleInterface
req
- process performance dataparams
- per service policy, rule instance parameters this can be
nullnullableFaultMsg
- the human readable text explaining what happened
or why the rule was triggeredpublic boolean CheckTransactionalRule(MachinePerformanceData req, List<NameValuePair> params, AtomicReference<String> nullableFaultMsg)
SLARuleInterface
CheckTransactionalRule
in interface SLARuleInterface
req
- machine performance dataparams
- per service policy, rule instance parameters this can be
nullnullableFaultMsg
- the human readable text explaining what happened
or why the rule was triggeredpublic boolean CheckTransactionalRule(AddDataRequestMsg req, List<NameValuePair> params, AtomicReference<String> nullableFaultMsg)
SLARuleInterface
CheckTransactionalRule
in interface SLARuleInterface
req
- web service transaction dataparams
- per service policy, rule instance parameters this can be
nullnullableFaultMsg
- the human readable text explaining what happened
or why the rule was triggeredpublic boolean CheckTransactionalRule(String url, List<BrokerData> data, List<NameValuePair> params, AtomicReference<String> nullableFaultMsg)
SLARuleInterface
CheckTransactionalRule
in interface SLARuleInterface
url
- The url of the broker in questiondata
- BrokerData, generally a list of queue, topics and their
associated metricsparams
- per service policy, rule instance parameters this can be
nullnullableFaultMsg
- the human readable text explaining what happened
or why the rule was triggeredpublic boolean CheckNonTransactionalRule(ServicePolicy pol, List<NameValuePair> params, AtomicReference<String> nullableFaultMsg, boolean pooled)
SLARuleInterface
This is used for non transactional rules. Implementors should access the database and perform whatever calculations are required in order to determine if the rule's conditions are met or not.
This function should never throw an exception.
The calling function is typically the NonTransactionalSLAProcessor which operates on a set schedule that can be adjusted by administrators. It operates using the Quarts schedulers
Since no data is provided, an implementor is expected to access data on their own. To access global settings
Connection con =null; if (pooled) con= Utility.GetPerformanceDBConnection(); else con = Utility.GetPerformanceDB_NONPOOLED_Connection(); //or use Utility.ConfigurationDBConnection(); for the configuration database try { // do something } catch (Exception ex) { // log some message } finally { if (con != null) { try { con.close(); } catch (Exception e) { } } }
CheckNonTransactionalRule
in interface SLARuleInterface
pol
- This is a reference the service policy that this rule is
attached to. Do not modify, unexpected results may occurparams
- per service policy, rule instance parameters this can be
nullnullableFaultMsg
- the human readable text explaining what happened
or why the rule was triggeredpooled
- Indicates the usage of pooled database connections or notNonTransactionalSLAProcessor
,
RuleBaseType
,
Utility
,
AuditLogger
,
DBSettingsLoader
,
SLACommon
,
SetServicePolicyRequestMsg
,
ServicePolicy
,
SLA
public String GetDisplayName()
PluginCommon
GetDisplayName
in interface PluginCommon
public String GetHtmlFormattedHelp()
PluginCommon
GetHtmlFormattedHelp
in interface PluginCommon
public List<NameValuePair> GetRequiredParameters()
PluginCommon
GetRequiredParameters
in interface PluginCommon
public List<NameValuePair> GetOptionalParameters()
PluginCommon
GetOptionalParameters
in interface PluginCommon
public boolean ValidateConfiguration(List<NameValuePair> params, AtomicReference<String> outError, ServicePolicy policy)
SLARuleInterface
ValidateConfiguration
in interface SLARuleInterface
params
- parameters for this instance for a SLARule for validationoutError
- human readable error message representing whatever the problem areas arepolicy
- a reference to the proposed service policypublic AlertType GetType()
SLARuleInterface
GetType
in interface SLARuleInterface
public String GetHtmlFormattedDisplay(List<NameValuePair> params)
SLARuleInterface
GetHtmlFormattedDisplay
in interface SLARuleInterface
StringEscapeUtils, Utility
public List<PolicyType> GetAppliesTo()
PluginCommon
GetAppliesTo
in interface PluginCommon
Copyright © 2008–2017 MIL-OSS. All rights reserved.