A B C D G H I L M N R S T U 

A

AbstractAlarmChannel - Class in com.solab.alarms
An abstract implementation of AlarmChannel, to ease the creation of custom channels.
AbstractAlarmChannel() - Constructor for class com.solab.alarms.AbstractAlarmChannel
 
AlarmCache - Interface in com.solab.alarms
The AlarmSender uses a cache to avoid resending the same message very frequently.
AlarmChannel - Interface in com.solab.alarms
This interface defines the behavior of an alarm channel.
AlarmHash - Class in com.solab.util
 
AlarmHash() - Constructor for class com.solab.util.AlarmHash
 
AlarmSender - Interface in com.solab.alarms
This interface is used to connect to an AlarmSenderImpl instance over RMI, JNDI, etc.
AlarmSenderImpl - Class in com.solab.alarms
This is the central class for jAlarms.
AlarmSenderImpl() - Constructor for class com.solab.alarms.AlarmSenderImpl
 

B

Base64 - Class in com.solab.util
A Simple utility to encode byte arrays into Base64 strings and decode Base64 strings into byte arrays.
Base64() - Constructor for class com.solab.util.Base64
 
base64Decode(String) - Static method in class com.solab.util.Base64
Decodifica una cadena de base 64.
base64Encode(byte[], int, int) - Static method in class com.solab.util.Base64
Codifica un arreglo de bytes a base 64.

C

com.solab.alarms - package com.solab.alarms
This package contains the main classes and interfaces for the library, as well as the main class, AlarmSender.
com.solab.alarms.channels - package com.solab.alarms.channels
This package contains concrete implementations for different AlarmChannels which do not have any external dependencies.
com.solab.alarms.channels.twitter - package com.solab.alarms.channels.twitter
This package contains the TwitterChannel component and the TwitterAuth program.
com.solab.alarms.util - package com.solab.alarms.util
 
com.solab.util - package com.solab.util
This package contains utility and convenience classes for use throughout the rest of the jAlarms library.
CommandLineChannel - Class in com.solab.alarms.channels
This alarm channel executes a command-line program, either passing the alarm message as a parameter to it as an argument of ${alarm}, or feeding the alarm message to its STDIN.
CommandLineChannel() - Constructor for class com.solab.alarms.channels.CommandLineChannel
 
createSendTask(String, String) - Method in class com.solab.alarms.AbstractAlarmChannel
Subclasses need to create and return a new Runnable in each call to this method.
createSendTask(String, String) - Method in class com.solab.alarms.channels.CommandLineChannel
 
createSendTask(String, String) - Method in class com.solab.alarms.channels.HttpChannel
 
createSendTask(String, String) - Method in class com.solab.alarms.channels.TestChannel
 
createSendTask(String, String) - Method in class com.solab.alarms.channels.twitter.TwitterChannel
 

D

DefaultAlarmCache - Class in com.solab.alarms
This is the default cache, which uses a map to store the last date a message was sent for a given channel/msg/source cobination.
DefaultAlarmCache() - Constructor for class com.solab.alarms.DefaultAlarmCache
 

G

getAlarmTimeBuffer() - Method in class com.solab.alarms.AlarmSenderImpl
 
getApiUrl() - Method in class com.solab.alarms.channels.twitter.TwitterChannel
 
getDefaultInterval() - Method in class com.solab.alarms.DefaultAlarmCache
 
getMinResendInterval() - Method in class com.solab.alarms.AbstractAlarmChannel
Returns the minimum amount of time that must elapse before a previously sent alarm message can be sent again.
getMinResendInterval() - Method in interface com.solab.alarms.AlarmChannel
Returns the minimum time interval to resend the same message through this channel.
getStatus() - Method in class com.solab.alarms.AlarmSenderImpl
 

H

hash(String) - Static method in class com.solab.util.AlarmHash
Returns a MD5 hash of the specified message.
hasSource(String) - Method in class com.solab.alarms.AbstractAlarmChannel
This method is used to determine if a certain alarm channel has a special condition for the specified alarmSource or not.
hasSource(String) - Method in class com.solab.alarms.channels.CommandLineChannel
 
hasSource(String) - Method in class com.solab.alarms.channels.HttpChannel
 
hasSource(String) - Method in class com.solab.alarms.channels.TestChannel
 
hasSource(String) - Method in class com.solab.alarms.channels.twitter.TwitterChannel
 
HttpChannel - Class in com.solab.alarms.channels
This channel can send an alarm over an HTTP GET or POST request.
HttpChannel() - Constructor for class com.solab.alarms.channels.HttpChannel
 

I

init() - Method in class com.solab.alarms.AlarmSenderImpl
Sets up a ScheduledExecutorService if necessary, to buffer alarm messages that are supposed to be sent always.
init() - Method in class com.solab.alarms.channels.HttpChannel
Initializes the cached URL if the URL value has no alarm or source variables, and validates that there is postData if the URL is going to be cached.
init() - Method in class com.solab.alarms.channels.twitter.TwitterChannel
Initializes the component.

L

log - Variable in class com.solab.alarms.AbstractAlarmChannel
 

M

main(String[]) - Static method in class com.solab.alarms.channels.twitter.TwitterAuth
 

N

NamedThreadFactory - Class in com.solab.util
A ThreadFactory for Executors that will name threads with the given prefix.
NamedThreadFactory(String) - Constructor for class com.solab.util.NamedThreadFactory
 
newThread(Runnable) - Method in class com.solab.util.NamedThreadFactory
 

R

replaceAll(String, String, String) - Static method in class com.solab.alarms.util.Utils
Replaces all occurrences of var with value, inside the specified string.
replaceAll(StringBuilder, String, String) - Static method in class com.solab.alarms.util.Utils
 

S

send(String, String) - Method in class com.solab.alarms.AbstractAlarmChannel
Sends an alarm message for the specified source.
send(String, String) - Method in interface com.solab.alarms.AlarmChannel
Sends the alarm message to the users defined for the channel.
sendAlarm(String, String) - Method in interface com.solab.alarms.AlarmSender
Sends an alarm through all channels, to the users defined for the specified source in each channel, as long as the message hasn't been already sent very recently.
sendAlarm(String) - Method in interface com.solab.alarms.AlarmSender
Sends an alarm through all channels, to the default users defined for each channel, as long as the message hasn't been already sent very recently.
sendAlarm(String, String) - Method in class com.solab.alarms.AlarmSenderImpl
Sends an alarm through all channels, to the users defined for the specified source in each channel, as long as the message hasn't been already sent very recently.
sendAlarm(String) - Method in class com.solab.alarms.AlarmSenderImpl
Sends an alarm through all channels, to the default users defined for each channel, as long as the message hasn't been already sent very recently.
sendAlarmAlways(String, String) - Method in interface com.solab.alarms.AlarmSender
Sends an alarm through all channels, to the users defined for the specified source in each channel, regardless of the last time the same message was sent.
sendAlarmAlways(String) - Method in interface com.solab.alarms.AlarmSender
Sends an alarm through all channels, to the default users defined for each channel, regardless of the last time the same message was sent.
sendAlarmAlways(String, String) - Method in class com.solab.alarms.AlarmSenderImpl
Sends an alarm through all channels, to the users defined for the specified source in each channel, regardless of the last time the same message was sent.
sendAlarmAlways(String) - Method in class com.solab.alarms.AlarmSenderImpl
Sends an alarm through all channels, to the default users defined for each channel, regardless of the last time the same message was sent.
sendCachedAlarms() - Method in class com.solab.alarms.AlarmSenderImpl
Sends the alarms that have been cached, if the conditions are right.
setAccessToken(String) - Method in class com.solab.alarms.channels.twitter.TwitterChannel
Sets the access token obtained with the TwitterAuth program; this allows jAlarms to post status updates to the twitter account set up for the alarms.
setAlarmCache(AlarmCache) - Method in class com.solab.alarms.AlarmSenderImpl
Sets the cache to use for alarm messages.
setAlarmChannels(List<AlarmChannel>) - Method in class com.solab.alarms.AlarmSenderImpl
Sets the alarm channels to be used for sending alarm messages.
setAlarmSource(Set<String>) - Method in class com.solab.alarms.channels.HttpChannel
You can set a list of sources in this property so that only alarm messages matching any of the sources are be posted as status updates.
setAlarmSource(String) - Method in class com.solab.alarms.channels.TestChannel
Sets a value that will be matched against the sources received in TestChannel.createSendTask(String, String); by default it's null so that all alarms are printed out, but you can set a value here to print only the messages from the specified source.
setAlarmSource(Set<String>) - Method in class com.solab.alarms.channels.twitter.TwitterChannel
You can set a list of sources in this property so that only alarm messages matching any of the sources are be posted as status updates.
setAlarmTimeBuffer(int) - Method in class com.solab.alarms.AlarmSenderImpl
Sets the time in milliseconds that the alarms sent via AlarmSenderImpl.sendAlarmAlways(String, String) are buffered before actually sending them.
setAllowSynchronousSend(boolean) - Method in class com.solab.alarms.AbstractAlarmChannel
Allow synchronous sending of alarms, if the thread pool for a channel rejects asynchronous execution.
setApiUrl(String) - Method in class com.solab.alarms.channels.twitter.TwitterChannel
Sets the Twitter API URL to update the user's status.
setCommand(String) - Method in class com.solab.alarms.channels.CommandLineChannel
Sets the command to execute, as a single statement to be execute.
setCommandsBySource(Map<String, String>) - Method in class com.solab.alarms.channels.CommandLineChannel
Sets a map with different commands to be executed depending on the alarm source.
setCommandsWithArgsBySource(Map<String, String[]>) - Method in class com.solab.alarms.channels.CommandLineChannel
Sets a map with different commands to be executed depending on the alarm source.
setCommandWithArgs(List<String>) - Method in class com.solab.alarms.channels.CommandLineChannel
Sets the command to execute, with each argument as a separate element.
setConnectTimeout(int) - Method in class com.solab.alarms.channels.twitter.TwitterChannel
Sets the connection timeout, in milliseconds.
setDefaultInterval(int) - Method in class com.solab.alarms.DefaultAlarmCache
Sets the default resend interval, for storing alarms unrelated to a specific channel, in milliseconds.
setExpectedResponse(String) - Method in class com.solab.alarms.channels.HttpChannel
If this property is set, the channel waits for a response and scans it for this particular string, warning if not found.
setMinResendInterval(int) - Method in class com.solab.alarms.AbstractAlarmChannel
Sets the minimum amount of time between equal messsages.
setPostData(String) - Method in class com.solab.alarms.channels.HttpChannel
Sets the POST data for the HTTP request.
setPrefix(String) - Method in class com.solab.alarms.channels.twitter.TwitterChannel
This is an optional property; you can set a prefix to be used in all the status updates; this is useful in cases where you need to use the same Twitter account for more than one application, so you can tell which one sent the alarm.
setReadTimeout(int) - Method in class com.solab.alarms.channels.twitter.TwitterChannel
Sets the timeout to wait for a response, in milliseconds.
setTokenSecret(String) - Method in class com.solab.alarms.channels.twitter.TwitterChannel
Sets the token secret obtained with the TwitterAuth program; this allows jAlarms to post status updates to the twitter account set up for the alarms.
setUrl(String) - Method in class com.solab.alarms.channels.HttpChannel
Sets the URL to send the alarm to.
shouldResend(AlarmChannel, String, String) - Method in interface com.solab.alarms.AlarmCache
This method returns true if the specified message with optional source has not been sent through the specified channel very recently (meaning the resend interval for the channel has elapsed).
shouldResend(AlarmChannel, String, String) - Method in class com.solab.alarms.DefaultAlarmCache
 
shutdown() - Method in class com.solab.alarms.AbstractAlarmChannel
Shuts down the thread pool and rejects any more incoming alarms.
shutdown() - Method in interface com.solab.alarms.AlarmCache
Subclasses must override this, closing and freeing up any resources they use (connections, etc).
shutdown() - Method in interface com.solab.alarms.AlarmChannel
Shuts the channel down, closing any open connections it has and freeing up all its resources.
shutdown() - Method in class com.solab.alarms.AlarmSenderImpl
Shuts down all channels, and the alarm cache.
shutdown() - Method in class com.solab.alarms.DefaultAlarmCache
 
store(AlarmChannel, String, String) - Method in interface com.solab.alarms.AlarmCache
Stores the current date for the specified message and optional source, for the given channel.
store(AlarmChannel, String, String) - Method in class com.solab.alarms.DefaultAlarmCache
 

T

TestChannel - Class in com.solab.alarms.channels
A very simple alarm channel that only prints the alarm messages to STDOUT.
TestChannel() - Constructor for class com.solab.alarms.channels.TestChannel
 
toString() - Method in class com.solab.alarms.DefaultAlarmCache
 
TwitterAuth - Class in com.solab.alarms.channels.twitter
This small program must be used to associate the Twitter account for your app with the jAlarms library, so that jAlarms can update the status of the account.
TwitterAuth() - Constructor for class com.solab.alarms.channels.twitter.TwitterAuth
 
TwitterChannel - Class in com.solab.alarms.channels.twitter
A channel that uses Twitter to publish alarms.
TwitterChannel() - Constructor for class com.solab.alarms.channels.twitter.TwitterChannel
 

U

Utils - Class in com.solab.alarms.util
A class containing some utility functions.
Utils() - Constructor for class com.solab.alarms.util.Utils
 
A B C D G H I L M N R S T U