org.jwalk
Interface QuestionListener

All Superinterfaces:
java.util.EventListener
All Known Implementing Classes:
Console, QuestionMaster

public interface QuestionListener
extends java.util.EventListener

QuestionListener is the listener interface for receiving question events. Client programs should register an object implementing this interface with JWalker's Channels API. The registered object must implement the single respond() method declared below. This will cause the object to interact with the user to obtain the Answer to a Question.

Version:
1.0
Author:
Anthony Simons

Method Summary
 Answer respond(QuestionEvent event)
          Accept a QuestionEvent.
 

Method Detail

respond

Answer respond(QuestionEvent event)
Accept a QuestionEvent. Typically, implementors should extract the Question from the event and display the contents of the Question in some way, then interrogate the user until a suitable Answer is generated by way of response.

Parameters:
event - the QuestionEvent being dispatched to this listener.
Returns:
an Answer, one of {YES, NO, QUIT}.