org.objectweb.petals.tools.webadmin.bo
Class ExchangesList

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<E>
          extended by java.util.ArrayList<MessageExchange>
              extended by org.objectweb.petals.tools.webadmin.bo.ExchangesList
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.lang.Iterable<MessageExchange>, java.util.Collection<MessageExchange>, java.util.List<MessageExchange>, java.util.RandomAccess

public class ExchangesList
extends java.util.ArrayList<MessageExchange>

List of MessageExchange objects

Author:
msauvage
See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
ExchangesList()
          create an empty new ExchangesList
ExchangesList(java.util.List<java.util.List<java.util.Map<java.lang.String,java.lang.Object>>> bulkDatas)
          Creates a new ExchangesList based on bulk datas
 
Method Summary
 ExchangesList getByComponent(java.lang.String compoName)
           
 MessageExchange getExchange(java.lang.String id)
          Return the Exchange with the given id.
 java.util.List<Message> getMessagesByTime(long timestamp)
          Returns messages from all exchanges with timestamp corresponding to the second of a given timestamp
 long getNbMsgByComponent(java.lang.String compoName)
          Returns the number of messages concerning a given component
 long getNbMsgByTime(long timestamp)
          Returns number of messages from all exchanges with timestamp corresponding to the second of a given timestamp
 boolean hasExchange(java.lang.String id)
           
 
Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, remove, removeRange, set, size, toArray, toArray, trimToSize
 
Methods inherited from class java.util.AbstractList
equals, hashCode, iterator, listIterator, listIterator, subList
 
Methods inherited from class java.util.AbstractCollection
containsAll, removeAll, retainAll, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
containsAll, equals, hashCode, iterator, listIterator, listIterator, removeAll, retainAll, subList
 

Constructor Detail

ExchangesList

public ExchangesList()
create an empty new ExchangesList


ExchangesList

public ExchangesList(java.util.List<java.util.List<java.util.Map<java.lang.String,java.lang.Object>>> bulkDatas)
Creates a new ExchangesList based on bulk datas

Parameters:
bulkDatas - datas to transform
Method Detail

getByComponent

public ExchangesList getByComponent(java.lang.String compoName)

getExchange

public MessageExchange getExchange(java.lang.String id)
Return the Exchange with the given id.

Parameters:
id - the id of the exchange wanted
Returns:
a MessageExchange, null if Exchange is not found

getMessagesByTime

public java.util.List<Message> getMessagesByTime(long timestamp)
Returns messages from all exchanges with timestamp corresponding to the second of a given timestamp

Parameters:
timestamp - timestamp of the second wanted
Returns:
List of Message objects

getNbMsgByComponent

public long getNbMsgByComponent(java.lang.String compoName)
Returns the number of messages concerning a given component

Parameters:
compoName - the name of the component
Returns:
a number of messages as a long

getNbMsgByTime

public long getNbMsgByTime(long timestamp)
Returns number of messages from all exchanges with timestamp corresponding to the second of a given timestamp

Parameters:
timestamp - timestamp of the second wanted
Returns:
number of messages

hasExchange

public boolean hasExchange(java.lang.String id)


Copyright © 2005-2007 ObjectWeb Consortium. All Rights Reserved.