Jitsi: the OpenSource Java VoIP and Instant Messaging client.

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

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

public class GeolocationEvent
extends EventObject

Instances of this class represent a change geographic location of a contact.

Author:
Guillaume Schreiner
See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
GeolocationEvent(Contact sourceContact, ProtocolProviderService sourceProvider, Map<String,String> newLocation, OperationSetGeolocation geolocationOpSet)
          Creates an event instance indicating that the specified source contact has changed its geographic location to newLocation.
 
Method Summary
 Map<String,String> getNewLocation()
          Returns the Geolocation of the contact after this event took place.
 Contact getSourceContact()
          Returns the source contact associated with the event.
 OperationSetGeolocation getSourceGeolocationOperationSet()
          Returns the GeolocationOperationSet instance that is the source of this event.
 ProtocolProviderService getSourceProvider()
          Returns the provider that the source contact belongs to.
 String toString()
          Returns a String representation of this GeolocationContactChangeEvent
 
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

GeolocationEvent

public GeolocationEvent(Contact sourceContact,
                        ProtocolProviderService sourceProvider,
                        Map<String,String> newLocation,
                        OperationSetGeolocation geolocationOpSet)
Creates an event instance indicating that the specified source contact has changed its geographic location to newLocation.

Parameters:
sourceContact - the contact associated with this event.
sourceProvider - the protocol provider that the contact belongs to.
newLocation - the geolocation where the sourceCountact currently is.
geolocationOpSet - the operation set that generated this event
Method Detail

getSourceProvider

public ProtocolProviderService getSourceProvider()
Returns the provider that the source contact belongs to.

Returns:
the provider that the source contact belongs to.

getSourceContact

public Contact getSourceContact()
Returns the source contact associated with the event.

Returns:
the source contact associated with the event.

getNewLocation

public Map<String,String> getNewLocation()
Returns the Geolocation of the contact after this event took place. (i.e. at the time the event is being dispatched).

Returns:
geolocation stored into a Map indicating the current location of the source Contact at the moment the event was dispatched.

getSourceGeolocationOperationSet

public OperationSetGeolocation getSourceGeolocationOperationSet()
Returns the GeolocationOperationSet instance that is the source of this event.

Returns:
the OperationSetGeolocation instance that is the source of this event.

toString

public String toString()
Returns a String representation of this GeolocationContactChangeEvent

Overrides:
toString in class EventObject
Returns:
A a java.lang.String representation of this ContactPresenceStatusChangeEvent.

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

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