Project JXTA

net.jxta.impl.endpoint.transportMeter
Class TransportBindingMetric

java.lang.Object
  extended bynet.jxta.impl.endpoint.transportMeter.TransportBindingMetric
All Implemented Interfaces:
DocumentSerializable

public class TransportBindingMetric
extends Object
implements DocumentSerializable


Field Summary
static String CLOSED
           
static String CONNECTED
           
static String DROPPED
           
static String FAILED
           
 
Constructor Summary
TransportBindingMetric()
           
TransportBindingMetric(TransportBindingMeter transportBindingMeter, boolean initiatorConnected, boolean acceptorConnected)
           
TransportBindingMetric(TransportBindingMetric prototype)
           
 
Method Summary
(package private)  void connectionClosed(boolean initiator, long transitionTime)
           
(package private)  void connectionDropped(boolean initiator, long transitionTime)
           
(package private)  void connectionEstablished(boolean initiator, long timeToConnect, long transitionTime)
           
(package private)  void connectionFailed(boolean initiator, long timeToConnect, long transitionTime)
           
(package private)  void dataReceived(boolean initiator, int size)
           
(package private)  void dataSent(boolean initiator, long size)
           
 boolean equals(Object obj)
           
 int getAcceptorBytesReceived()
           
 int getAcceptorBytesSent()
           
 int getAcceptorConnections()
           
 int getAcceptorConnectionsClosed()
           
 int getAcceptorConnectionsDropped()
           
 int getAcceptorConnectionsFailed()
           
 int getAcceptorMessagesReceived()
           
 int getAcceptorMessagesSent()
           
 long getAcceptorReceiveFailureProcessingTime()
           
 int getAcceptorReceiveFailures()
           
 long getAcceptorReceiveProcessingTime()
           
 long getAcceptorSendFailureProcessingTime()
           
 int getAcceptorSendFailures()
           
 long getAcceptorSendProcessingTime()
           
 String getAcceptorState()
          State of this Acceptor Binding
 long getAcceptorTimeConnected()
          Get the duration of current connection relative to local clock (from transition time)

Note: This assumes the clocks are in sync with the reporting peer
 long getAcceptorTimeConnected(long adjustmentTime)
          Get the duration of current connection until the specified time
 long getAcceptorTimeToConnect()
           
 long getAcceptorTimeToFail()
           
 long getAcceptorTotalTimeConnected()
          Get the total time this intiated connection has been connected.
 long getAcceptorTotalTimeConnected(long adjustmentTime)
          Get the total time this initiating connection has been connected.
 long getAcceptorTransitionTime()
          Get the time that it entered the current state
 int getAverageAcceptorReceiveFailureProcessingTime()
           
 int getAverageAcceptorReceiveProcessingTime()
           
 int getAverageAcceptorSendFailureProcessingTime()
           
 int getAverageAcceptorSendProcessingTime()
           
 int getAverageAcceptorTimeToConnect()
           
 int getAverageAcceptorTimeToFail()
           
 int getAverageInitiatorReceiveFailureProcessingTime()
           
 int getAverageInitiatorReceiveProcessingTime()
           
 int getAverageInitiatorSendFailureProcessingTime()
           
 int getAverageInitiatorSendProcessingTime()
           
 int getAverageInitiatorTimeToConnect()
           
 int getAverageInitiatorTimeToFail()
           
 int getAveragePingFailedTime()
           
 int getAveragePingTime()
           
 int getAverageReceiveFailureProcessingTime()
           
 int getAverageReceiveProcessingTime()
           
 int getAverageSendFailureProcessingTime()
           
 int getAverageSendProcessingTime()
           
 int getAverageTimeToConnect()
           
 int getAverageTimeToFail()
           
 int getBytesReceived()
           
 int getBytesSent()
           
 int getConnections()
           
 int getConnectionsClosed()
           
 int getConnectionsDropped()
           
 int getConnectionsFailed()
           
 EndpointAddress getEndpointAddress()
           
 int getInitiatorBytesReceived()
           
 int getInitiatorBytesSent()
           
 int getInitiatorConnections()
           
 int getInitiatorConnectionsClosed()
           
 int getInitiatorConnectionsDropped()
           
 int getInitiatorConnectionsFailed()
           
 int getInitiatorMessagesReceived()
           
 int getInitiatorMessagesSent()
           
 long getInitiatorReceiveFailureProcessingTime()
           
 int getInitiatorReceiveFailures()
           
 long getInitiatorReceiveProcessingTime()
           
 long getInitiatorSendFailureProcessingTime()
           
 int getInitiatorSendFailures()
           
 long getInitiatorSendProcessingTime()
           
 String getInitiatorState()
          State of this Initiator Binding
 long getInitiatorTimeConnected()
          Get the duration of current connection relative to local clock (from transition time)

Note: This assumes the clocks are in sync with the reporting peer
 long getInitiatorTimeConnected(long adjustmentTime)
          Get the duration of current connection until the specified time
 long getInitiatorTimeToConnect()
           
 long getInitiatorTimeToFail()
           
 long getInitiatorTotalTimeConnected()
          Get the total time this intiated connection has been connected.
 long getInitiatorTotalTimeConnected(long adjustmentTime)
          Get the total time this initiating connection has been connected.
 long getInitiatorTransitionTime()
          Get the time that it entered the current state
 int getMessagesReceived()
           
 int getMessagesSent()
           
 int getNumFailedPings()
           
 int getNumPings()
           
 int getNumPingsReceived()
           
 PeerID getPeerID()
           
 long getPingFailedTime()
           
 long getPingTime()
           
 long getReceiveFailureProcessingTime()
           
 int getReceiveFailures()
           
 long getReceiveProcessingTime()
           
 long getSendFailureProcessingTime()
           
 int getSendFailures()
           
 long getSendProcessingTime()
           
 long getTimeAcceptorConnectionEstablished()
           
 long getTimeInitiatorConnectionEstablished()
           
 long getTimeToConnect()
           
 long getTimeToFail()
           
 long getTotalTimeConnected()
           
 int hashCode()
           
 void initializeFrom(Element element)
           
 boolean isAcceptorConnected()
           
 boolean isInitiatorConnected()
           
 void mergeMetrics(TransportBindingMetric other)
           
(package private)  void messageReceived(boolean initiator, Message message, long time, long size)
           
(package private)  void messageSent(boolean initiator, Message message, long time, long size)
           
(package private)  void ping(long time)
           
(package private)  void pingFailed(long time)
           
(package private)  void pingReceived()
           
(package private)  void receiveFailure(boolean initiator, long time, long size)
           
(package private)  void resetAcceptorState(String state, long transitionTime)
           
(package private)  void resetInitiatorState(String state, long transitionTime)
           
(package private)  void sendFailure(boolean initiator, Message message, long time, long size)
           
 void serializeTo(Element element)
           
 void setPeerID(PeerID peerID)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONNECTED

public static final String CONNECTED
See Also:
Constant Field Values

CLOSED

public static final String CLOSED
See Also:
Constant Field Values

DROPPED

public static final String DROPPED
See Also:
Constant Field Values

FAILED

public static final String FAILED
See Also:
Constant Field Values
Constructor Detail

TransportBindingMetric

public TransportBindingMetric(TransportBindingMeter transportBindingMeter,
                              boolean initiatorConnected,
                              boolean acceptorConnected)

TransportBindingMetric

public TransportBindingMetric()

TransportBindingMetric

public TransportBindingMetric(TransportBindingMetric prototype)
Method Detail

equals

public boolean equals(Object obj)

hashCode

public int hashCode()

getPeerID

public PeerID getPeerID()

setPeerID

public void setPeerID(PeerID peerID)

getEndpointAddress

public EndpointAddress getEndpointAddress()

getInitiatorState

public String getInitiatorState()
State of this Initiator Binding

Returns:
TransportBindingMetric.CONNECTED, TransportBindingMetric.DISCONNECTED or TransportBindingMetric.FAILED

getAcceptorState

public String getAcceptorState()
State of this Acceptor Binding

Returns:
TransportBindingMetric.CONNECTED, TransportBindingMetric.DISCONNECTED or TransportBindingMetric.FAILED

getInitiatorTransitionTime

public long getInitiatorTransitionTime()
Get the time that it entered the current state

Returns:
transition time in ms since January 1, 1970, 00:00:00 GMT

getAcceptorTransitionTime

public long getAcceptorTransitionTime()
Get the time that it entered the current state

Returns:
transition time in ms since January 1, 1970, 00:00:00 GMT

isAcceptorConnected

public boolean isAcceptorConnected()

isInitiatorConnected

public boolean isInitiatorConnected()

getTimeAcceptorConnectionEstablished

public long getTimeAcceptorConnectionEstablished()

getTimeInitiatorConnectionEstablished

public long getTimeInitiatorConnectionEstablished()

getAcceptorBytesReceived

public int getAcceptorBytesReceived()

getAcceptorBytesSent

public int getAcceptorBytesSent()

getAcceptorConnections

public int getAcceptorConnections()

getAcceptorConnectionsClosed

public int getAcceptorConnectionsClosed()

getAcceptorConnectionsDropped

public int getAcceptorConnectionsDropped()

getAcceptorConnectionsFailed

public int getAcceptorConnectionsFailed()

getAcceptorMessagesReceived

public int getAcceptorMessagesReceived()

getAcceptorMessagesSent

public int getAcceptorMessagesSent()

getAcceptorReceiveFailureProcessingTime

public long getAcceptorReceiveFailureProcessingTime()

getAcceptorReceiveFailures

public int getAcceptorReceiveFailures()

getAcceptorReceiveProcessingTime

public long getAcceptorReceiveProcessingTime()

getAcceptorSendFailureProcessingTime

public long getAcceptorSendFailureProcessingTime()

getAcceptorSendFailures

public int getAcceptorSendFailures()

getAcceptorSendProcessingTime

public long getAcceptorSendProcessingTime()

getAcceptorTimeToConnect

public long getAcceptorTimeToConnect()

getAcceptorTimeToFail

public long getAcceptorTimeToFail()

getInitiatorBytesReceived

public int getInitiatorBytesReceived()

getInitiatorBytesSent

public int getInitiatorBytesSent()

getInitiatorConnections

public int getInitiatorConnections()

getInitiatorConnectionsClosed

public int getInitiatorConnectionsClosed()

getInitiatorConnectionsDropped

public int getInitiatorConnectionsDropped()

getInitiatorConnectionsFailed

public int getInitiatorConnectionsFailed()

getInitiatorMessagesReceived

public int getInitiatorMessagesReceived()

getInitiatorMessagesSent

public int getInitiatorMessagesSent()

getInitiatorReceiveFailureProcessingTime

public long getInitiatorReceiveFailureProcessingTime()

getInitiatorReceiveFailures

public int getInitiatorReceiveFailures()

getInitiatorReceiveProcessingTime

public long getInitiatorReceiveProcessingTime()

getInitiatorSendFailureProcessingTime

public long getInitiatorSendFailureProcessingTime()

getInitiatorSendFailures

public int getInitiatorSendFailures()

getInitiatorSendProcessingTime

public long getInitiatorSendProcessingTime()

getInitiatorTimeToConnect

public long getInitiatorTimeToConnect()

getInitiatorTimeToFail

public long getInitiatorTimeToFail()

getNumPings

public int getNumPings()

getNumFailedPings

public int getNumFailedPings()

getPingTime

public long getPingTime()

getPingFailedTime

public long getPingFailedTime()

getNumPingsReceived

public int getNumPingsReceived()

getBytesReceived

public int getBytesReceived()

getBytesSent

public int getBytesSent()

getConnections

public int getConnections()

getConnectionsClosed

public int getConnectionsClosed()

getConnectionsDropped

public int getConnectionsDropped()

getConnectionsFailed

public int getConnectionsFailed()

getMessagesReceived

public int getMessagesReceived()

getMessagesSent

public int getMessagesSent()

getReceiveFailureProcessingTime

public long getReceiveFailureProcessingTime()

getReceiveFailures

public int getReceiveFailures()

getReceiveProcessingTime

public long getReceiveProcessingTime()

getSendFailureProcessingTime

public long getSendFailureProcessingTime()

getSendFailures

public int getSendFailures()

getSendProcessingTime

public long getSendProcessingTime()

getTotalTimeConnected

public long getTotalTimeConnected()

getTimeToConnect

public long getTimeToConnect()

getTimeToFail

public long getTimeToFail()

getAveragePingTime

public int getAveragePingTime()

getAveragePingFailedTime

public int getAveragePingFailedTime()

getAverageAcceptorReceiveFailureProcessingTime

public int getAverageAcceptorReceiveFailureProcessingTime()

getAverageAcceptorReceiveProcessingTime

public int getAverageAcceptorReceiveProcessingTime()

getAverageAcceptorSendFailureProcessingTime

public int getAverageAcceptorSendFailureProcessingTime()

getAverageAcceptorSendProcessingTime

public int getAverageAcceptorSendProcessingTime()

getAverageAcceptorTimeToConnect

public int getAverageAcceptorTimeToConnect()

getAverageAcceptorTimeToFail

public int getAverageAcceptorTimeToFail()

getAverageInitiatorReceiveFailureProcessingTime

public int getAverageInitiatorReceiveFailureProcessingTime()

getAverageInitiatorReceiveProcessingTime

public int getAverageInitiatorReceiveProcessingTime()

getAverageInitiatorSendFailureProcessingTime

public int getAverageInitiatorSendFailureProcessingTime()

getAverageInitiatorSendProcessingTime

public int getAverageInitiatorSendProcessingTime()

getAverageInitiatorTimeToConnect

public int getAverageInitiatorTimeToConnect()

getAverageInitiatorTimeToFail

public int getAverageInitiatorTimeToFail()

getAverageReceiveFailureProcessingTime

public int getAverageReceiveFailureProcessingTime()

getAverageReceiveProcessingTime

public int getAverageReceiveProcessingTime()

getAverageSendFailureProcessingTime

public int getAverageSendFailureProcessingTime()

getAverageSendProcessingTime

public int getAverageSendProcessingTime()

getAverageTimeToConnect

public int getAverageTimeToConnect()

getAverageTimeToFail

public int getAverageTimeToFail()

getInitiatorTotalTimeConnected

public long getInitiatorTotalTimeConnected()
Get the total time this intiated connection has been connected.

Note: This does not include the current time connected (if it is currently connected)

Returns:
time in ms (see note above)
See Also:
getTotalTimeConnected(long)

getInitiatorTotalTimeConnected

public long getInitiatorTotalTimeConnected(long adjustmentTime)
Get the total time this initiating connection has been connected. If it is currently connected, then the total time is adjusted to include the time since the transition time to become connected until the provided time

Parameters:
adjustmentTime - The time of this metric will be adjusted to
Returns:
time in ms (see note above)
See Also:
getTotalTimeConnected()

getInitiatorTimeConnected

public long getInitiatorTimeConnected()
Get the duration of current connection relative to local clock (from transition time)

Note: This assumes the clocks are in sync with the reporting peer

Returns:
time in ms (see note above) or 0 if not connected
See Also:
getTotalTimeConnected(long)

getInitiatorTimeConnected

public long getInitiatorTimeConnected(long adjustmentTime)
Get the duration of current connection until the specified time

Parameters:
adjustmentTime - The time of this metric will be computed until
Returns:
time in ms (see note above) or 0 if not connected
See Also:
getTimeConnected()

getAcceptorTotalTimeConnected

public long getAcceptorTotalTimeConnected()
Get the total time this intiated connection has been connected.

Note: This does not include the current time connected (if it is currently connected)

Returns:
time in ms (see note above)
See Also:
getTotalTimeConnected(long)

getAcceptorTotalTimeConnected

public long getAcceptorTotalTimeConnected(long adjustmentTime)
Get the total time this initiating connection has been connected. If it is currently connected, then the total time is adjusted to include the time since the transition time to become connected until the provided time

Parameters:
adjustmentTime - The time of this metric will be adjusted to
Returns:
time in ms (see note above)
See Also:
getTotalTimeConnected()

getAcceptorTimeConnected

public long getAcceptorTimeConnected()
Get the duration of current connection relative to local clock (from transition time)

Note: This assumes the clocks are in sync with the reporting peer

Returns:
time in ms (see note above) or 0 if not connected
See Also:
getTotalTimeConnected(long)

getAcceptorTimeConnected

public long getAcceptorTimeConnected(long adjustmentTime)
Get the duration of current connection until the specified time

Parameters:
adjustmentTime - The time of this metric will be computed until
Returns:
time in ms (see note above) or 0 if not connected
See Also:
getTimeConnected()

resetInitiatorState

void resetInitiatorState(String state,
                         long transitionTime)

resetAcceptorState

void resetAcceptorState(String state,
                        long transitionTime)

connectionEstablished

void connectionEstablished(boolean initiator,
                           long timeToConnect,
                           long transitionTime)

connectionFailed

void connectionFailed(boolean initiator,
                      long timeToConnect,
                      long transitionTime)

connectionClosed

void connectionClosed(boolean initiator,
                      long transitionTime)

connectionDropped

void connectionDropped(boolean initiator,
                       long transitionTime)

pingReceived

void pingReceived()

ping

void ping(long time)

pingFailed

void pingFailed(long time)

dataReceived

void dataReceived(boolean initiator,
                  int size)

messageReceived

void messageReceived(boolean initiator,
                     Message message,
                     long time,
                     long size)

receiveFailure

void receiveFailure(boolean initiator,
                    long time,
                    long size)

dataSent

void dataSent(boolean initiator,
              long size)

sendFailure

void sendFailure(boolean initiator,
                 Message message,
                 long time,
                 long size)

messageSent

void messageSent(boolean initiator,
                 Message message,
                 long time,
                 long size)

mergeMetrics

public void mergeMetrics(TransportBindingMetric other)

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

JXTA J2SE