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

java.lang.Object
  extended by cz.zcu.fav.kiv.jsim.ipc.JSimMessage
      extended by cz.zcu.fav.kiv.jsim.ipc.JSimAssymetricMessage
          extended by cz.zcu.fav.kiv.jsim.ipc.JSimMessageForReceiver
All Implemented Interfaces:
JSimMessageWithKnownReceiver

public class JSimMessageForReceiver
extends JSimAssymetricMessage
implements JSimMessageWithKnownReceiver

A message whose receiver is known but the sender is not. Such a message can be sent directly to a process or sent via a message box. The receiving process will never know the sender.

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
JSimMessageForReceiver(JSimProcess receiver, java.lang.Object data)
          Creates a new message for receiver with the specified receiver and user data.
JSimMessageForReceiver(JSimProcess receiver, java.lang.Object data, int messageType)
          Creates a new message for receiver with the specified 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.JSimMessageWithKnownReceiver
getReceiver
 

Constructor Detail

JSimMessageForReceiver

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

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

JSimMessageForReceiver

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

Parameters:
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 when the receiver is not specified.


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