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.

ApplicationStartedEvent.java 1.2KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /*
  2. @VaadinApache2LicenseForJavaFiles@
  3. */
  4. package com.vaadin.terminal.gwt.server;
  5. import java.util.EventObject;
  6. import com.vaadin.Application;
  7. /**
  8. * Event used by
  9. * {@link ApplicationStartedListener#applicationStarted(ApplicationStartedEvent)}
  10. * .
  11. *
  12. * @author Vaadin Ltd
  13. * @since 7.0.0
  14. */
  15. public class ApplicationStartedEvent extends EventObject {
  16. private final Application application;
  17. /**
  18. * Creates a new event.
  19. *
  20. * @param context
  21. * the add-on context that will fire the event
  22. * @param application
  23. * the application that has been started
  24. */
  25. public ApplicationStartedEvent(AddonContext context, Application application) {
  26. super(context);
  27. this.application = application;
  28. }
  29. /**
  30. * Gets the add-on context from which this event originated.
  31. *
  32. * @return the add-on context that fired the
  33. */
  34. public AddonContext getContext() {
  35. return (AddonContext) getSource();
  36. }
  37. /**
  38. * Gets the newly started Application.
  39. *
  40. * @return the newly created application
  41. */
  42. public Application getApplication() {
  43. return application;
  44. }
  45. }