There's currently a helper method in this class for getting the public address.  I think this line can become:

    return getAddress().toString() + context.getRequest().getUri();