Jitsi: the OpenSource Java VoIP and Instant Messaging client.

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

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

public class GenericEvent
extends EventObject

GenericEvents indicate reception of an new generic event.

Author:
Damian Minkov
See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
GenericEvent(ProtocolProviderService sourceProtocolProvider, Contact from, String eventName, String eventValue, Contact sourceContact)
          Constructs a GenericEvent.
 
Method Summary
 String getEventName()
          The event name.
 String getEventValue()
          The event value.
 Contact getFrom()
          The contact which is the source of this event.
 Contact getSourceContact()
          Returns The source contact for this event.
 ProtocolProviderService getSourceProvider()
          Returns the ProtocolProviderService which originated this event.
 String toString()
          Returns a String representation of this GenericEvent.
 
Methods inherited from class java.util.EventObject
getSource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GenericEvent

public GenericEvent(ProtocolProviderService sourceProtocolProvider,
                    Contact from,
                    String eventName,
                    String eventValue,
                    Contact sourceContact)
Constructs a GenericEvent.

Parameters:
sourceProtocolProvider - The object on which the Event initially occurred.
from - the contact from which this event is coming from.
eventName - the event name.
eventValue - the event value.
sourceContact - contact for this event.
Throws:
IllegalArgumentException - if source is null.
Method Detail

getEventName

public String getEventName()
The event name.

Returns:
the event name.

getEventValue

public String getEventValue()
The event value.

Returns:
the event value.

getFrom

public Contact getFrom()
The contact which is the source of this event.

Returns:
the contact which is the source of this event.

getSourceProvider

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

Returns:
the source ProtocolProviderService

toString

public String toString()
Returns a String representation of this GenericEvent.

Overrides:
toString in class EventObject
Returns:
A a String representation of this GenericEvent.

getSourceContact

public Contact getSourceContact()
Returns The source contact for this event.

Returns:
the event source contact.

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

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