interfaces.py 686 B

12345678910111213141516171819202122232425262728293031
  1. # Copyright (c) Twisted Matrix Laboratories.
  2. # See LICENSE for details.
  3. """
  4. Twisted Spread Interfaces.
  5. """
  6. from zope.interface import Interface
  7. class IJellyable(Interface):
  8. def jellyFor(jellier):
  9. """
  10. Jelly myself for jellier.
  11. """
  12. class IUnjellyable(Interface):
  13. def unjellyFor(jellier, jellyList):
  14. """
  15. Unjelly myself for the jellier.
  16. @param jellier: A stateful object which exists for the lifetime of a
  17. single call to L{unjelly}.
  18. @param jellyList: The C{list} which represents the jellied state of the
  19. object to be unjellied.
  20. @return: The object which results from unjellying.
  21. """