cz.zcu.fav.kiv.jsim.ipc
Class JSimSymmetricMessage

java.lang.Object
  extended by cz.zcu.fav.kiv.jsim.ipc.JSimMessage
      extended by cz.zcu.fav.kiv.jsim.ipc.JSimSymmetricMessage
All Implemented Interfaces:
JSimMessageWithKnownReceiver, JSimMessageWithKnownSender

public class JSimSymmetricMessage
extends JSimMessage
implements JSimMessageWithKnownSender, JSimMessageWithKnownReceiver

A symmetric message is a message whose sender and receiver are both known. The message can be sent directly from a process to another process or indirectly via a message box. The receiving process will be able to determine the sender. Filtered reception (filtering by the sender) can be used when receiving both directly and indirectly sent messages.

Since:
J-Sim version 0.3.0
Version:
J-Sim version 0.6.0
Author:
Jarda KAČER

Field Summary
 
Fields inherited from class cz.zcu.fav.kiv.jsim.ipc.JSimMessage
ANY_MESSAGE_TYPE, data, DEFAULT_JSIM_MESSAGE_TYPE, messageType, receiver, sender, UNKNOWN_RECEIVER, UNKNOWN_SENDER
 
Constructor Summary
JSimSymmetricMessage(JSimProcess sender, JSimProcess receiver, java.lang.Object data)
          Creates a new symmetric message with the specified sender, receiver, and user data.
JSimSymmetricMessage(JSimProcess sender, JSimProcess receiver, java.lang.Object data, int messageType)
          Creates a new message with the specified sender, receiver, user data, and message type.
 
Method Summary
 
Methods inherited from class cz.zcu.fav.kiv.jsim.ipc.JSimMessage
getData, getMessageType, getRealSender, getReceiver, getSender, setRealSender
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface cz.zcu.fav.kiv.jsim.ipc.JSimMessageWithKnownSender
getSender
 
Methods inherited from interface cz.zcu.fav.kiv.jsim.ipc.JSimMessageWithKnownReceiver
getReceiver
 

Constructor Detail

JSimSymmetricMessage

public JSimSymmetricMessage(JSimProcess sender,
                            JSimProcess receiver,
                            java.lang.Object data)
                     throws JSimInvalidParametersException
Creates a new symmetric message with the specified sender, receiver, and user data. The default value of message type will be used.

Parameters:
sender - The sending process. Must always be specified.
receiver - The receiver. Must always be specified.
data - User data that the message will carry.
Throws:
JSimInvalidParametersException - This exception is thrown out if the sender or the receiver is not specified.

JSimSymmetricMessage

public JSimSymmetricMessage(JSimProcess sender,
                            JSimProcess receiver,
                            java.lang.Object data,
                            int messageType)
                     throws JSimInvalidParametersException
Creates a new message with the specified sender, receiver, user data, and message type.

Parameters:
sender - The sending process. Must always be specified.
receiver - The receiver. Must always be specified.
data - User data that the message will carry.
messageType - The type of the message. Must be non-negative.
Throws:
JSimInvalidParametersException - This exception is thrown out if the message type is negative or if the sender or the receiver is not specified.


Copyright © 2000-2006 University of West Bohemia. Licensed under the Academic Free License v. 2.1. Build date 20060812.