java class prepared for the interaction with javascript