ConfigInterface.php 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Framework\Communication;
  7. use Magento\Framework\Exception\LocalizedException;
  8. /**
  9. * Class for accessing to communication configuration.
  10. *
  11. * @api
  12. * @since 100.1.0
  13. */
  14. interface ConfigInterface
  15. {
  16. const TOPICS = 'topics';
  17. const TOPIC_NAME = 'name';
  18. const TOPIC_HANDLERS = 'handlers';
  19. const TOPIC_REQUEST = 'request';
  20. const TOPIC_RESPONSE = 'response';
  21. const TOPIC_IS_SYNCHRONOUS = 'is_synchronous';
  22. const TOPIC_REQUEST_TYPE = 'request_type';
  23. const TOPIC_REQUEST_TYPE_CLASS = 'object_interface';
  24. const TOPIC_REQUEST_TYPE_METHOD = 'service_method_interface';
  25. const SCHEMA_METHOD_PARAMS = 'method_params';
  26. const SCHEMA_METHOD_RETURN_TYPE = 'method_return_type';
  27. const SCHEMA_METHOD_HANDLER = 'method_callback';
  28. const SCHEMA_METHOD_PARAM_NAME = 'param_name';
  29. const SCHEMA_METHOD_PARAM_POSITION = 'param_position';
  30. const SCHEMA_METHOD_PARAM_TYPE = 'param_type';
  31. const SCHEMA_METHOD_PARAM_IS_REQUIRED = 'is_required';
  32. const HANDLER_TYPE = 'type';
  33. const HANDLER_METHOD = 'method';
  34. const HANDLER_DISABLED = 'disabled';
  35. /**
  36. * Get configuration of the specified topic.
  37. *
  38. * @param string $topicName
  39. * @return array
  40. * @throws LocalizedException
  41. * @since 100.1.0
  42. */
  43. public function getTopic($topicName);
  44. /**
  45. * Get topic handlers.
  46. *
  47. * @param string $topicName
  48. * @return array
  49. * @since 100.1.0
  50. */
  51. public function getTopicHandlers($topicName);
  52. /**
  53. * Get list of all declared topics and their configuration.
  54. *
  55. * @return array
  56. * @since 100.1.0
  57. */
  58. public function getTopics();
  59. }