Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.service.protocol.event
Class MessageWaitingEvent

java.lang.Object
  extended by java.util.EventObject
      extended by net.java.sip.communicator.service.protocol.event.MessageWaitingEvent
All Implemented Interfaces:
Serializable

public class MessageWaitingEvent
extends EventObject

MessageWaitingEvent indicates a message waiting event is received.

Author:
Damian Minkov
See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
MessageWaitingEvent(ProtocolProviderService source, OperationSetMessageWaiting.MessageType messageType, String account, int unreadMessages, int readMessages, int unreadUrgentMessages, int readUrgentMessages)
          Constructs the Event with the given source, typically the provider and number of messages.
 
Method Summary
 String getAccount()
          The URI we can use to reach messages from provider that is firing the event.
 OperationSetMessageWaiting.MessageType getMessageType()
          The message type for this event.
 int getReadMessages()
          Number of old/read messages.
 int getReadUrgentMessages()
          Number of old/read messages.
 ProtocolProviderService getSourceProvider()
          Returns the ProtocolProviderService which originated this event.
 int getUnreadMessages()
          Number of new/unread messages.
 int getUnreadUrgentMessages()
          Number of new/unread urgent messages.
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MessageWaitingEvent

public MessageWaitingEvent(ProtocolProviderService source,
                           OperationSetMessageWaiting.MessageType messageType,
                           String account,
                           int unreadMessages,
                           int readMessages,
                           int unreadUrgentMessages,
                           int readUrgentMessages)
Constructs the Event with the given source, typically the provider and number of messages.

Parameters:
messageType - the message type for this event.
source - the protocol provider from which this event is coming.
account - the account URI we can use to reach the messages.
unreadMessages - the unread messages.
readMessages - the read messages.
unreadUrgentMessages - the unread urgent messages.
readUrgentMessages - the read urgent messages.
Method Detail

getSourceProvider

public ProtocolProviderService getSourceProvider()
Returns the ProtocolProviderService which originated this event.

Returns:
the source ProtocolProviderService

getAccount

public String getAccount()
The URI we can use to reach messages from provider that is firing the event.

Returns:
account URI.

getUnreadMessages

public int getUnreadMessages()
Number of new/unread messages.

Returns:
Number of new/unread messages.

getReadMessages

public int getReadMessages()
Number of old/read messages.

Returns:
Number of old/read messages.

getUnreadUrgentMessages

public int getUnreadUrgentMessages()
Number of new/unread urgent messages.

Returns:
Number of new/unread urgent messages.

getReadUrgentMessages

public int getReadUrgentMessages()
Number of old/read messages.

Returns:
Number of old/read messages.

getMessageType

public OperationSetMessageWaiting.MessageType getMessageType()
The message type for this event.

Returns:
the message type.

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under LGPL license.