com.ls.lars.communication
Class ServiceBroadcastMessage

java.lang.Object
  |
  +--com.ls.lars.communication.Message
        |
        +--com.ls.lars.communication.ServiceMessage
              |
              +--com.ls.lars.communication.ServiceBroadcastMessage
All Implemented Interfaces:
Cloneable, Comparable, Serializable

public class ServiceBroadcastMessage
extends ServiceMessage

Message object for the communication between the agents.

Note, that the Message object is not synchronized!

Standard for naming message services:

This standard is needed for automatic registration of "interpret"-methods in agents.

Version:
$Revision: 1.5 $
Author:
Last modified by $Author: ODrugan $
See Also:
Serialized Form

Fields inherited from class com.ls.lars.communication.ServiceMessage
TAG_PLATFORM
 
Fields inherited from class com.ls.lars.communication.Message
ADDRESS_CONFIG, ADDRESS_LARS_INTERNAL, EXPIRE_HOPS_DEFAULT, MESSAGE_TYPE_GROUP, MESSAGE_TYPE_MULTICAST, MESSAGE_TYPE_SERVICE_BROADCAST, MESSAGE_TYPE_SERVICE_SINGLE, MESSAGE_TYPE_SINGLE, PRIORITY_HIGH, PRIORITY_LOW, PRIORITY_NORMAL, PRIORITY_SYSTEM, PRIORITY_TEXT_HIGH, PRIORITY_TEXT_LOW, PRIORITY_TEXT_NORMAL, SERVICE_UNKNOWN, TAG_CONTENT, TAG_CURRENT_HOPS, TAG_EXPIRE_HOPS, TAG_FORWARDED_BY, TAG_IN_REPLY_TO, TAG_MESSAGE, TAG_PRIORITY, TAG_QUALITY_OF_SERVICE, TAG_REPLY_COUNTER, TAG_REPLY_WITH, TAG_SENDER, TAG_SENT_TIME, TAG_SERVICE, TAG_TYPE
 
Constructor Summary
ServiceBroadcastMessage(String service, Object content)
          sets all fields of a service broadcast message including the content object
 
Method Summary
protected  Map inheritorToMap()
          returns a map containing the ServiceBroadcastMessage specific fields (type)
protected  String inheritorToString()
          returns a well formatted string containing the ServiceBroadcastMessage specific fields (type)
 
Methods inherited from class com.ls.lars.communication.ServiceMessage
getPlatform, setPlatform
 
Methods inherited from class com.ls.lars.communication.Message
clone, compareTo, createMessage, createReply, getContent, getCurrentHops, getExpireHops, getForwardedBy, getInReplyTo, getPriority, getQualityOfService, getReplyWith, getSender, getSentTime, getService, hasInvalidSender, hop, increasePriority, isExpired, isSent, setExpireHops, setInReplyTo, setPriority, setPriority, setQualityOfService, setQualityOfService, setReplyWith, setSystemPriority, toMap, toString, toStringWithContent
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ServiceBroadcastMessage

public ServiceBroadcastMessage(String service,
                               Object content)
                        throws InvalidArgumentException
sets all fields of a service broadcast message including the content object
Parameters:
service - service of the message
content - content of the message as a hash
Throws:
InvalidArgumentException - If given service is null or empty or contains only whitespace characters or if given content is null
Method Detail

inheritorToMap

protected Map inheritorToMap()
returns a map containing the ServiceBroadcastMessage specific fields (type)
Overrides:
inheritorToMap in class ServiceMessage
Returns:
ServiceBroadcastMessage specific fields as a Map

inheritorToString

protected String inheritorToString()
returns a well formatted string containing the ServiceBroadcastMessage specific fields (type)
Overrides:
inheritorToString in class Message
Returns:
ServiceBroadcastMessage specific fields as a well-formatted string