4 * Created on: Aug 11, 2010
8 #ifndef ORBSERVERIMPL_HH_
9 #define ORBSERVERIMPL_HH_
12 #include <omniORB4/CORBA.h>
14 #include "RequestResponseBus.hh"
15 #include "IServerListener.hh"
22 virtual ~OrbServerImpl();
23 virtual void send_message_and_request_response(plpbus_orb::OrbClient_ptr response_listener_param, const char* msg_req_param);
24 virtual void send_dataitem_message_and_request_response(plpbus_orb::OrbClient_ptr response_listener_param, const ::plpbus_orb::DataItemSequence& req_seq_param);
25 virtual char *send_message_and_wait_response(const char* msg_req_param, ::CORBA::Long& err_flg);
26 virtual CORBA::Long send_dataitem_message_and_wait_response(const ::plpbus_orb::DataItemSequence& req_seq_param, ::plpbus_orb::DataItemSequence_out rsp_seq_param);
27 virtual void add_event_listener(plpbus_orb::OrbClient_ptr client_param,
29 CORBA::UShort period_secs);
30 virtual void shutdown();
32 virtual int launch(const char *server_name);
33 virtual int is_shutdown_pending();
34 virtual void server_thread_closed();
35 virtual int add_server_listener(IServerListener *listener_param);
37 PortableServer::POA_var _poa;
39 IServerListener *_listener;
40 int _server_thread_count;
41 int _shutdown_pending;
42 virtual PortableServer::POA_var create_poa(CORBA::ORB_var orb);
44 * Gets naming context from the name service. If the naming context does not yet exist, create it.
46 CosNaming::NamingContext_var get_service_naming_context(const char *leafcontext_name,
47 const char *leafcontext_kind);
49 * Bind service to naming context.
50 * If service with same name has already been binded, replace the existing service with the new one.
52 bool bind_naming_context_and_service(CosNaming::NamingContext_var service_context_param,
53 CORBA::Object_ptr service_ref_param,
54 const char *service_name_param,
55 const char *service_kind_param);
59 #endif /* ORBSERVERIMPL_HH_ */