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.

SerializerMap.java 1.0KB

12345678910111213141516171819202122232425262728293031323334
  1. /*
  2. @VaadinApache2LicenseForJavaFiles@
  3. */
  4. package com.vaadin.terminal.gwt.client.communication;
  5. import com.vaadin.terminal.gwt.widgetsetutils.SerializerMapGenerator;
  6. /**
  7. * Provide a mapping from a type (communicated between the server and the
  8. * client) and a {@link VaadinSerializer} instance.
  9. *
  10. * An implementation of this class is created at GWT compilation time by
  11. * {@link SerializerMapGenerator}, so this interface can be instantiated with
  12. * GWT.create().
  13. *
  14. * @since 7.0
  15. */
  16. public interface SerializerMap {
  17. /**
  18. * Returns a serializer instance for a given type.
  19. *
  20. * @param type
  21. * type communicated on between the server and the client
  22. * (currently fully qualified class name)
  23. * @return serializer instance, not null
  24. * @throws RuntimeException
  25. * if no serializer is found
  26. */
  27. // TODO better error handling in javadoc and in generator
  28. public VaadinSerializer getSerializer(String type);
  29. }