summaryrefslogtreecommitdiff
path: root/ACE/TAO/DevGuideExamples/PortableInterceptors/IOR/ServerInitializer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ACE/TAO/DevGuideExamples/PortableInterceptors/IOR/ServerInitializer.cpp')
-rw-r--r--ACE/TAO/DevGuideExamples/PortableInterceptors/IOR/ServerInitializer.cpp32
1 files changed, 32 insertions, 0 deletions
diff --git a/ACE/TAO/DevGuideExamples/PortableInterceptors/IOR/ServerInitializer.cpp b/ACE/TAO/DevGuideExamples/PortableInterceptors/IOR/ServerInitializer.cpp
new file mode 100644
index 00000000000..85546623723
--- /dev/null
+++ b/ACE/TAO/DevGuideExamples/PortableInterceptors/IOR/ServerInitializer.cpp
@@ -0,0 +1,32 @@
+// $Id$
+
+#include "ServerInitializer.h"
+#include "ServerInterceptor.h"
+#include "ServerIORInterceptor.h"
+
+ServerInitializer::ServerInitializer ()
+{
+}
+
+void
+ServerInitializer::pre_init (
+ PortableInterceptor::ORBInitInfo_ptr)
+{
+}
+
+void
+ServerInitializer::post_init (
+ PortableInterceptor::ORBInitInfo_ptr info)
+{
+ // get reference to the codec_factory
+ IOP::CodecFactory_var codec_factory = info->codec_factory();
+
+ // Create and register the request interceptors.
+ PortableInterceptor::ServerRequestInterceptor_var si =
+ new ServerInterceptor (codec_factory);
+ info->add_server_request_interceptor (si.in());
+
+ // add IOR Interceptor
+ PortableInterceptor::IORInterceptor_var iori = new ServerIORInterceptor;
+ info->add_ior_interceptor (iori.in());
+}