Package com.dynatrace.android.agent.comm
Interface CommunicationProblemListener
-
public interface CommunicationProblemListenerInterface definition for a callback to be invoked when the agent was not able to successfully communicate with the beacon endpoint.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidonError(Throwable throwable)called when the agent was not able to receive an http response.voidonFailure(int responseCode, String responseMessage, String body)called when the agent successfully received an http response, but the response is invalid.
-
-
-
Method Detail
-
onFailure
void onFailure(int responseCode, String responseMessage, String body)called when the agent successfully received an http response, but the response is invalid. In this case the agent does not automatically reconnect to the beacon endpoint. Adjust the agent configuration withDynatrace.setBeaconHeaders(Map)and the agent will send a new http request (with the specified headers) to the beacon endpoint.- Parameters:
responseCode- status code from the received http responseresponseMessage- message from the received http responsebody- the body from the received http response- See Also:
Dynatrace.setBeaconHeaders(Map)
-
onError
void onError(Throwable throwable)
called when the agent was not able to receive an http response. In this case the agent will wait a certain amount of time and then tries to reconnect to the beacon endpoint.- Parameters:
throwable- the reason why the agent was not able receive an http response- See Also:
HttpURLConnection
-
-