org.opennms.netmgt.notifd
Class MicroblogNotificationStrategy

java.lang.Object
  extended by org.opennms.netmgt.notifd.MicroblogNotificationStrategy
All Implemented Interfaces:
NotificationStrategy
Direct Known Subclasses:
MicroblogDMNotificationStrategy, MicroblogReplyNotificationStrategy

public class MicroblogNotificationStrategy
extends Object
implements NotificationStrategy

Send notifications to a TwitterAPI-compatible microblog service.

Version:
$Id: $
Author:
Jeff Gehlbach, OpenNMS, Jeff Gehlbach, OpenNMS

Field Summary
protected  MicroblogConfigurationDao m_configDao
           
protected  MicroblogConfigurationDao m_microblogConfigurationDao
           
 
Constructor Summary
MicroblogNotificationStrategy()
          Constructor for MicroblogNotificationStrategy.
MicroblogNotificationStrategy(org.springframework.core.io.Resource configResource)
          Constructor for MicroblogNotificationStrategy.
 
Method Summary
protected  String buildMessageBody(List<Argument> arguments)
          buildMessageBody
protected  twitter4j.Twitter buildUblogService(List<Argument> arguments)
          buildUblogService
protected static org.springframework.core.io.Resource findDefaultConfigResource()
          findDefaultConfigResource
protected  String findDestName(List<Argument> arguments)
          findDestName
 MicroblogConfigurationDao getMicroblogConfigurationDao()
          getMicroblogConfigurationDao
protected  ThreadCategory log()
          log
 int send(List<Argument> arguments)
          send
 void setMicroblogConfigurationDao(MicroblogConfigurationDao dao)
          setMicroblogConfigurationDao
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_microblogConfigurationDao

protected MicroblogConfigurationDao m_microblogConfigurationDao

m_configDao

protected MicroblogConfigurationDao m_configDao
Constructor Detail

MicroblogNotificationStrategy

public MicroblogNotificationStrategy()
                              throws IOException

Constructor for MicroblogNotificationStrategy.

Throws:
IOException - if any.

MicroblogNotificationStrategy

public MicroblogNotificationStrategy(org.springframework.core.io.Resource configResource)

Constructor for MicroblogNotificationStrategy.

Parameters:
configResource - a Resource object.
Method Detail

send

public int send(List<Argument> arguments)

send

Specified by:
send in interface NotificationStrategy
Parameters:
arguments - a List object.
Returns:
a int.

buildUblogService

protected twitter4j.Twitter buildUblogService(List<Argument> arguments)

buildUblogService

Parameters:
arguments - a List object.
Returns:
a Twitter object.

buildMessageBody

protected String buildMessageBody(List<Argument> arguments)

buildMessageBody

Parameters:
arguments - a List object.
Returns:
a String object.

log

protected ThreadCategory log()

log

Returns:
a ThreadCategory object.

findDestName

protected String findDestName(List<Argument> arguments)

findDestName

Parameters:
arguments - a List object.
Returns:
a String object.

findDefaultConfigResource

protected static org.springframework.core.io.Resource findDefaultConfigResource()
                                                                         throws IOException

findDefaultConfigResource

Returns:
a Resource object.
Throws:
IOException - if any.

setMicroblogConfigurationDao

public void setMicroblogConfigurationDao(MicroblogConfigurationDao dao)

setMicroblogConfigurationDao

Parameters:
dao - a MicroblogConfigurationDao object.

getMicroblogConfigurationDao

public MicroblogConfigurationDao getMicroblogConfigurationDao()

getMicroblogConfigurationDao

Returns:
a MicroblogConfigurationDao object.


Copyright © 2011. All Rights Reserved.