A JMS object message class is very simple: it is a serializable JavaBean that carries the message properties. Our LinkMessage class will have only one property: location.
package test.scenario;
/**
* JMS message that conveys data about a link clickthrough event.
*
**/
public class LinkMessage implements java.io.Serializable
{
//----------------------------------------
// CONSTRUCTORS
//----------------------------------------
public LinkMessage(String pLocation)
{
setLocation(pLocation);
}
//----------------------------------------
// PROPERTY ACCESSORS
//----------------------------------------
String mLocation;
//-------------------------------------
/**
* Sets the logical name of the clickthrough location.
**/
public void setLocation(String pLocation) {
mLocation = pLocation;
}
//-------------------------------------
/**
* Returns the logical name of the clickthrough location.
**/
public String getLocation() {
return mLocation;
}
}
