org.opencms.main
Class CmsBroadcast

java.lang.Object
  extended by org.opencms.main.CmsBroadcast

public class CmsBroadcast
extends java.lang.Object

A single broadcast message, send from one OpenCms user to another.

To addess a broadcast to another user, it must be placed in the broadcast queue of that user using for example CmsSessionManager.sendBroadcast(CmsUser, String, CmsUser).

Since:
6.0.0
Version:
$Revision: 1.12 $
Author:
Alexander Kandzior

Constructor Summary
CmsBroadcast(CmsUser sender, java.lang.String message)
          Creates a new broadcast, with the current system time set as send time.
 
Method Summary
 java.lang.String getMessage()
          Returns the broadcast message content.
 long getSendTime()
          Returns the time this broadcast was send.
 CmsUser getUser()
          Returns the user that was the sender of this broadcast.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CmsBroadcast

public CmsBroadcast(CmsUser sender,
                    java.lang.String message)
Creates a new broadcast, with the current system time set as send time.

Parameters:
sender - the sender of the broadcast
message - the message to send
Method Detail

getMessage

public java.lang.String getMessage()
Returns the broadcast message content.

Returns:
the broadcast message content

getSendTime

public long getSendTime()
Returns the time this broadcast was send.

Returns:
the time this broadcast was send

getUser

public CmsUser getUser()
Returns the user that was the sender of this broadcast.

It could be null to signalize a system message.

Returns:
the user that was the sender of this broadcast