face: override Transport::beforeChangePersistency in all subclasses
This commit also adds the final specifier to some Transport
subclasses in order to improve code generation.
Change-Id: If2979fa1614476a98019ba79cee3961663fc447b
Refs: #3318
diff --git a/daemon/face/internal-transport.cpp b/daemon/face/internal-transport.cpp
index 070a4b5..cc3e0a6 100644
--- a/daemon/face/internal-transport.cpp
+++ b/daemon/face/internal-transport.cpp
@@ -46,6 +46,15 @@
}
void
+InternalForwarderTransport::beforeChangePersistency(ndn::nfd::FacePersistency newPersistency)
+{
+ if (newPersistency != ndn::nfd::FACE_PERSISTENCY_PERMANENT) {
+ BOOST_THROW_EXCEPTION(
+ std::invalid_argument("InternalForwarderTransport supports only FACE_PERSISTENCY_PERMANENT"));
+ }
+}
+
+void
InternalForwarderTransport::receiveFromLink(const Block& packet)
{
NFD_LOG_FACE_TRACE(__func__);