com.bigdata.counters.httpd
Class DummyEventReportingService

java.lang.Object
  extended by com.bigdata.service.EventReceiver
      extended by com.bigdata.counters.httpd.DummyEventReportingService
All Implemented Interfaces:
IEventReceivingService, IEventReportingService, IService, Remote

public class DummyEventReportingService
extends EventReceiver
implements IService

A dummy implementation of the IEventReportingService interface, used for testing the HTTP telemtry service.

Version:
$Id: DummyEventReportingService.java 2265 2009-10-26 12:51:06Z thompsonbry $
Author:
Mike Personick

Nested Class Summary
 
Nested classes/interfaces inherited from class com.bigdata.service.EventReceiver
EventReceiver.EventBTree
 
Field Summary
 
Fields inherited from class com.bigdata.service.EventReceiver
eventCache, eventHistoryMillis, log, ndx
 
Constructor Summary
DummyEventReportingService()
          Construct with an empty set of events
 
Method Summary
 void destroy()
          Destroy the service.
 String getHostname()
          The host on which this service is running.
 Class getServiceIface()
          Return the most interesting interface for the service.
 String getServiceName()
          Return name by which a user might recognize this service.
 UUID getServiceUUID()
          The unique identifier for this service.
 void readCSV(BufferedReader reader)
          Parse a CSV file into a LinkedHashMap of events.
 
Methods inherited from class com.bigdata.service.EventReceiver
getWriteLock, logEvent, notifyEvent, pruneHistory, rangeCount, rangeIterator
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DummyEventReportingService

public DummyEventReportingService()
Construct with an empty set of events

Method Detail

readCSV

public void readCSV(BufferedReader reader)
             throws IOException
Parse a CSV file into a LinkedHashMap of events. The CSV file is assumed to be tab-delimited, have one event per row, and follow the schema implied by Event.getHeader().

Parameters:
reader - a reader for the CSV file
Throws:
IOException

getHostname

public String getHostname()
                   throws IOException
Description copied from interface: IService
The host on which this service is running.

Specified by:
getHostname in interface IService
Throws:
IOException - since you can use this method with RMI.

getServiceIface

public Class getServiceIface()
                      throws IOException
Description copied from interface: IService
Return the most interesting interface for the service.

Specified by:
getServiceIface in interface IService
Throws:
IOException - since you can use this method with RMI.

getServiceName

public String getServiceName()
                      throws IOException
Description copied from interface: IService
Return name by which a user might recognize this service.

Specified by:
getServiceName in interface IService
Throws:
IOException - since you can use this method with RMI.

getServiceUUID

public UUID getServiceUUID()
                    throws IOException
Description copied from interface: IService
The unique identifier for this service.

Note: Some service discovery frameworks (Jini) will assign the service a UUID asynchronously after a new service starts, in which case this method will return null until the service UUID has been assigned.

Specified by:
getServiceUUID in interface IService
Returns:
The unique data service identifier.
Throws:
IOException - since you can use this method with RMI.

destroy

public void destroy()
Description copied from interface: IService
Destroy the service. If the service is running, it is shutdown immediately and then destroyed. This method has the same signature as DestroyAdmin.destroy().

Specified by:
destroy in interface IService


Copyright © 2006-2011 SYSTAP, LLC. All Rights Reserved.