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();
24 virtual void send_message_and_request_response(plpbus_orb::OrbClient_ptr response_listener_param, const char* msg_req_param);
25 virtual void send_dataitem_message_and_request_response(plpbus_orb::OrbClient_ptr response_listener_param, const ::plpbus_orb::DataItemSequence& req_seq_param);
26 virtual char *send_message_and_wait_response(const char* msg_req_param, ::CORBA::Long& err_flg);
27 virtual CORBA::Long send_dataitem_message_and_wait_response(const ::plpbus_orb::DataItemSequence& req_seq_param, ::plpbus_orb::DataItemSequence_out rsp_seq_param);
28 virtual void add_event_listener(plpbus_orb::OrbClient_ptr client_param,
30 CORBA::UShort period_secs);
31 virtual void shutdown();
33 virtual int launch(const char *server_name);
34 virtual int is_shutdown_pending();
35 virtual void server_thread_closed();
36 virtual int add_server_listener(IServerListener *listener_param);
38 PortableServer::POA_var _poa;
40 IServerListener *_listener;
41 int _server_thread_count;
42 int _shutdown_pending;
43 virtual PortableServer::POA_var create_poa(CORBA::ORB_var orb);
45 * Gets naming context from the name service. If the naming context does not yet exist, create it.
47 CosNaming::NamingContext_var get_service_naming_context(const char *leafcontext_name,
48 const char *leafcontext_kind);
50 * Bind service to naming context.
51 * If service with same name has already been binded, replace the existing service with the new one.
53 bool bind_naming_context_and_service(CosNaming::NamingContext_var service_context_param,
54 CORBA::Object_ptr service_ref_param,
55 const char *service_name_param,
56 const char *service_kind_param);
60 #endif /* ORBSERVERIMPL_HH_ */