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 2.0KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. /*
  2. @VaadinApache2LicenseForJavaFiles@
  3. */
  4. package com.vaadin.terminal.gwt.client;
  5. import com.vaadin.terminal.gwt.client.communication.SharedState;
  6. /**
  7. * Interface implemented by all client side classes that can be communicate with
  8. * the server. Classes implementing this interface are initialized by the
  9. * framework when needed and have the ability to communicate with the server.
  10. *
  11. * @author Vaadin Ltd
  12. * @version @VERSION@
  13. * @since 7.0.0
  14. */
  15. public interface Connector {
  16. /**
  17. * TODO
  18. *
  19. * @param uidl
  20. * @param client
  21. */
  22. public void updateFromUIDL(UIDL uidl, ApplicationConnection client);
  23. /**
  24. * Gets the current shared state of the connector.
  25. *
  26. * @return state
  27. */
  28. public SharedState getState();
  29. /**
  30. * Sets a new state for the connector.
  31. *
  32. * @param state
  33. * The new state
  34. *
  35. */
  36. public void setState(SharedState state);
  37. /**
  38. * Returns the id for this connector. This must always be what has been set
  39. * in {@link #init(String, ApplicationConnection)} and must never change.
  40. *
  41. * @return The id for the connector.
  42. */
  43. public String getId();
  44. /**
  45. * Gets ApplicationConnection instance that created this connector.
  46. *
  47. * @return The ApplicationConnection as set by
  48. * {@link #init(String, ApplicationConnection)}
  49. */
  50. public ApplicationConnection getConnection();
  51. /**
  52. * Tests whether the component is enabled or not. A user can not interact
  53. * with disabled components. Disabled components are rendered in a style
  54. * that indicates the status, usually in gray color. Children of a disabled
  55. * component are also disabled.
  56. *
  57. * @return true if the component is enabled, false otherwise
  58. */
  59. // public boolean isEnabled();
  60. /**
  61. *
  62. * Called once by the framework to initialize the connector.
  63. *
  64. * Note that the shared state is not yet available at this point.
  65. */
  66. public void doInit(String connectorId, ApplicationConnection connection);
  67. }