Subscriber.hpp

This File On Github
Ask A Question

API: latest
module: oatpp
#include "oatpp/web/url/mapping/Subscriber.hpp"

Subscriber

Abstract subscriber which can subscribe to incoming events from oatpp::web::url::mapping::Router and process those events.

  • @tparam Event - incoming event type.
  • @tparam Result - result of event processing.

namespace oatpp { namespace web { namespace url { namespace mapping { 
  template<class Event, class Result>
  class Subscriber {}
}}}}

Methods

Return Type Name Summary
Result processEvent Process event.
oatpp::async::CoroutineStarterForResult<const Result&> processEventAsync Process event in asynchronous manner.

Subscriber::processEvent

Process event.

  • @param Event - some incoming data.
  • @return - some outgoing data.

virtual Result processEvent(const Event& event) = 0

Subscriber::processEventAsync

Process event in asynchronous manner.

  • @param event - some incoming data.
  • @return - oatpp::async::CoroutineStarterForResult.

virtual oatpp::async::CoroutineStarterForResult<const Result&> processEventAsync(const Event& event) = 0