JXTA

net.jxta.impl.endpoint.transportMeter
Class TransportServiceMetric

java.lang.Object
  extended by net.jxta.impl.endpoint.transportMeter.TransportServiceMetric
All Implemented Interfaces:
ServiceMetric, DocumentSerializable

public class TransportServiceMetric
extends Object
implements ServiceMetric

The Service Monitor Metric for the Transport Services


Constructor Summary
TransportServiceMetric()
           
 
Method Summary
 void addTransportMetric(TransportMetric transportMetric)
          Append a Transport Metric
 TransportServiceMetric deepCopy(TransportServiceMonitorFilter transportServiceMonitorFilter)
          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
 ModuleClassID getModuleClassID()
          getModuleClassID
 TransportMetric getTransportMetric(String protocol, EndpointAddress endpointAddress)
          Get the Transport Metric for a specific Transport Type
 TransportMetric getTransportMetric(TransportMetric prototype)
          Get the Transport Metric for a specific Transport Type
 Iterator<TransportMetric> getTransportMetrics()
          Get all Transport Metrics
 void init(ModuleClassID moduleClassID)
          init
 void initializeFrom(Element element)
          
 void mergeMetrics(ServiceMetric serviceMetric)
          Additively Merge Metrics from this Metric
 void mergeMetrics(ServiceMetric serviceMetric, TransportServiceMonitorFilter transportServiceMonitorFilter)
           
 void serializeTo(Element element)
          
 TransportServiceMetric shallowCopy(TransportServiceMonitorFilter transportServiceMonitorFilter)
          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

TransportServiceMetric

public TransportServiceMetric()
Method Detail

init

public void init(ModuleClassID moduleClassID)
init

Specified by:
init in interface ServiceMetric

getModuleClassID

public ModuleClassID getModuleClassID()
getModuleClassID

Specified by:
getModuleClassID in interface ServiceMetric
Returns:
ModuleClassID

addTransportMetric

public void addTransportMetric(TransportMetric transportMetric)
Append a Transport Metric

Parameters:
transportMetric - metric to add

getTransportMetrics

public Iterator<TransportMetric> getTransportMetrics()
Get all Transport Metrics

Returns:
iterator of all transport metrics

getTransportMetric

public TransportMetric getTransportMetric(String protocol,
                                          EndpointAddress endpointAddress)
Get the Transport Metric for a specific Transport Type

Parameters:
protocol - protocol name
endpointAddress - address
Returns:
a Transport Metric for a specific Transport Type

getTransportMetric

public TransportMetric getTransportMetric(TransportMetric prototype)
Get the Transport Metric for a specific Transport Type

Parameters:
prototype - a similar Transport metric object (ie same protocol/endpointAddress)
Returns:
a Transport Metric for a specific Transport Type
See Also:
getTransportMetric(String, EndpointAddress)

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

shallowCopy

public TransportServiceMetric shallowCopy(TransportServiceMonitorFilter transportServiceMonitorFilter)
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:
transportServiceMonitorFilter - Filter designates constituant parts to be included
Returns:
a copy of this metric with references to the designated parts

mergeMetrics

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

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

mergeMetrics

public void mergeMetrics(ServiceMetric serviceMetric,
                         TransportServiceMonitorFilter transportServiceMonitorFilter)
Parameters:
serviceMetric -
transportServiceMonitorFilter -

deepCopy

public TransportServiceMetric deepCopy(TransportServiceMonitorFilter transportServiceMonitorFilter)
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:
transportServiceMonitorFilter - Filter designates constituant parts to be included
Returns:
a copy of this metric with references to the designated parts

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

JXSE