eventqueue.hpp 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /*##############################################################################
  2. HPCC SYSTEMS software Copyright (C) 2012 HPCC Systems®.
  3. Licensed under the Apache License, Version 2.0 (the "License");
  4. you may not use this file except in compliance with the License.
  5. You may obtain a copy of the License at
  6. http://www.apache.org/licenses/LICENSE-2.0
  7. Unless required by applicable law or agreed to in writing, software
  8. distributed under the License is distributed on an "AS IS" BASIS,
  9. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  10. See the License for the specific language governing permissions and
  11. limitations under the License.
  12. ############################################################################## */
  13. #ifndef __EVENTQUEUE_HPP_
  14. #define __EVENTQUEUE_HPP_
  15. #ifdef SCHEDULECTRL_EXPORTS
  16. #define SCHEDULECTRL_API DECL_EXPORT
  17. #else
  18. #define SCHEDULECTRL_API DECL_IMPORT
  19. #endif
  20. #include "jexcept.hpp"
  21. //PG MORE: forms for pushing with an XML payload, and passing it through the system
  22. interface IScheduleEventPusher : public IInterface
  23. {
  24. virtual unsigned push(char const * name, char const * text, const char * target) = 0;
  25. };
  26. interface IScheduleEventProcessor : public IInterface
  27. {
  28. virtual void start() = 0;
  29. virtual void stop() = 0;
  30. };
  31. interface IScheduleEventExecutor : public IInterface
  32. {
  33. virtual void execute(char const * wuid, char const * name, char const * text) = 0;
  34. };
  35. extern SCHEDULECTRL_API IScheduleEventPusher * getScheduleEventPusher();
  36. extern SCHEDULECTRL_API IScheduleEventProcessor * getScheduleEventProcessor(char const * serverName, IScheduleEventExecutor * executor, IExceptionHandler * handler); //owns executor
  37. #endif