summaryrefslogtreecommitdiffstats
path: root/example/example.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'example/example.cpp')
-rw-r--r--example/example.cpp16
1 files changed, 11 insertions, 5 deletions
diff --git a/example/example.cpp b/example/example.cpp
index 929e4d1..cc36e88 100644
--- a/example/example.cpp
+++ b/example/example.cpp
@@ -181,11 +181,17 @@ void setupExampleHandler() __attribute__((constructor));
void setupExampleHandler()
{
- auto* manager = getBlobManager();
- if (!manager->registerHandler(std::make_unique<ExampleBlobHandler>()))
- {
- log<level::ERR>("Failed to register Example Handler");
- }
+ // You don't need to do anything in the constructor.
}
} // namespace blobs
+
+/**
+ * This method is required by the blob manager.
+ *
+ * It is called to grab a handler for registering the blob handler instance.
+ */
+std::unique_ptr<blobs::GenericBlobInterface> createHandler()
+{
+ return std::make_unique<blobs::ExampleBlobHandler>();
+}
OpenPOWER on IntegriCloud