'Passing Parameters In Abstract Method

I have an abstract class in Java that has this method called

public abstract void onImageRendered(BufferedImage render)

I want the user to access the rendered image with this method. I have another method called

public void render()

That renders the image. The buffered image in the abstract method should not be any image but the rendered image from this method.
How do I pass the rendered image from that method as the parameter of the abstract method?
Here is my code:

public static void render(Scene scene) throws MORISIllegalMethodCallException{
    if(propertiesAreSet){
        Camera activeCamera = scene.getActiveCamera();

        for (int x = 0; x < activeCamera.getWidth(); x++) {
            for (int y = 0; y < activeCamera.getHeight(); y++) {
                Ray ray = Ray.shootAt(activeCamera.getOrigin(), new Vector(x - activeCamera.getWidth()/2.0, activeCamera.getHeight()/2.0 - y, -(activeCamera.getHeight()/2.0)/Math.tan(activeCamera.getFov() * 0.5)).mul(activeCamera.getDirection()).normalize());
                for (Renderable object : scene.getSceneObjects()) {
                    if (object.intersects(ray)){
                        //Assign colors to buffered image object "this.image" and do other necessary things
                    }
                }
            }
        }
    }else {
        throw new MORISIllegalMethodCallException("The method moris.renderer.MORISRT.setProperties(int, double) should be executed before invoking the method moris.renderer.MORISRT.render(moris.scene.Scene)");
    }
}

abstract void onImageRendered(BufferedImage renderedImage);//Here, the BufferedImage object should be "this.image"

The rendered image is something like this: Here is the rendered image
I tried searching StackOverflow for similar questions and also checked some other sources but they didn't seem to help.
Any suggestions would be appreciated.
Thanks in advance.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source