public interface ILocalDataserver
This class is a local dataserver. It is possible to add events and connect to it order to test the implementation of the subscription library.
| Modifier and Type | Method and Description |
|---|---|
void |
abandonRace(java.util.UUID raceId)
Abandon a race from the event
|
void |
addCompetitor(java.lang.String name,
java.lang.String shortName,
java.lang.String team,
java.lang.String competitorClass)
Add a new competitor to the event
|
void |
addLivePosition(ICompetitor competitor,
double lon,
double lat,
long timestamp)
Adds a live position to the dataserver.
|
void |
addMark(java.lang.String name,
java.lang.String shortName,
double lat,
double lon,
long timestamp)
Add a new mark to the event
|
void |
addRace(java.lang.String raceName,
long trackingStartTime,
long trackingEndTime,
long raceStartTime,
RaceStatusType status,
java.net.URI parametersFile)
Add a new race to the event
|
void |
addRaceCompetitor(IRace race,
IRoute route,
ICompetitor competitor)
Add a competitor to a race
|
void |
addStoredPosition(ICompetitor competitor,
double lon,
double lat,
long timestamp)
Adds a stored position to the dataserver.
|
void |
close()
Closes the connections
|
void |
deleteCompetitor(java.util.UUID competitorId)
Delete a competitor from the event
|
void |
deleteMark(java.util.UUID markId)
Delete a mark from the event
|
void |
deleteRace(java.util.UUID raceId)
Delete a race from the event
|
int |
getLivePort()
Gets the port for the live connection
|
int |
getStoredPort()
Gets the port for the stored connection
|
void |
reloadRace(java.util.UUID raceId)
Reload a race from the event
|
void |
removeRaceCompetitor(IRace race,
java.util.UUID competitorId)
Delete a race from the race
|
void |
start()
Create the threads that listen both the stored and live connections
|
void |
updateCompetitor(java.util.UUID competitorId,
java.lang.String name,
java.lang.String shortName,
java.lang.String team,
java.lang.String competitorClass)
Update a competitor
|
void |
updateLiveDelay(int seconds)
Update the live delay property
|
void |
updateLiveDelay(java.util.UUID raceId,
int seconds)
Update the live delay property for a race
|
void |
updateMark(java.util.UUID markId,
java.lang.String name,
java.lang.String shortName,
double lat,
double lon,
long timestamp)
Add a new mark to the event
|
void |
updateRace(java.util.UUID raceId,
java.lang.String raceName,
long trackingStartTime,
long trackingEndTime,
long raceStartTime,
RaceStatusType status,
java.net.URI parametersFile)
Update a race
|
int getStoredPort()
int getLivePort()
void start()
void close()
throws java.io.IOException
java.io.IOException - if there is an error closing the socketsvoid addLivePosition(ICompetitor competitor, double lon, double lat, long timestamp)
competitor - the competitorlon - the longitudelat - the latitudetimestamp - the time stamp when this position is validvoid addStoredPosition(ICompetitor competitor, double lon, double lat, long timestamp)
competitor - the competitorlon - the longitudelat - the latitudetimestamp - the time stamp when this position is validvoid addCompetitor(java.lang.String name,
java.lang.String shortName,
java.lang.String team,
java.lang.String competitorClass)
name - the name of the competitorshortName - the short name of the competitorteam - the team namecompetitorClass - the competitor classvoid deleteCompetitor(java.util.UUID competitorId)
competitorId - the competitor identifiervoid updateCompetitor(java.util.UUID competitorId,
java.lang.String name,
java.lang.String shortName,
java.lang.String team,
java.lang.String competitorClass)
competitorId - the competitor identifiername - the name of the competitorshortName - the short name of the competitorteam - the team namecompetitorClass - the competitor classvoid addRace(java.lang.String raceName,
long trackingStartTime,
long trackingEndTime,
long raceStartTime,
RaceStatusType status,
java.net.URI parametersFile)
raceName - the race nametrackingStartTime - the tracking start timetrackingEndTime - the tracking end timeraceStartTime - the race start timestatus - the status of the raceparametersFile - the parameters filevoid updateRace(java.util.UUID raceId,
java.lang.String raceName,
long trackingStartTime,
long trackingEndTime,
long raceStartTime,
RaceStatusType status,
java.net.URI parametersFile)
raceId - the race identifierraceName - the race nametrackingStartTime - the tracking start timetrackingEndTime - the tracking end timeraceStartTime - the race start timestatus - the status of the raceparametersFile - the parameters filevoid deleteRace(java.util.UUID raceId)
raceId - the race identifiervoid reloadRace(java.util.UUID raceId)
raceId - the race identifiervoid abandonRace(java.util.UUID raceId)
raceId - the race identifiervoid addMark(java.lang.String name,
java.lang.String shortName,
double lat,
double lon,
long timestamp)
name - the name of the markname - the name of the marklat - the latitude value of the marklon - the longitude value of the marktimestamp - the timestamp of the markvoid updateMark(java.util.UUID markId,
java.lang.String name,
java.lang.String shortName,
double lat,
double lon,
long timestamp)
markId - the mark identifiername - the name of the markshortName - the short namelat - the latitude value of the marklon - the longitude value of the marktimestamp - the timestamp of the markvoid deleteMark(java.util.UUID markId)
markId - the mark identifiervoid addRaceCompetitor(IRace race, IRoute route, ICompetitor competitor)
race - the raceroute - the routecompetitor - the competitor to addvoid removeRaceCompetitor(IRace race, java.util.UUID competitorId)
race - the racecompetitorId - the competitor identifiervoid updateLiveDelay(int seconds)
the - number of seconds for the new live delayvoid updateLiveDelay(java.util.UUID raceId,
int seconds)
raceId - the race identifierthe - number of seconds for the new live delay