46 template<
typename PacketTypePtr>
57 : queue_type_(queue_type) {}
69 virtual void enqueuePacket(PacketTypePtr packet,
const SocketInfo& source) = 0;
78 virtual PacketTypePtr dequeuePacket() = 0;
81 virtual bool empty()
const = 0;
84 virtual size_t getSize()
const = 0;
87 virtual void clear() = 0;
112 std::ostringstream os;
119 return (queue_type_);
124 std::string queue_type_;
141 #endif // PACKET_QUEUE_H
std::string getQueueType()
std::string getInfoStr() const
Fetches a JSON string representation of queue operational info.
virtual data::ElementPtr getInfo() const
Fetches operational information about the current state of the queue.
Interface for managing a queue of inbound DHCP packets.
boost::shared_ptr< Element > ElementPtr
QueueEnd
Enumerates choices between the two ends of the queue.
static ElementPtr createMap(const Position &pos=ZERO_POSITION())
Creates an empty MapElement type ElementPtr.
virtual const char * what() const
Returns a C-style character string of the cause of the exception.
boost::shared_ptr< PacketQueue< Pkt4Ptr > > PacketQueue4Ptr
Defines pointer to the DHCPv4 queue interface used at the application level.
InvalidQueueParameter(const char *file, size_t line, const char *what)
boost::shared_ptr< PacketQueue< Pkt6Ptr > > PacketQueue6Ptr
Defines pointer to the DHCPv6 queue interface used at the application level.
This is a base class for exceptions thrown from the DNS library module.
Defines the logger used by the top-level component of kea-lfc.
static ElementPtr create(const Position &pos=ZERO_POSITION())
virtual ~PacketQueue()
Virtual destructor.
PacketQueue(const std::string &queue_type)
Constructor.
Invalid queue parameter exception.
Holds information about socket.