CatapultServer  v0.5.0.1 (Elephant)
catapult::handlers::BatchHandlerFactory< TRequestTraits > Class Template Reference

Factory for creating a handler that returns batch of entities. More...

Classes

struct  AppendAccessor
 
struct  AppendAccessor< T, utils::traits::is_type_expression_t< decltype(T::Should_Append_As_Values)> >
 
struct  PacketInfo
 

Static Public Member Functions

template<typename TResultsProducerFactory >
static void RegisterZero (ionet::ServerPacketHandlers &handlers, TResultsProducerFactory resultsProducerFactory)
 
template<typename TResultsProducerFactory >
static void RegisterOne (ionet::ServerPacketHandlers &handlers, TResultsProducerFactory resultsProducerFactory)
 

Static Public Attributes

static constexpr auto Packet_Type = TRequestTraits::Packet_Type
 Packet type supported by the created handler. More...
 

Private Types

enum  AppendType { AppendType::Entities, AppendType::Values }
 
using EntitiesAppendFlag = std::integral_constant< AppendType, AppendType::Entities >
 
using ValuesAppendFlag = std::integral_constant< AppendType, AppendType::Values >
 

Static Private Member Functions

template<typename TProducer >
static void SetResponse (ionet::ServerPacketHandlerContext &context, uint32_t maxPacketDataSize, TProducer &&producer)
 
template<typename TProducer >
static void Append (EntitiesAppendFlag, ionet::PacketPayloadBuilder &builder, TProducer &producer)
 
template<typename TProducer >
static void Append (ValuesAppendFlag, ionet::PacketPayloadBuilder &builder, TProducer &producer)
 
static auto ProcessRequest (const ionet::Packet &packet)
 

Detailed Description

template<typename TRequestTraits>
class catapult::handlers::BatchHandlerFactory< TRequestTraits >

Factory for creating a handler that returns batch of entities.

Member Typedef Documentation

◆ EntitiesAppendFlag

template<typename TRequestTraits >
using catapult::handlers::BatchHandlerFactory< TRequestTraits >::EntitiesAppendFlag = std::integral_constant<AppendType, AppendType::Entities>
private

◆ ValuesAppendFlag

template<typename TRequestTraits >
using catapult::handlers::BatchHandlerFactory< TRequestTraits >::ValuesAppendFlag = std::integral_constant<AppendType, AppendType::Values>
private

Member Enumeration Documentation

◆ AppendType

template<typename TRequestTraits >
enum catapult::handlers::BatchHandlerFactory::AppendType
strongprivate
Enumerator
Entities 
Values 

Member Function Documentation

◆ Append() [1/2]

template<typename TRequestTraits >
template<typename TProducer >
static void catapult::handlers::BatchHandlerFactory< TRequestTraits >::Append ( EntitiesAppendFlag  ,
ionet::PacketPayloadBuilder builder,
TProducer &  producer 
)
inlinestaticprivate
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Append() [2/2]

template<typename TRequestTraits >
template<typename TProducer >
static void catapult::handlers::BatchHandlerFactory< TRequestTraits >::Append ( ValuesAppendFlag  ,
ionet::PacketPayloadBuilder builder,
TProducer &  producer 
)
inlinestaticprivate
Here is the call graph for this function:

◆ ProcessRequest()

template<typename TRequestTraits >
static auto catapult::handlers::BatchHandlerFactory< TRequestTraits >::ProcessRequest ( const ionet::Packet packet)
inlinestaticprivate
Here is the caller graph for this function:

◆ RegisterOne()

template<typename TRequestTraits >
template<typename TResultsProducerFactory >
static void catapult::handlers::BatchHandlerFactory< TRequestTraits >::RegisterOne ( ionet::ServerPacketHandlers handlers,
TResultsProducerFactory  resultsProducerFactory 
)
inlinestatic

Registers a handler in handlers that uses resultsProducerFactory to produce results.

Note
producer accepts a single range argument.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ RegisterZero()

template<typename TRequestTraits >
template<typename TResultsProducerFactory >
static void catapult::handlers::BatchHandlerFactory< TRequestTraits >::RegisterZero ( ionet::ServerPacketHandlers handlers,
TResultsProducerFactory  resultsProducerFactory 
)
inlinestatic

Registers a handler in handlers that uses resultsProducerFactory to produce results.

Note
producer does not accept any arguments.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetResponse()

template<typename TRequestTraits >
template<typename TProducer >
static void catapult::handlers::BatchHandlerFactory< TRequestTraits >::SetResponse ( ionet::ServerPacketHandlerContext context,
uint32_t  maxPacketDataSize,
TProducer &&  producer 
)
inlinestaticprivate
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ Packet_Type

template<typename TRequestTraits >
constexpr auto catapult::handlers::BatchHandlerFactory< TRequestTraits >::Packet_Type = TRequestTraits::Packet_Type
staticconstexpr

Packet type supported by the created handler.


The documentation for this class was generated from the following file: