Java SDK for 2D
 All Classes Namespaces Functions Variables Pages
ApiOnline Class Reference

Static Public Member Functions

static void goOnline (boolean online, int maxTime) throws GeneralException
 Defines if the navigation has to connect to or disconnect from online services. More...
 
static void onlineServicesLogin (String userName, String password, int maxTime) throws GeneralException
 Enters the login credentials for the online services, such as life traffic. More...
 
static TmcEvent addTMCEvent (TmcEvent event, int maxTime) throws GeneralException
 Adds a custom TMC event. More...
 
static void removeTMCEvent (short eventId, int maxTime) throws GeneralException
 Removes a custom TMC event. More...
 
static void clearTMCTable (int maxTime) throws GeneralException
 Erases all the custom TMC events defined with AddTMCEvent function. More...
 
static OnlineServicesSettings onlineServicesSettings (int maxTime) throws GeneralException
 Sets/gets online services settings. More...
 

Member Function Documentation

static TmcEvent addTMCEvent ( TmcEvent  event,
int  maxTime 
) throws GeneralException
static

Adds a custom TMC event.

This event is independent on the events received online.

Parameters
eventTMC event defined in the TmcEvent class.
maxTimeMaximum of time (in milliseconds) function can take. If maxTime=0 function execution is not time limited.
Returns
the TMC event with specific id
Exceptions
GeneralExceptionthe general exception

References Api.getInstance(), Api.getService(), TmcEvent.readBundle(), and TmcEvent.writeBundle().

static void clearTMCTable ( int  maxTime) throws GeneralException
static

Erases all the custom TMC events defined with AddTMCEvent function.

Parameters
maxTimeMaximum of time (in milliseconds) function can take. If maxTime=0 function execution is not time limited.
Exceptions
GeneralExceptionthe general exception

References Api.getInstance(), and Api.getService().

static void goOnline ( boolean  online,
int  maxTime 
) throws GeneralException
static

Defines if the navigation has to connect to or disconnect from online services.

The online services include functions as live traffic from the server and other.

Parameters
onlineDetermines whether connect or disconnect.
true - Connect.
false - Disconnect.
maxTimeMaximum of time (in milliseconds) function can take. If maxTime=0 function execution is not time limited.
Exceptions
GeneralExceptionthe general exception

References Api.getInstance(), and Api.getService().

static void onlineServicesLogin ( String  userName,
String  password,
int  maxTime 
) throws GeneralException
static

Enters the login credentials for the online services, such as life traffic.

If not credentials are given, the application logs in anonymously.

Parameters
userNameUser name.
passwordPassword.
maxTimeMaximum of time (in milliseconds) function can take. If maxTime=0 function execution is not time limited.
Exceptions
GeneralExceptionthe general exception

References Api.getInstance(), and Api.getService().

static OnlineServicesSettings onlineServicesSettings ( int  maxTime) throws GeneralException
static

Sets/gets online services settings.

Parameters
maxTimeMaximum of time (in milliseconds) function can take. If maxTime=0 function execution is not time limited.
Returns
Online services settings defined in the
Exceptions
GeneralExceptionthe general exception OnlineServicesSettings class.

References Api.getInstance(), and Api.getService().

static void removeTMCEvent ( short  eventId,
int  maxTime 
) throws GeneralException
static

Removes a custom TMC event.

Each custom event has an ID given to it by the navigation during creation. However, TMC events should be defined so that they expire with their validity time.

Parameters
eventIdThe Id of the TMC event returned by addTMCEvent(TmcEvent, int) function.
maxTimeMaximum of time (in milliseconds) function can take. If maxTime=0 function execution is not time limited.
Exceptions
GeneralExceptionthe general exception

References Api.getInstance(), and Api.getService().