org.rhq.plugins.twitter
Class TwitterComponent

java.lang.Object
  extended by org.rhq.plugins.twitter.TwitterComponent
All Implemented Interfaces:
AvailabilityFacet, ResourceComponent, MeasurementFacet, OperationFacet

public class TwitterComponent
extends Object
implements ResourceComponent, OperationFacet, MeasurementFacet

Implementation of the Twitter subsystem functionality. Most work is done in the children. This component allows to post tweets and to monitor the users timeline when username and password are given.

Author:
Heiko W. Rupp

Constructor Summary
TwitterComponent()
           
 
Method Summary
 AvailabilityType getAvailability()
          Return availability of this resource
protected  String getSearchUrl()
           
protected  String getServerUrl()
           
 void getValues(MeasurementReport report, Set<MeasurementScheduleRequest> metrics)
          Gather measurement data
 OperationResult invokeOperation(String name, Configuration configuration)
          Implementation of the OperationFacet Sends a tweet
 void start(ResourceContext context)
          Start the resource connection
 void stop()
          Tear down the rescource connection
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TwitterComponent

public TwitterComponent()
Method Detail

getAvailability

public AvailabilityType getAvailability()
Return availability of this resource

Specified by:
getAvailability in interface AvailabilityFacet
See Also:
AvailabilityFacet.getAvailability()

start

public void start(ResourceContext context)
           throws Exception
Start the resource connection

Specified by:
start in interface ResourceComponent
Throws:
Exception
See Also:
ResourceComponent.start(org.rhq.core.pluginapi.inventory.ResourceContext)

stop

public void stop()
Tear down the rescource connection

Specified by:
stop in interface ResourceComponent
See Also:
ResourceComponent.stop()

getValues

public void getValues(MeasurementReport report,
                      Set<MeasurementScheduleRequest> metrics)
               throws Exception
Gather measurement data

Specified by:
getValues in interface MeasurementFacet
Throws:
Exception
See Also:
MeasurementFacet.getValues(org.rhq.core.domain.measurement.MeasurementReport, java.util.Set)

invokeOperation

public OperationResult invokeOperation(String name,
                                       Configuration configuration)
                                throws Exception
Implementation of the OperationFacet Sends a tweet

Specified by:
invokeOperation in interface OperationFacet
Parameters:
name - the name of the operation
configuration - parameters of the operation
Returns:
result of the operation
Throws:
Exception - If anything goes wrong

getServerUrl

protected String getServerUrl()

getSearchUrl

protected String getSearchUrl()


Copyright © 2008-2011 Red Hat, Inc.. All Rights Reserved.