public class FaultCodes extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
FaultCodes.Bus |
static class |
FaultCodes.MessageType |
| Modifier and Type | Field and Description |
|---|---|
static String |
FAULT_CODE_BASE
The base URL path for all fault code data.
|
| Constructor and Description |
|---|
FaultCodes(HttpClient client) |
public static final String FAULT_CODE_BASE
public FaultCodes(HttpClient client)
public void notifyListeners(FaultCodeEvent e)
listener associated
with e's shortname (if there are any), and then
the "catch-all" listener (if any).e - the event to be used to trigger the aforementioned listenerspublic void removeAllListeners()
WVA.removeAllFaultCodeListeners()public void updateCachedFaultCode(FaultCodeEvent e)
notifyListeners(FaultCodeEvent) with e.
It is convenient for testing when no WVA and/or TCP connection is
available.e - a FaultCodeEvent objectpublic void updateCachedFaultCode(String uri, FaultCodeResponse response)
notifyListeners(FaultCodeEvent) with a new FaultCodeEvent
constructed using uri and response.
It is convenient for testing when no WVA and/or TCP connection is
available.uri - the web service URI whose data is being updatedresponse - the data from the WVApublic void setFaultCodeListener(FaultCodeListener listener)
WVA.setFaultCodeListener(FaultCodeListener)public void removeFaultCodeListener()
WVA.removeFaultCodeListener()public void setFaultCodeListener(FaultCodes.Bus bus, FaultCodes.MessageType type, String ecu, FaultCodeListener listener)
WVA.setFaultCodeListener(FaultCodes.Bus, FaultCodes.MessageType, String, FaultCodeListener)public void removeFaultCodeListener(FaultCodes.Bus bus, FaultCodes.MessageType type, String ecu)
WVA.removeFaultCodeListener(FaultCodes.Bus, FaultCodes.MessageType, String)public FaultCodeResponse getCachedFaultCode(FaultCodes.Bus bus, FaultCodes.MessageType type, String ecu)
WVA.getCachedFaultCode(FaultCodes.Bus, FaultCodes.MessageType, String)public void fetchFaultCode(FaultCodes.Bus bus, FaultCodes.MessageType type, String ecu, WvaCallback<FaultCodeResponse> cb)
WVA.fetchFaultCode(FaultCodes.Bus, FaultCodes.MessageType, String, WvaCallback)public void fetchEcuNames(FaultCodes.Bus bus, WvaCallback<Set<String>> callback)
WVA.fetchFaultCodeEcuNames(FaultCodes.Bus, WvaCallback)public void subscribe(FaultCodes.Bus bus, FaultCodes.MessageType type, String ecu, int seconds, WvaCallback<Void> cb) throws JSONException
WVA.subscribeToFaultCodes(FaultCodes.Bus, FaultCodes.MessageType, String, int, WvaCallback)JSONException - If an error occurs while creating the requestpublic void unsubscribe(FaultCodes.Bus bus, FaultCodes.MessageType type, String ecu, WvaCallback<Void> cb)
WVA.unsubscribeFromFaultCodes(FaultCodes.Bus, FaultCodes.MessageType, String, WvaCallback)public void createAlarm(FaultCodes.Bus bus, FaultCodes.MessageType type, String ecu, int seconds, WvaCallback<Void> cb) throws JSONException
WVA.createFaultCodeAlarm(FaultCodes.Bus, FaultCodes.MessageType, String, int, WvaCallback)JSONException - if an error occurs in generating the JSON data
being sent to the WVA to create the alarmpublic void deleteAlarm(FaultCodes.Bus bus, FaultCodes.MessageType type, String ecu, WvaCallback<Void> cb)
WVA.deleteFaultCodeAlarm(FaultCodes.Bus, FaultCodes.MessageType, String, WvaCallback)