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.

Connector.java 1.7KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. /*
  2. @VaadinApache2LicenseForJavaFiles@
  3. */
  4. package com.vaadin.shared;
  5. import java.io.Serializable;
  6. import com.vaadin.shared.communication.SharedState;
  7. import com.vaadin.terminal.gwt.client.ServerConnector;
  8. import com.vaadin.terminal.gwt.server.ClientConnector;
  9. /**
  10. * Interface implemented by all classes that are capable of communicating with
  11. * the server or the client side.
  12. * <p>
  13. * A connector consists of a shared state (server sets the state and
  14. * automatically communicates changes to the client) and the possibility to do
  15. * RPC calls either from the server to the client or from the client to the
  16. * server.
  17. * </p>
  18. * <p>
  19. * No classes should implement this interface directly, client side classes
  20. * wanting to communicate with server side should implement
  21. * {@link ServerConnector} and server side classes should implement
  22. * {@link ClientConnector}.
  23. * </p>
  24. *
  25. * @author Vaadin Ltd
  26. * @version @VERSION@
  27. * @since 7.0.0
  28. */
  29. public interface Connector extends Serializable {
  30. /**
  31. * Gets the current shared state of the connector.
  32. *
  33. * @since 7.0.
  34. * @return state The shared state object. Can be any sub type of
  35. * {@link SharedState}. Never null.
  36. */
  37. public SharedState getState();
  38. /**
  39. * Returns the id for this connector. This is set by the framework and does
  40. * not change during the lifetime of a connector.
  41. *
  42. * @return The id for the connector.
  43. */
  44. public String getConnectorId();
  45. /**
  46. * Gets the parent connector of this connector, or <code>null</code> if the
  47. * connector is not attached to any parent.
  48. *
  49. * @return the parent connector, or <code>null</code> if there is no parent.
  50. */
  51. public Connector getParent();
  52. }