Vehicle Data Hub Interface API reference

Interface com.ibm.mobility.autodrive.client.IClient

Modifier and type Method and description
Void init(MobilityConfig config, String myname) The method is called when the module is created. Parameters:config: utility class to manage configurations.myname: client name that is specified in the gateway.properties file.
Void terminate() The method is called when the module is terminated.
Boolean isPushClient()Return true when the client can send an action to vehicles. Implement the push() method when it returns true.
Int push(Action action)Send the action to vehicles. Implement this method when isPushClient() returns true. Return 0 if successful.Parameters:action: action to send
Boolean isHttp()Returns the value true if the client is using HTTP.
Void setHttp(boolean b)Set to true if this client is using HTTP.
Boolean isRequired(String userAgent)Returns true if the client is required to handle a request from a specified user agent, which is common for HTTP clients.
Void setUserAgent(String userAgent)Set a user agent to support. This method is used typically for HTTP clients.Parameters:userAgent: agent that is specified in the gateway.properties file.
Object call(Object o)Implement call(Object o, Object e_o) instead.
Object call(Object o, Object e_o)The method is called when a single set of data, such as data from a car probe, comes. This method is typically used for HTTP clients.HTTP client parameters:o: IRequestWrapper interface to access request parameters.e_o: ClientFactory class to load IClient implementations. This parameter is used for collaborating with other clients.
Object multiCall(Object o, Object e_o)This method is called when multiple sets of data are included in the request, for example, a set of car probe data, and is typically used for HTTP clients.HTTP client parameters:o: incoming data in the stringe_o: request information in Map String, List String that contains headers, query parameters, and method.

Interface com.ibm.mobility.autodrive.process.IProbeDataProcess

Modifier and type Method and description
Void init(MObilityConfig config, String name)The method is called when the module is created.Parameters:config: utility class to manage configurations.myname: The name that is specified in the gateway.properties file.
Boolean isInitialized()
Void terminate()Terminate the instance.
Object process(IDataParameters para)Process general data.
Object processEvent(SendEventParameters para)Send an external event.
Object processCarProbe(CarProbeParameters para)Send a car probe.
Object processEventQuery(QueryEventParameters para)Query events.
Object processEventReset(int region_id, String tenant_id, Properties props)Reset events.
Object processEventDelete(int region_id, String tenant_id, Properties props)Delete events.
Object processGetVehicle(Properties props)Get vehicles.
Object processGetCarProbe(Properties props)Get car probes.
Object processGetEvent(Properties props)Get events.
Void clearCache(Properties props)

Interface com.ibm.mobility.adapter.IAdapter

Modifier and type Method and description
Void init(Properties props, String adapter_name)The method is called when the module is created.Parameters:props: configuration propertiesadapter_name: name that is specified in the gateway.properties file.
Void terminate()Terminate the instance.
Object store(String data_name, Object o, Object e_o)Store the specified data.
Object store(String data_name, String line)

Interface com.ibm.mobility.autodrive.parameter.IDataParameter

Modifier and type Method and description
Boolean getParameters(MapString, ListString headers, MapString, String, params, HashMapString, Mapping mapping_list)Normalize the specified parameters by using the mapping list.Parameters:headers: header information for this requestparams: pairs of key and datamapping_list: A mapping list that is defined in the mapping_def.xml file.
Boolean getPosParameters(String data, HashMapString, String mapping_list)Normalize the specified data list by using the mapping list.Parameters:data: values that are defined in a comma-separated valuemapping_list: A mapping list that is defined in the pos_mapping_def.xml file.
Boolean isAsync()Return true if it is an async call.
String getCmd()Return a command, for example SEND_CAR_PROBE.
String getRes_xml()Return results in XML format.
String getTenant_id()Return a tenant ID.
String getCredential()Return a credential.