The Notification Proxy
The class
WeatherSummaryNotificationProxy is very similar to the generated proxy on the client side, containing both asynchronous and synchronous service operation methods that are used by the server (see
Implementing the Call to the Notification Endpoint and
The Solicit-Response Operation Call.
Here is a brief excerpt of the proxy’s API:
class WeatherSummaryNotificationProxy : public rwsf::Client {
public:
static WeatherSummaryNotificationProxy make(const std::string&
location = "http://localhost:8090/weather/WeatherSummary"); //1
static WeatherSummaryNotificationProxy
make(const rwsf::Transport& transport); //2
...
void weatherNotification(const wsx::WeatherSummary& weatherData_in); //3
void weatherNotification(rwsf::CallInfo& callInfo,
const wsx::WeatherSummary& weatherData_in);
rwsf::AsyncHandle weatherNotificationStart(
const wsx::WeatherSummary& weatherData_in);
rwsf::AsyncHandle weatherNotificationStart(rwsf::CallInfo& info,
const wsx::WeatherSummary& weatherData_in);
void weatherNotificationEnd(rwsf::AsyncHandle& handle);
bool verifySubscription();
bool verifySubscription(rwsf::CallInfo& callInfo);
rwsf::AsyncHandle verifySubscriptionStart();
rwsf::AsyncHandle verifySubscriptionStart(rwsf::CallInfo& info);
bool verifySubscriptionEnd(rwsf::AsyncHandle& handle);
...
}
WeatherSummaryNotificationProxy notifProxy =
WeatherSummaryNotificationProxy::make(location);