Jitsi: the OpenSource Java VoIP and Instant Messaging client.

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

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

public class CallChangeEvent
extends PropertyChangeEvent

CallChangeEvent-s are triggered whenever a change occurs in a Call. Dispatched events may be of one of the following types.

CALL_STATE_CHANGE - indicates a change in the state of a Call.

Author:
Emil Ivov
See Also:
Serialized Form

Field Summary
static String CALL_FOCUS_CHANGE
          An event type indicating that the corresponding event is caused by a change of the Call he became focus for a conference call or was one and is no longer such.
static String CALL_STATE_CHANGE
          An event type indicating that the corresponding event is caused by a change of the Call state.
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
CallChangeEvent(Call source, String type, Object oldValue, Object newValue)
          Creates a CallChangeEvent with the specified source, type, oldValue and newValue.
CallChangeEvent(Call source, String type, Object oldValue, Object newValue, CallPeerChangeEvent cause)
          Creates a CallChangeEvent with the specified source, type, oldValue and newValue.
 
Method Summary
 CallPeerChangeEvent getCause()
          The event which was the cause for current event, like last peer removed from call will hangup current call, if any, otherwise is null.
 String getEventType()
          Returns the type of this event.
 Call getSourceCall()
          The Call on which the event has occurred.
 String toString()
          Returns a String representation of this CallChangeEvent.
 
Methods inherited from class java.beans.PropertyChangeEvent
getNewValue, getOldValue, getPropagationId, getPropertyName, setPropagationId
 
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
 

Field Detail

CALL_STATE_CHANGE

public static final String CALL_STATE_CHANGE
An event type indicating that the corresponding event is caused by a change of the Call state.

See Also:
Constant Field Values

CALL_FOCUS_CHANGE

public static final String CALL_FOCUS_CHANGE
An event type indicating that the corresponding event is caused by a change of the Call he became focus for a conference call or was one and is no longer such.

See Also:
Constant Field Values
Constructor Detail

CallChangeEvent

public CallChangeEvent(Call source,
                       String type,
                       Object oldValue,
                       Object newValue)
Creates a CallChangeEvent with the specified source, type, oldValue and newValue.

Parameters:
source - the peer that produced the event.
type - the type of the event (the name of the property that has changed).
oldValue - the value of the changed property before the event occurred
newValue - current value of the changed property.

CallChangeEvent

public CallChangeEvent(Call source,
                       String type,
                       Object oldValue,
                       Object newValue,
                       CallPeerChangeEvent cause)
Creates a CallChangeEvent with the specified source, type, oldValue and newValue.

Parameters:
source - the peer that produced the event.
type - the type of the event (the name of the property that has changed).
oldValue - the value of the changed property before the event occurred
newValue - current value of the changed property.
cause - the event that causes this event, if any(null otherwise).
Method Detail

getEventType

public String getEventType()
Returns the type of this event.

Returns:
a string containing the name of the property whose change this event is reflecting.

toString

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

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

getSourceCall

public Call getSourceCall()
The Call on which the event has occurred.

Returns:
The Call on which the event has occurred.

getCause

public CallPeerChangeEvent getCause()
The event which was the cause for current event, like last peer removed from call will hangup current call, if any, otherwise is null.

Returns:
CallPeerChangeEvent that represents the cause

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

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