diff options
Diffstat (limited to 'ACE/TAO/DevGuideExamples/PortableInterceptors/Auth/ClientInitializer.cpp')
-rw-r--r-- | ACE/TAO/DevGuideExamples/PortableInterceptors/Auth/ClientInitializer.cpp | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/ACE/TAO/DevGuideExamples/PortableInterceptors/Auth/ClientInitializer.cpp b/ACE/TAO/DevGuideExamples/PortableInterceptors/Auth/ClientInitializer.cpp new file mode 100644 index 00000000000..2311df25b71 --- /dev/null +++ b/ACE/TAO/DevGuideExamples/PortableInterceptors/Auth/ClientInitializer.cpp @@ -0,0 +1,38 @@ +// $Id$ + +#include "ClientInitializer.h" +#include "ClientInterceptor.h" +#include <iostream> + +ClientInitializer::ClientInitializer (void) +{ +} + +void +ClientInitializer::pre_init (PortableInterceptor::ORBInitInfo_ptr) +{ +} + +void +ClientInitializer::post_init (PortableInterceptor::ORBInitInfo_ptr info) +{ + + // Create and register the request interceptors. + PortableInterceptor::ClientRequestInterceptor_ptr ci = + PortableInterceptor::ClientRequestInterceptor::_nil (); + + try + { + ci = new ClientInterceptor(); + } + catch(...) + { + std::cerr << "Exception ocurred creating ClientInterceptor" << std::endl; + } + + PortableInterceptor::ClientRequestInterceptor_var ci_interceptor = + ci; + + info->add_client_request_interceptor (ci_interceptor.in ()); +} + |