com.solab.alarms
Interface AlarmChannel

All Known Implementing Classes:
AbstractAlarmChannel, CommandLineChannel, HttpChannel, TestChannel, TwitterChannel

public interface AlarmChannel

This interface defines the behavior of an alarm channel. Alarm channels are used by the AlarmSender. An AlarmChannel can have a default user list, and it can also send messages to specific users for certain cases.

Author:
Enrique Zamudio

Method Summary
 int getMinResendInterval()
          Returns the minimum time interval to resend the same message through this channel.
 void send(String msg, String source)
          Sends the alarm message to the users defined for the channel.
 void shutdown()
          Shuts the channel down, closing any open connections it has and freeing up all its resources.
 

Method Detail

send

void send(String msg,
          String source)
Sends the alarm message to the users defined for the channel.

Parameters:
msg - The alarm message to be sent.
source - The alarm source. A channel can send the alarm to different recipients depending on the source. This parameter can be null, which means that it should be sent to the default recipients for the channel.

getMinResendInterval

int getMinResendInterval()
Returns the minimum time interval to resend the same message through this channel. An interval of 0 or a negative number means that the same message will always be sent. This interval is specified in milliseconds.


shutdown

void shutdown()
Shuts the channel down, closing any open connections it has and freeing up all its resources. Once this method is invoked on a channel, the channel should not be used again.



Copyright © 2011 Java Mexico. All Rights Reserved.