|
Project JXTA | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.jxta.impl.util.EndpointServiceStatsFilter
Instances of this clas can be registered with an EndpointService to gather statistics about what kind of messages pass through it. This class is not MT-safe, so make sure you plug it only into one endpoint service.
net.jxta.endpoint.EndpointService#addFilterListener
Field Summary | |
(package private) Hashtable |
channelTrafficTable
|
(package private) Hashtable |
destCountTable
|
(package private) long |
lastMessageTime
|
(package private) Hashtable |
sourceCountTable
|
Constructor Summary | |
EndpointServiceStatsFilter()
|
Method Summary | |
Enumeration |
getChannelNames()
|
long |
getLastMessageTime()
Get the time we last saw a message. |
long |
getMessageCountFrom(EndpointAddress addr)
Get the number of messages received from a given address. |
long |
getMessageCountTo(EndpointAddress addr)
Get the number of messages we've seen that were adderssed to a given address. |
long |
getTrafficOnChannel(String channel)
Get the number of messages seen with a given message element namespace or full message element name. |
Message |
processIncomingMessage(Message msg,
EndpointAddress source,
EndpointAddress dest)
This method is called by the EndpointService to give us a chance to look at the message before it is dispatched to any listeners. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
long lastMessageTime
Hashtable channelTrafficTable
Hashtable sourceCountTable
Hashtable destCountTable
Constructor Detail |
public EndpointServiceStatsFilter()
Method Detail |
public Message processIncomingMessage(Message msg, EndpointAddress source, EndpointAddress dest)
processIncomingMessage
in interface EndpointFilterListener
public long getLastMessageTime()
public long getTrafficOnChannel(String channel)
public Enumeration getChannelNames()
public long getMessageCountFrom(EndpointAddress addr)
public long getMessageCountTo(EndpointAddress addr)
|
JXTA J2SE | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |