
public class SLACommon extends Object
| Constructor and Description |
|---|
SLACommon() |
| Modifier and Type | Method and Description |
|---|---|
static void |
AlertGlobalAdminsNewPolicyCreated(String agentUsername,
String url,
boolean pooled,
PolicyType p)
sends and informative alert to everyone in the database that has the
admin role (site admins)
|
static void |
AlertUserSLADeleted(String currentUser,
String subscribersUsername,
List<String> subscribersEmail,
String uRL,
String id,
boolean pooled)
sends an email to email subscribed users for alerts, letting them know
that the SLA was deleted, along with their subscription
|
static void |
AlertUserSLASubscribed(String subscribersUsername,
List<String> subscribersEmail,
SetAlertRegistrationsRequestMsg request,
boolean pooled) |
protected void |
DoAlerts(AlertContainer alert)
Handles each alert and calls the corresponding function to process the
alert
|
static String |
GenerateManageLink(String uri,
String baseurl) |
static String |
GenerateSubscriptionLink(String property) |
static javax.mail.internet.InternetAddress[] |
GetAllfgsmsAdminsEmailAddressNotPooled()
Deprecated.
|
static javax.mail.internet.InternetAddress[] |
GetAllfgsmsAdminsEmailAddressPooled() |
static String |
getBundleString(String key)
loads a resource from the properties file
|
static SecurityWrapper |
GetClassLevel(boolean pooled) |
static void |
GetCurrentStatus(boolean pooled,
String policyurl,
AtomicReference<Boolean> out_status,
AtomicReference<Long> out_timestamp,
AtomicReference<String> out_message)
Gets the current status of an item.
|
static String |
GetHostName()
Returns the current machine's hostname using
InetAddress.getLocalHost().getHostName().toLowerCase(); The hostname will
always be lower case.
|
static javax.mail.internet.InternetAddress[] |
GetSubscribersNotPooled(String guid)
Deprecated.
|
static javax.mail.internet.InternetAddress[] |
GetSubscribersPooled(String guid)
Returns a list of user's email addresses that are subscribed to a
specific SLA with email actions
|
static boolean |
ListContainsStatisticalRules(ArrayOfSLA serviceLevelAggrements) |
static List<ServicePolicy> |
LoadFederationServicePoliciesPooled()
used by Federation Scheduler for publication
|
static ServicePolicy |
LoadPolicyNotPooled(String uRI)
Deprecated.
|
static ServicePolicy |
LoadPolicyPooled(String uRI)
Loads a policy using a caching mechanism, used by DCS and DAS if the
policy does not exist, it will NOT be created
|
static List<ProcessPolicy> |
LoadProcessPoliciesPooledByHostname(String hostname)
will never return null, but returned value may be an empty list if no
policies are defined
|
static List<ServicePolicy> |
LoadServicePoliciesNotPooled()
used by NT SLA for web services
|
static List<ServicePolicy> |
LoadServicePoliciesPooled()
used by NT SLA for web services
|
static Properties |
LoadSLAPropertiesNotPooled()
Deprecated.
|
static Properties |
LoadSLAPropertiesPooled()
returns all of the mail settings, use from pooled connections with jndi
|
static boolean |
PolicyExists(String uri,
boolean pooled)
Checks for the existence of a policy
|
static void |
ProcessAlerts(String faultMsg,
String htmlEncodedFaultMessage,
String modifiedurl,
String relatedMessageId,
long currentTimeMillis,
String incidentid,
boolean pooled,
boolean sendtoAdminsOnly,
List<SLAAction> slaActionBaseType,
String SLAID,
ServicePolicy t,
AlertType at)
Handles sending of alert messages.
|
static MachinePolicy |
ProcessMachineLevelSLAs(AddMachineAndProcessDataRequestMsg req,
boolean pooled) |
static List<ProcessPolicy> |
ProcessProcessLevelSLAs(AddMachineAndProcessDataRequestMsg req,
boolean pooled) |
static void |
ProcessStatisticalSLARules(AddStatisticalDataRequestMsg req,
boolean pooled)
processes broker rules for when a queue or topic doesn't exist and
QueueOrTopicDoesNotExist, BrokerQueueSizeGreaterThan Map contains the key
(topic name), value, size of the queue
|
static void |
RecordSLAFault(AtomicReference<String> faultMsg,
String uRL,
String relatedMsgID,
long timeInMillis,
String incidentid,
boolean pooled) |
static void |
TriggerStatusChange(String uri,
Boolean oldstatus,
String oldmsg,
Boolean currenstatus,
String s,
boolean pooled)
Call this function when a monitored item changes status.
|
static boolean |
ValidateSLAs(AtomicReference<String> outmsg,
ServicePolicy pol)
Returns true if the proposed SLA configuration is valid
|
public static String getBundleString(String key)
key - public static String GetHostName()
public static List<ServicePolicy> LoadServicePoliciesPooled()
public static List<ServicePolicy> LoadServicePoliciesNotPooled()
public static ServicePolicy LoadPolicyPooled(String uRI)
uRI - @Deprecated public static ServicePolicy LoadPolicyNotPooled(String uRI)
uRI - @Deprecated public static javax.mail.internet.InternetAddress[] GetSubscribersNotPooled(String guid)
guid - public static javax.mail.internet.InternetAddress[] GetSubscribersPooled(String guid)
guid - public static void TriggerStatusChange(String uri, Boolean oldstatus, String oldmsg, Boolean currenstatus, String s, boolean pooled)
uri - oldstatus - oldmsg - currenstatus - s - pooled - public static void RecordSLAFault(AtomicReference<String> faultMsg, String uRL, String relatedMsgID, long timeInMillis, String incidentid, boolean pooled)
public static Properties LoadSLAPropertiesPooled()
@Deprecated public static Properties LoadSLAPropertiesNotPooled()
public static void AlertGlobalAdminsNewPolicyCreated(String agentUsername, String url, boolean pooled, PolicyType p)
agentUsername - url - pooled - p - public static void AlertUserSLASubscribed(String subscribersUsername, List<String> subscribersEmail, SetAlertRegistrationsRequestMsg request, boolean pooled)
public static void AlertUserSLADeleted(String currentUser, String subscribersUsername, List<String> subscribersEmail, String uRL, String id, boolean pooled)
currentUser - subscribersUsername - subscribersEmail - uRL - id - pooled - @Deprecated public static javax.mail.internet.InternetAddress[] GetAllfgsmsAdminsEmailAddressNotPooled()
public static javax.mail.internet.InternetAddress[] GetAllfgsmsAdminsEmailAddressPooled()
public static boolean ListContainsStatisticalRules(ArrayOfSLA serviceLevelAggrements)
public static List<ProcessPolicy> LoadProcessPoliciesPooledByHostname(String hostname)
hostname - public static MachinePolicy ProcessMachineLevelSLAs(AddMachineAndProcessDataRequestMsg req, boolean pooled)
public static List<ProcessPolicy> ProcessProcessLevelSLAs(AddMachineAndProcessDataRequestMsg req, boolean pooled)
public static void ProcessStatisticalSLARules(AddStatisticalDataRequestMsg req, boolean pooled)
req - pooled - public static void ProcessAlerts(String faultMsg, String htmlEncodedFaultMessage, String modifiedurl, String relatedMessageId, long currentTimeMillis, String incidentid, boolean pooled, boolean sendtoAdminsOnly, List<SLAAction> slaActionBaseType, String SLAID, ServicePolicy t, AlertType at)
faultMsg - human readable fault messagehtmlEncodedFaultMessage - html formatted alert messagemodifiedurl - the policy urlrelatedMessageId - a related record that caused this action to be
trigger, may be nullcurrentTimeMillis - the time it was triggerincidentid - a unique identifier for the SLA, it will be recorded
using this IDpooled - are we in jboss and can we use jndi for database lookups?sendtoAdminsOnly - slaActionBaseType - the action to triggerSLAID - the UUID of the SLA Rule/Action sett - service policyat - alert typepublic static boolean PolicyExists(String uri, boolean pooled)
uri - pooled - public static boolean ValidateSLAs(AtomicReference<String> outmsg, ServicePolicy pol)
outmsg - pol - public static List<ServicePolicy> LoadFederationServicePoliciesPooled()
protected void DoAlerts(AlertContainer alert)
alert - public static SecurityWrapper GetClassLevel(boolean pooled)
public static void GetCurrentStatus(boolean pooled,
String policyurl,
AtomicReference<Boolean> out_status,
AtomicReference<Long> out_timestamp,
AtomicReference<String> out_message)
pooled - policyurl - out_status - NULL if status is unknown, true = runnningout_timestamp - NULL if status is unknown, else time since epochout_message - Copyright © 2008–2017 MIL-OSS. All rights reserved.