Add a java class to return a message