JXTA

net.jxta.impl.rendezvous.rendezvousMeter
Class RendezvousServiceMetric

java.lang.Object
  extended by net.jxta.impl.rendezvous.rendezvousMeter.RendezvousServiceMetric
All Implemented Interfaces:
ServiceMetric, DocumentSerializable

public class RendezvousServiceMetric
extends Object
implements ServiceMetric

The Service Monitor Metric for the standard Rendezvous Service


Constructor Summary
RendezvousServiceMetric()
          Create a Service Metric: No-arg constructor is required
 
Method Summary
 void addClientConnectionMetric(ClientConnectionMetric clientConnectionMetric)
          Append a Client Connection Metric
 void addRendezvousConnectionMetric(RendezvousConnectionMetric rendezvousConnectionMetric)
          Append a Rendezvous Connection Metric
(package private)  void clearClientConnectionMetrics()
           
(package private)  void clearRendezvousConnectionMetrics()
           
 RendezvousServiceMetric deepCopy(RendezvousServiceMonitorFilter rendezvousServiceMonitorFilter)
          Make a deep copy of this metric only including the portions designated in the Filter The resulting metric is Safe to modify without danger to the underlying Monitor Metrics
 void diffMetrics(ServiceMetric otherOne)
          Subtractively Remove Metrics from this Metric
 ClientConnectionMetric getClientConnectionMetric(PeerID peerId)
          Get the Client Connection Metrics for a single Peers ID
 Iterator getClientConnectionMetrics()
          Get all the Client Connection Metrics
 ModuleClassID getModuleClassID()
          Get the ModuleClassID of the Monitor that generated this ServiceMetric
 RendezvousConnectionMetric getRendezvousConnectionMetric(PeerID peerID)
          Get the Rendezvous Connection Metrics for each Peers ID
 Iterator getRendezvousConnectionMetrics()
          Get all the Rendezvous Connection Metrics
 RendezvousMetric getRendezvousMetric()
          Get the General Rendezvous Metric
 void init(ModuleClassID moduleClassID)
          Initialize the metric with the ModuleClassID of the Monitor
 void initializeFrom(Element element)
          
 void mergeMetrics(ServiceMetric otherServiceMetric)
          Additively Merge Metrics from this Metric
 void mergeMetrics(ServiceMetric otherServiceMetric, boolean includeRendezvousMetric, boolean includeClientConnectionMetrics, boolean includeRendezvousConnectionMetrics)
           This will only merge the designated submetrics
 void serializeTo(Element element)
          
(package private)  void setRendezvousMetric(RendezvousMetric rendezvousMetric)
           
 RendezvousServiceMetric shallowCopy(RendezvousServiceMonitorFilter rendezvousServiceMonitorFilter)
          Make a shallow copy of this metric only including the portions designated in the Filter Note: since this is a shallow copy it is dangerous to modify the submetrics
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RendezvousServiceMetric

public RendezvousServiceMetric()
Create a Service Metric: No-arg constructor is required

Method Detail

init

public void init(ModuleClassID moduleClassID)
Initialize the metric with the ModuleClassID of the Monitor

Specified by:
init in interface ServiceMetric

getModuleClassID

public ModuleClassID getModuleClassID()
Get the ModuleClassID of the Monitor that generated this ServiceMetric

Specified by:
getModuleClassID in interface ServiceMetric
Returns:
ModuleClassID

getRendezvousMetric

public RendezvousMetric getRendezvousMetric()
Get the General Rendezvous Metric


setRendezvousMetric

void setRendezvousMetric(RendezvousMetric rendezvousMetric)

addClientConnectionMetric

public void addClientConnectionMetric(ClientConnectionMetric clientConnectionMetric)
Append a Client Connection Metric


getClientConnectionMetrics

public Iterator getClientConnectionMetrics()
Get all the Client Connection Metrics


clearClientConnectionMetrics

void clearClientConnectionMetrics()

getClientConnectionMetric

public ClientConnectionMetric getClientConnectionMetric(PeerID peerId)
Get the Client Connection Metrics for a single Peers ID


addRendezvousConnectionMetric

public void addRendezvousConnectionMetric(RendezvousConnectionMetric rendezvousConnectionMetric)
Append a Rendezvous Connection Metric


getRendezvousConnectionMetrics

public Iterator getRendezvousConnectionMetrics()
Get all the Rendezvous Connection Metrics


clearRendezvousConnectionMetrics

void clearRendezvousConnectionMetrics()

getRendezvousConnectionMetric

public RendezvousConnectionMetric getRendezvousConnectionMetric(PeerID peerID)
Get the Rendezvous Connection Metrics for each Peers ID


serializeTo

public void serializeTo(Element element)
                 throws DocumentSerializationException

Specified by:
serializeTo in interface DocumentSerializable
Throws:
DocumentSerializationException

initializeFrom

public void initializeFrom(Element element)
                    throws DocumentSerializationException

Specified by:
initializeFrom in interface DocumentSerializable
Throws:
DocumentSerializationException

mergeMetrics

public void mergeMetrics(ServiceMetric otherServiceMetric)
Additively Merge Metrics from this Metric

Specified by:
mergeMetrics in interface ServiceMetric
Parameters:
otherServiceMetric - The metric being merged into this metric

deepCopy

public RendezvousServiceMetric deepCopy(RendezvousServiceMonitorFilter rendezvousServiceMonitorFilter)
Make a deep copy of this metric only including the portions designated in the Filter The resulting metric is Safe to modify without danger to the underlying Monitor Metrics

Parameters:
rendezvousServiceMonitorFilter - Filter designates constituant parts to be included
Returns:
a copy of this metric with references to the designated parts

mergeMetrics

public void mergeMetrics(ServiceMetric otherServiceMetric,
                         boolean includeRendezvousMetric,
                         boolean includeClientConnectionMetrics,
                         boolean includeRendezvousConnectionMetrics)

This will only merge the designated submetrics

Parameters:
includeRendezvousMetric - Include the basic Rendezvous Metric in the merge
includeClientConnectionMetrics - Include Client Connection Metrics in the merge
includeRendezvousConnectionMetrics - Include Rendezvous Connection Metrics in the merge

diffMetrics

public void diffMetrics(ServiceMetric otherOne)
Subtractively Remove Metrics from this Metric

Specified by:
diffMetrics in interface ServiceMetric
Parameters:
otherOne - The metric being removed into this metric

shallowCopy

public RendezvousServiceMetric shallowCopy(RendezvousServiceMonitorFilter rendezvousServiceMonitorFilter)
Make a shallow copy of this metric only including the portions designated in the Filter

Note: since this is a shallow copy it is dangerous to modify the submetrics

Parameters:
rendezvousServiceMonitorFilter - Filter designates constituant parts to be included
Returns:
a copy of this metric with references to the designated parts

JXSE