Implement the builder for setting up Event Channel multicast gateway. NOT THREAD-SAFE.
More...
Public Member Functions |
| TAO_ECG_Mcast_Gateway (void) |
| Constructor.
|
int | init (const char *address_server_arg, const Attributes &attributes=Attributes()) |
int | init (const RtecEventChannelAdmin::ConsumerQOS &consumer_qos, const char *address_server_arg, const Attributes &attributes=Attributes()) |
void | run (CORBA::ORB_ptr orb, RtecEventChannelAdmin::EventChannel_ptr ec) |
|
virtual int | init (int argc, ACE_TCHAR *argv[]) |
| The Service_Object entry points.
|
virtual int | fini (void) |
| The Service_Object entry points.
|
| ACE_Service_Object (ACE_Reactor *=0) |
virtual | ~ACE_Service_Object (void) |
virtual int | suspend (void) |
virtual int | resume (void) |
virtual | ~ACE_Event_Handler (void) |
virtual ACE_HANDLE | get_handle (void) const |
virtual void | set_handle (ACE_HANDLE) |
virtual int | priority (void) const |
virtual void | priority (int priority) |
virtual int | handle_input (ACE_HANDLE fd=ACE_INVALID_HANDLE) |
virtual int | handle_output (ACE_HANDLE fd=ACE_INVALID_HANDLE) |
virtual int | handle_exception (ACE_HANDLE fd=ACE_INVALID_HANDLE) |
virtual int | handle_timeout (const ACE_Time_Value ¤t_time, const void *act=0) |
virtual int | handle_exit (ACE_Process *) |
virtual int | handle_close (ACE_HANDLE handle, ACE_Reactor_Mask close_mask) |
virtual int | handle_signal (int signum, siginfo_t *=0, ucontext_t *=0) |
virtual int | resume_handler (void) |
virtual int | handle_qos (ACE_HANDLE=ACE_INVALID_HANDLE) |
virtual int | handle_group_qos (ACE_HANDLE=ACE_INVALID_HANDLE) |
virtual void | reactor (ACE_Reactor *reactor) |
virtual ACE_Reactor * | reactor (void) const |
virtual
ACE_Reactor_Timer_Interface * | reactor_timer_interface (void) const |
virtual Reference_Count | add_reference (void) |
virtual Reference_Count | remove_reference (void) |
Reference_Counting_Policy & | reference_counting_policy (void) |
| ACE_Shared_Object (void) |
virtual | ~ACE_Shared_Object (void) |
virtual int | info (ACE_TCHAR **info_string, size_t length=0) const |
Implement the builder for setting up Event Channel multicast gateway. NOT THREAD-SAFE.
This class simplifies creation of federated Event Channels by presenting a simple unified interface for creating and configuring all components needed to federate an Event Channel. Configuration options are described below.
NOTE: This class does not own any of the components it creates and its lifetime is independent of theirs. This class acts purely as a wrapper facade for creating and wiring appropriate components together.
- Todo:
- This class is an ACE_Service_Object, but the only reason for it is the need for easy configuration using files. Since ACE_Service_Object provides much more than that, we should look into replacing it with a more lightweight utility that would serve our needs.
CONFIGURATION OPTIONS There are two ways to use this class: 1) Use service config file to specify configuration options (which are described below), and use service configurator to obtain a an instance of configured TAO_ECG_Mcast_Gateway in your program. (See TAO/orbsvcs/tests/Event/Mcast/Common and TAO/orbsvcs/tests/Event/Mcast/Simple for an example.)
Service config file options:
-ECGService <service> Valid values: sender, receiver, two_way Specifies whether this gateway should act as a multicast sender of the events or multicast receiver, or both.
-ECGAddressServer <server_type> Valid values: basic, source, type Specifies what implementation of the address server should be used by the gateway. basic - the same multicast address is returned for all event headers. source - multicast addresses are returned based on the event source, according to the mapping provided at initialization. type - multicast addresses are returned based on the event type, according to the mapping provided at initialization.
-ECGAddressServerArg <arg> Valid value: arg is a string, whose format requirements are specific to the implementation of address server used. Arg is not interpreted by the gateway, but simply passed to the address server specified by -ECGAddressServer during initialization. THIS OPTION MUST ALWAYS BE SPECIFIED BY THE USER (there is no default value for it)
-ECGHandler <handler_type> Valid values: basic, complex, udp Specifies what implementation of event handler should be used if gateway is acting as events receiver. basic - a simple event handler listening on a single mcast address. complex - event handler listening on multiple mcast addresses based on events of interest to consumers. udp - similar to basic handler, except listens on udp address as opposed to a multicast group.
-ECGTTL <ttl> Valid values: a number > 0 IP_Multicast time to live value that should be set on a sending socket. This option matters only if the gateway is acting as a sender of mcast messages.
-ECGNIC <nic> Valid values: name of the network interface This interface is used for sending and/or receiving multicast messages.
-ECGNonBlocking Boolean flag to configure if the socket is in blocking or non-blocking code. The default is non-blocking. NOTE: Certain device drivers block the process if the physical link fails.
2) Create an instance of TAO_ECG_Mcast_Gateway in your code, on the stack or dynamically, and use init () method to configure it. No configuration files involved. See service config options above for the description of configurable options, and init() method below for how to specify them.
Default configuration values (for either use case) can be found in ECG_Defaults.h