JXTA

net.jxta.impl.endpoint.transportMeter
Class TransportServiceMonitor

java.lang.Object
  extended by net.jxta.impl.meter.GenericServiceMonitor
      extended by net.jxta.impl.endpoint.transportMeter.TransportServiceMonitor
All Implemented Interfaces:
ServiceMonitorImpl, ServiceMonitor, Module

public class TransportServiceMonitor
extends GenericServiceMonitor

The Service Monitor Metric for the Transport Services

Each Transport will register with this to create their own TransportMeter


Field Summary
 
Fields inherited from class net.jxta.impl.meter.GenericServiceMonitor
cumulativeServiceMetric, deltaServiceMetrics, implAdvertisement, monitorManager, reportRate, reportRateIndex
 
Fields inherited from interface net.jxta.platform.Module
START_AGAIN_PROGRESS, START_AGAIN_STALLED, START_DISABLED, START_OK
 
Constructor Summary
TransportServiceMonitor()
           
 
Method Summary
protected  ServiceMetric collectServiceMetrics()
          Get the service metrics accrued since the last pulse
 TransportMeter createTransportMeter(String protocol, EndpointAddress endpointAddress)
          Create a service TransportMeter for a registerd Transport Type
 TransportMeter createTransportMeter(String protocol, String sourceAddressString)
          Deprecated. use #createTransportMeter(String, EndpointAddress)
 ServiceMetric getCumulativeServiceMetric(ServiceMonitorFilter serviceMonitorFilter, long fromTime, long toTime)
          Get ServiceMetrics since the start (or last reset time) of this ServiceMonitor.
 ServiceMetric getServiceMetric(ServiceMonitorFilter serviceMonitorFilter, long fromTime, long toTime, int pulseIndex, long reportRate)
          Get ServiceMetrics accrued in during this pulse interval
protected  void init()
          
 
Methods inherited from class net.jxta.impl.meter.GenericServiceMonitor
beginCumulativeReport, beginPulse, createServiceMetric, createSupportedCumulativeServiceMonitorFilter, createSupportedServiceMonitorFilter, destroy, endCumulativeReport, endPulse, getCumulativeServiceMetric, getModuleClassID, getPeerGroup, init, init, resetPulseRate, serviceMonitorFilterDeregistered, serviceMonitorFilterRegistered, startApp, stopApp, validateCumulativeServiceMonitorFilter, validateServiceMonitorFilter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TransportServiceMonitor

public TransportServiceMonitor()
Method Detail

init

protected void init()

Overrides:
init in class GenericServiceMonitor

createTransportMeter

@Deprecated
public TransportMeter createTransportMeter(String protocol,
                                                      String sourceAddressString)
Deprecated. use #createTransportMeter(String, EndpointAddress)

Create a service TransportMeter for a registerd Transport Type

Parameters:
protocol - protocol identifier
sourceAddressString - source address string
Returns:
a TransportMeter

createTransportMeter

public TransportMeter createTransportMeter(String protocol,
                                           EndpointAddress endpointAddress)
Create a service TransportMeter for a registerd Transport Type

Parameters:
protocol - Descriptive name of protocol
endpointAddress - The common public address for this transport
Returns:
Transport Meter for this transport

collectServiceMetrics

protected ServiceMetric collectServiceMetrics()
Get the service metrics accrued since the last pulse

Specified by:
collectServiceMetrics in class GenericServiceMonitor
Returns:
null if there were no metrices since the last call

getServiceMetric

public ServiceMetric getServiceMetric(ServiceMonitorFilter serviceMonitorFilter,
                                      long fromTime,
                                      long toTime,
                                      int pulseIndex,
                                      long reportRate)
Get ServiceMetrics accrued in during this pulse interval

Specified by:
getServiceMetric in interface ServiceMonitor
Overrides:
getServiceMetric in class GenericServiceMonitor
Parameters:
serviceMonitorFilter - Filter Metrics based upon this MonitorFilter
fromTime - Beginning time as determined by the MonitorManager
toTime - Ending time as determined by the MonitorManager
pulseIndex - Pulse Index of the reporting rate Pyramid
reportRate - Reporting Rate (corresponding to the PulseNumber's index)

getCumulativeServiceMetric

public ServiceMetric getCumulativeServiceMetric(ServiceMonitorFilter serviceMonitorFilter,
                                                long fromTime,
                                                long toTime)
Get ServiceMetrics since the start (or last reset time) of this ServiceMonitor. Calls to this will only occurr between calls to beginCumulativeReport() and endCumulativeReport()

Specified by:
getCumulativeServiceMetric in interface ServiceMonitor
Overrides:
getCumulativeServiceMetric in class GenericServiceMonitor
Parameters:
serviceMonitorFilter - Filter Metrics based upon this MonitorFilter
fromTime - Beginning time as determined by the MonitorManager
toTime - Ending time as determined by the MonitorManager
See Also:
ServiceMonitor.beginCumulativeReport(), ServiceMonitor.endCumulativeReport()

JXSE