org.moock.unity.core
Class Message
java.lang.Object
|
+--org.moock.unity.core.Message
- public class Message
- extends java.lang.Object
Message encapsulates client to server communications. When a String is
received from a client a Message object is created and sent
to that clients room for processing.
- Author:
- Derek Clayton
|
Constructor Summary |
Message(ClientServices client)
Creates a new message and initializes the Client to client. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Message
public Message(ClientServices client)
- Creates a new message and initializes the Client to client.
- Parameters:
client - the client who sent the message
getTimeStamp
public long getTimeStamp()
- Use Date date = new Date(getTimeStamp) to get a Date object instead of
a long if desired.
- Returns:
- the time the message was recieved by the server represented by
the number of milliseconds since January 1, 1970, 00:00:00 GMT
getMessage
public java.lang.String getMessage()
- Returns the contents of the message.
- Returns:
- the contents of the message
setMessage
public void setMessage(java.lang.String message)
- Sets the content of the message. This is set by the server when the
message is created.
getClientServices
public ClientServices getClientServices()
- Returns the client that sent the message.
- Returns:
- ClientServices for the client that sent the message
setParsedObject
public void setParsedObject(java.lang.Object obj)
getParsedObject
public java.lang.Object getParsedObject()