Class AcmeJsonResource

    • Method Detail

      • getJSON

        public JSON getJSON()
        Returns the JSON representation of the resource data.

        If there is no data, update() is invoked to fetch it from the server.

        This method can be used to read proprietary data from the resources.

        Resource data, as JSON.
      • setJSON

        protected void setJSON​(JSON data)
        Sets the JSON representation of the resource data.
        data - New JSON data, must not be null.
      • isValid

        protected boolean isValid()
        Checks if this resource is valid.
        true if the resource state has been loaded from the server. If false, getJSON() would implicitly call update() to fetch the current state from the server.
      • update

        public void update()
                    throws AcmeException
        Updates this resource, by fetching the current resource data from the server.
        AcmeException - if the resource could not be fetched.
        AcmeRetryAfterException - the resource is still being processed, and the server returned an estimated date when the process will be completed. If you are polling for the resource to complete, you should wait for the date given in AcmeRetryAfterException.getRetryAfter(). Note that the status of the resource is updated even if this exception was thrown.