Can you expand this javadoc to explain the workflow, using minimal examples?