You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

RequestHandler.java 1.1KB

123456789101112131415161718192021222324252627282930313233343536
  1. /*
  2. @VaadinApache2LicenseForJavaFiles@
  3. */
  4. package com.vaadin.terminal;
  5. import java.io.IOException;
  6. import java.io.Serializable;
  7. import com.vaadin.Application;
  8. /**
  9. * Handler for producing a response to non-UIDL requests. Handlers can be added
  10. * to applications using {@link Application#addRequestHandler(RequestHandler)}
  11. */
  12. public interface RequestHandler extends Serializable {
  13. /**
  14. * Handles a non-UIDL request. If a response is written, this method should
  15. * return <code>false</code> to indicate that no more request handlers
  16. * should be invoked for the request.
  17. *
  18. * @param application
  19. * The application to which the request belongs
  20. * @param request
  21. * The request to handle
  22. * @param response
  23. * The response object to which a response can be written.
  24. * @return true if a response has been written and no further request
  25. * handlers should be called, otherwise false
  26. * @throws IOException
  27. */
  28. boolean handleRequest(Application application, WrappedRequest request,
  29. WrappedResponse response) throws IOException;
  30. }