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

java.lang.Object
  extended by org.objectweb.petals.tools.webadmin.bo.MessageExchange

public class MessageExchange
extends java.lang.Object

represents an exchange : a list of Message objects

Author:
msauvage

Constructor Summary
MessageExchange(java.util.List<java.util.Map<java.lang.String,java.lang.Object>> exchange)
          Creates a new MessageExchange with a list of Map
MessageExchange(Message msg)
           
 
Method Summary
 void addmessage(Message msg)
           
 java.util.List<Message> getByTime(long timestamp)
          Get messages from the exchange with timestamp corresponding to the second of a given timestamp
 long getEndTime()
           
 java.lang.String getExchangeId()
          Returns the id of the Exchange.
 java.lang.String getMep()
           
 java.util.Map<java.lang.String,Message> getMessages()
           
 long getNbMsgByComponent(java.lang.String compoName)
          Returns the number of messages in the exchange concerning a component
 long getStartTime()
           
 java.lang.String getStatus()
           
 boolean hasMsgForComponent(java.lang.String compoName)
          Indicates if the MessageExchange has messages concerning a component
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MessageExchange

public MessageExchange(java.util.List<java.util.Map<java.lang.String,java.lang.Object>> exchange)
Creates a new MessageExchange with a list of Map

Parameters:
exchange - a bulk list representation of an exchange

MessageExchange

public MessageExchange(Message msg)
Method Detail

getByTime

public java.util.List<Message> getByTime(long timestamp)
Get messages from the exchange with timestamp corresponding to the second of a given timestamp

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

getExchangeId

public java.lang.String getExchangeId()
Returns the id of the Exchange. Search the id in the first message contained by the Exchange.

Returns:
an id, null if exchange has no message.

getNbMsgByComponent

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

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

hasMsgForComponent

public boolean hasMsgForComponent(java.lang.String compoName)
Indicates if the MessageExchange has messages concerning a component

Parameters:
compoName - the component searched name
Returns:
true if MessageExchanges contains messages for the component, false if not.

getEndTime

public long getEndTime()

getMep

public java.lang.String getMep()

getMessages

public java.util.Map<java.lang.String,Message> getMessages()

getStartTime

public long getStartTime()

getStatus

public java.lang.String getStatus()

addmessage

public void addmessage(Message msg)


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