Class TextMessage

java.lang.Object
  |
  +--Message
        |
        +--TextMessage
All Implemented Interfaces:
Cloneable

public class TextMessage
extends Message

Message with a textual body; nice for demonstrating host->host transmission (though plain Messages work fine too).

Version:
2002-04-10
Author:
Max Hailperin

Constructor Summary
TextMessage(int source, int destination, String body)
          Constructor for objects of class TextMessage
 
Method Summary
 String getBody()
          returns the string the TextMessage is carrying
 String toString()
          returns a String describing the TextMessage
 
Methods inherited from class Message
clone, getDestination, getSource
 
Methods inherited from class java.lang.Object
, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TextMessage

public TextMessage(int source,
                   int destination,
                   String body)
Constructor for objects of class TextMessage
Parameters:
source - address of source Port
destination - address of destination Port(s)
body - String being sent
Method Detail

getBody

public String getBody()
returns the string the TextMessage is carrying
Returns:
the TextMessage's body

toString

public String toString()
returns a String describing the TextMessage
Overrides:
toString in class Message
Returns:
a description of the TextMessage


Generated by BlueJ