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.

ServerConnector.java 2.5KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. /*
  2. @VaadinApache2LicenseForJavaFiles@
  3. */
  4. package com.vaadin.terminal.gwt.client;
  5. import java.util.Collection;
  6. import com.vaadin.terminal.gwt.client.communication.ClientRpc;
  7. import com.vaadin.terminal.gwt.client.communication.SharedState;
  8. /**
  9. * Interface implemented by all client side classes that can be communicate with
  10. * the server. Classes implementing this interface are initialized by the
  11. * framework when needed and have the ability to communicate with the server.
  12. *
  13. * @author Vaadin Ltd
  14. * @version @VERSION@
  15. * @since 7.0.0
  16. */
  17. public interface ServerConnector extends Connector {
  18. /**
  19. * TODO
  20. *
  21. * @param uidl
  22. * @param client
  23. */
  24. public void updateFromUIDL(UIDL uidl, ApplicationConnection client);
  25. /**
  26. * Sets a new state for the connector.
  27. *
  28. * @param state
  29. * The new state
  30. * @deprecated This should be removed. Framework should update what is
  31. * returned by getState() instead of setting a new state object.
  32. */
  33. @Deprecated
  34. public void setState(SharedState state);
  35. /**
  36. * Gets ApplicationConnection instance that created this connector.
  37. *
  38. * @return The ApplicationConnection as set by
  39. * {@link #doInit(String, ApplicationConnection)}
  40. */
  41. public ApplicationConnection getConnection();
  42. /**
  43. * Tests whether the connector is enabled or not. Disabled connectors will
  44. * ignore all attempts at communications. Received messages will be
  45. * discarded. This method must check that the connector is enabled in
  46. * context, that is if it's parent is disabled, this method must return
  47. * false.
  48. *
  49. * @return true if the connector is enabled, false otherwise
  50. */
  51. public boolean isEnabled();
  52. /**
  53. *
  54. * Called once by the framework to initialize the connector.
  55. * <p>
  56. * Note that the shared state is not yet available at this point nor any
  57. * hierarchy information.
  58. */
  59. public void doInit(String connectorId, ApplicationConnection connection);
  60. /**
  61. * For internal use by the framework: returns the registered RPC
  62. * implementations for an RPC interface identifier.
  63. *
  64. * TODO interface identifier type or format may change
  65. *
  66. * @param rpcInterfaceId
  67. * RPC interface identifier: fully qualified interface type name
  68. * @return RPC interface implementations registered for an RPC interface,
  69. * not null
  70. */
  71. public <T extends ClientRpc> Collection<T> getRpcImplementations(
  72. String rpcInterfaceId);
  73. }