30 template <
typename T,
typename R,
typename P = DefaultPipeline>
49 void readEOF(Context* ctx)
override;
53 void onNext(
const T& buf)
override;
67 std::shared_ptr<bool>
deleted_{
new bool(
false)};
73 template <
typename T,
typename R,
typename P = DefaultPipeline>
80 : serverPool_(serverPool),
81 broadcastPipelineFactory_(broadcastPipelineFactory) {}
84 std::shared_ptr<folly::AsyncTransportWrapper>
socket,
87 std::shared_ptr<TransportInfo> transportInfo)
override {
90 auto handler = std::make_shared<ObservingHandler<T, R, P>>(
95 pipeline->setTransportInfo(transportInfo);
105 serverPool_, broadcastPipelineFactory_, clientFactory));
void readEOF(Context *ctx) override
R & routingData() override
std::shared_ptr< bool > deleted_
HandlerAdapter< folly::IOBufQueue &, T >::Context Context
BroadcastHandler< T, R > * broadcastHandler_
void onError(folly::exception_wrapper ex) override
ObservingHandler(const R &routingData, BroadcastPool< T, R, P > *broadcastPool)
std::shared_ptr< BroadcastPipelineFactory< T, R > > broadcastPipelineFactory_
ObservingHandler & operator=(const ObservingHandler &)=delete
ObservingPipeline< T >::Ptr newPipeline(std::shared_ptr< folly::AsyncTransportWrapper > socket, const R &routingData, RoutingDataHandler< R > *, std::shared_ptr< TransportInfo > transportInfo) override
void handler(int, siginfo_t *, void *)
std::shared_ptr< ServerPool< R, P > > serverPool_
BroadcastPool< T, R, P > * broadcastPool_
NetworkSocket socket(int af, int type, int protocol)
ObservingPipelineFactory(std::shared_ptr< ServerPool< R, P >> serverPool, std::shared_ptr< BroadcastPipelineFactory< T, R >> broadcastPipelineFactory)
~ObservingHandler() override
void onNext(const T &buf) override
std::shared_ptr< Pipeline > Ptr
void transportActive(Context *ctx) override
void readException(Context *ctx, folly::exception_wrapper ex) override
virtual BroadcastPool< T, R, P > * broadcastPool(std::shared_ptr< BaseClientBootstrapFactory<>> clientFactory=nullptr)
folly::ThreadLocalPtr< BroadcastPool< T, R, P > > broadcastPool_
void onCompleted() override