Class UpdateTelegramRequest

    • Field Detail

      • callback

        protected transient java.lang.Runnable callback
    • Constructor Detail

      • UpdateTelegramRequest

        protected UpdateTelegramRequest​(java.lang.String endPoint,
                                        java.util.function.Consumer<TelegramException> errorHandler,
                                        java.lang.Runnable callback)
    • Method Detail

      • handleResponse

        public void handleResponse​(okhttp3.Response response)
                            throws java.io.IOException
        Description copied from interface: TelegramRequest
        Handle the response from the server, call any relevant callbacks and do error validation
        Parameters:
        response - The response
        Throws:
        java.io.IOException - If any I/O error occurred
      • isValid

        protected abstract boolean isValid()
        Checks validity of this request. Internal method used before sending.
        Returns:
        If it's valid
      • setCallback

        public void setCallback​(java.lang.Runnable callback)