org.testng.remote.strprotocol
Class GenericMessage

java.lang.Object
  extended by org.testng.remote.strprotocol.GenericMessage
All Implemented Interfaces:
IMessage, IStringMessage

public class GenericMessage
extends Object
implements IStringMessage

A generic message to be used with remote listeners. It is described by a m_messageType and can contain a Map or values.

Author:
Alexandru Popescu

Field Summary
protected  int m_messageType
           
protected  Map m_properties
           
 
Constructor Summary
GenericMessage(int type)
           
GenericMessage(int type, Map props)
           
 
Method Summary
 GenericMessage addProperty(String propName, int propValue)
           
 GenericMessage addProperty(String propName, Object propValue)
           
 String getMessageAsString()
           
 String getProperty(String propName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_properties

protected Map m_properties

m_messageType

protected final int m_messageType
Constructor Detail

GenericMessage

public GenericMessage(int type)

GenericMessage

public GenericMessage(int type,
                      Map props)
Method Detail

addProperty

public GenericMessage addProperty(String propName,
                                  Object propValue)

addProperty

public GenericMessage addProperty(String propName,
                                  int propValue)

getProperty

public String getProperty(String propName)

getMessageAsString

public String getMessageAsString()
Specified by:
getMessageAsString in interface IStringMessage
See Also:
net.noco.testng.runner.IStringMessage#getMessageAsString()


Copyright © 2010. All Rights Reserved.