com.compoze.collab.im
Class ImEvent
java.lang.Object
|
+--java.util.EventObject
|
+--com.compoze.collab.im.ImEvent
- All Implemented Interfaces:
- java.io.Serializable
- Direct Known Subclasses:
- YahooImEvent
- public class ImEvent
- extends java.util.EventObject
This class is used to notify listeners on a container that some changed has
occurred in the container.
- See Also:
- Serialized Form
Fields inherited from class java.util.EventObject |
source |
Constructor Summary |
ImEvent(java.lang.Object source,
int iType)
Constructor. |
Method Summary |
java.lang.Object |
getSource()
Gets the source of the event. |
int |
getType()
Gets the event type. |
java.lang.String |
toString()
Creates a string representation of the event. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
INSTANT_MESSAGE_RECEIVED
public static final int INSTANT_MESSAGE_RECEIVED
- The instant message received event. In this case the
source
of the event will be an instance of IInstantMessage
.
FRIEND_UPDATED
public static final int FRIEND_UPDATED
- The friend update received event. In this case the
source
of the event will be an instance of IFriend
.
ImEvent
public ImEvent(java.lang.Object source,
int iType)
- Constructor.
- Parameters:
source
- the event source object (not null
)iType
- either INSTANT_MESSAGE_RECEIVED
or
FRIEND_UPDATED
getType
public int getType()
- Gets the event type.
- Returns:
- the type (one of the constants
INSTANT_MESSAGE_RECEIVED
or FRIEND_UPDATED
, or an extended constant used by
a provider specific event. If another constant is received
that is not understood, it's recommended that the event
be ignored.)
toString
public java.lang.String toString()
- Creates a string representation of the event.
- Overrides:
toString
in class java.util.EventObject
getSource
public java.lang.Object getSource()
- Gets the source of the event. Returned object will depend on the type of even.
If the type is
INSTANT_MESSAGE_RECEIVED
, the object will be of type IInstantMessage
.
If the type is FRIEND_UPDATED
, the object will be of type IFriend
- Overrides:
getSource
in class java.util.EventObject
- Returns:
- object that generated the event
Copyright ©1999-2003 Compoze Software, Inc. All rights reserved.