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.

SessionExpiredHandler.java 1.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /*
  2. * Copyright 2000-2018 Vaadin Ltd.
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License"); you may not
  5. * use this file except in compliance with the License. You may obtain a copy of
  6. * the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  12. * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
  13. * License for the specific language governing permissions and limitations under
  14. * the License.
  15. */
  16. package com.vaadin.server;
  17. import java.io.IOException;
  18. /**
  19. * A specialized RequestHandler which is capable of sending session expiration
  20. * messages to the user.
  21. *
  22. * @since 7.1
  23. * @author Vaadin Ltd
  24. */
  25. public interface SessionExpiredHandler extends RequestHandler {
  26. /**
  27. * Called when the a session expiration has occurred and a notification
  28. * needs to be sent to the user. If a response is written, this method
  29. * should return <code>true</code> to indicate that no more
  30. * {@link SessionExpiredHandler} handlers should be invoked for the request.
  31. *
  32. * @param request
  33. * The request to handle
  34. * @param response
  35. * The response object to which a response can be written.
  36. * @return true if a response has been written and no further request
  37. * handlers should be called, otherwise false
  38. * @throws IOException
  39. * If an IO error occurred
  40. * @since 7.1
  41. */
  42. boolean handleSessionExpired(VaadinRequest request, VaadinResponse response)
  43. throws IOException;
  44. }