messages
Class Message

java.lang.Object
  extended by messages.Message
All Implemented Interfaces:
java.io.Serializable

public class Message
extends java.lang.Object
implements java.io.Serializable

This class is the "Message" .. the JESUS of chatting.
It is responsible for all message-and file transfers.
- each time a JMessage is sent, a new instance of Message is created, sent to the reciever and deserialized on the other side to be further processed.

Version:
1.1
Author:
suso
See Also:
Serialized Form

Constructor Summary
Message(java.lang.String sender, java.lang.String recipiant, java.lang.String text, java.io.File file)
          Constructor of class Message, every message is instanciated like this.
 
Method Summary
 java.io.File getFile()
           
 java.lang.String getIP()
           
 java.lang.String getRecipiant()
           
 java.lang.String getSender()
           
 java.lang.String getText()
           
 void setIP(java.lang.String ip)
           
 void setSender(java.lang.String ip)
          sets sender of the message...
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Message

public Message(java.lang.String sender,
               java.lang.String recipiant,
               java.lang.String text,
               java.io.File file)
Constructor of class Message, every message is instanciated like this.

Parameters:
sender - ... the sender of the message
recipiant - ... the reciever of the message
text - ... the text of the message
Method Detail

getText

public java.lang.String getText()
Returns:
text of the message

getSender

public java.lang.String getSender()
Returns:
sender of the message

getRecipiant

public java.lang.String getRecipiant()
Returns:
recipiant of the message

setSender

public void setSender(java.lang.String ip)
sets sender of the message... bäh .. BAD METHOD!


setIP

public void setIP(java.lang.String ip)
Parameters:
ip - ... ip adress of the reciever

getIP

public java.lang.String getIP()
Returns:
ip adress of reciever (ipV4 .. as a String)

getFile

public java.io.File getFile()
Returns:
file, which is sent in the message