com.tractrac.clientmodule.data
Class CompetitorPositionRawData

java.lang.Object
  extended by com.tractrac.clientmodule.details.Attachments
      extended by com.tractrac.clientmodule.data.TimeObject
          extended by com.tractrac.clientmodule.data.Position
              extended by com.tractrac.clientmodule.data.CompetitorPositionRawData
All Implemented Interfaces:
java.lang.Comparable<TimeObject>

public class CompetitorPositionRawData
extends Position

An instance of this class represents a raw (not snapped to a route) position for a Competitor.

The static method subscribe(com.tractrac.clientmodule.Race, com.tractrac.clientmodule.data.ICallbackData, long, long) can be used to receive positions.

Custom data may be attached to each position instance.

Version:
2.0
Author:
TracTrac

Method Summary
static AttKey newAttKey()
          Creates a new (static) key to be used to set/get custom data related to raw competitor positions.
static com.maptrack.client.io.TypeController subscribe(Race race, ICallbackData<RaceCompetitor,CompetitorPositionRawData> callback, long fromTime, long toTime)
          Sets up a subscription for raw competitor positions for a given Race.
 java.lang.String toString()
           
 
Methods inherited from class com.tractrac.clientmodule.data.Position
equals, getDirection, getHeight, getLatitude, getLongitude, getSpeed, hashCode
 
Methods inherited from class com.tractrac.clientmodule.data.TimeObject
compareTo, getTimestamp
 
Methods inherited from class com.tractrac.clientmodule.details.Attachments
getAttachment, setAttachment
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

newAttKey

public static AttKey newAttKey()
Creates a new (static) key to be used to set/get custom data related to raw competitor positions.

Returns:
a new key.

subscribe

public static com.maptrack.client.io.TypeController subscribe(Race race,
                                                              ICallbackData<RaceCompetitor,CompetitorPositionRawData> callback,
                                                              long fromTime,
                                                              long toTime)
Sets up a subscription for raw competitor positions for a given Race.

The method returns immediately and the positions are subsequently sent to a given callback, as they are received.

The returned type controller should be added to a DataController.

Parameters:
race - the race from which to request the data
callback - the callback to receive the positions
fromTime - stored positions (if supported) will be requested from this time
toTime - stored positions (if supported) will be requested before this time
Returns:
the type controller

toString

public java.lang.String toString()
Overrides:
toString in class Position