3 //=============================================================================
7 * @author Priyanka Gontla (gontla_p@ociweb.com)
9 //=============================================================================
12 #ifndef TAO_MCAST_PARSER_H
13 #define TAO_MCAST_PARSER_H
15 #include /**/ "ace/pre.h"
16 #include "ace/Service_Config.h"
18 #if !defined (ACE_LACKS_PRAGMA_ONCE)
20 #endif /* ACE_LACKS_PRAGMA_ONCE */
22 #include "tao/CORBA_String.h"
23 #include "tao/IOR_Parser.h"
25 #if (TAO_HAS_MCAST_PARSER == 1)
27 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
30 * @class TAO_MCAST_Parser
32 * @brief Implements the @c mcast: IOR format
34 * This class implements the @c mcast: IOR format.
35 * It is dynamically loaded by the ORB and used to parse the
36 * string to separate the individual <obj_addr> from the list of object
37 * addresses <obj_addr_list>.
39 class TAO_Export TAO_MCAST_Parser
: public TAO_IOR_Parser
46 virtual ~TAO_MCAST_Parser ();
48 /// = The IOR_Parser methods, please read the documentation in
50 virtual bool match_prefix (const char *ior_string
) const;
52 /// Parse the ior-string that is passed.
53 virtual CORBA::Object_ptr
parse_string (const char *ior
,
57 CORBA::Object_ptr
multicast_to_service (const char *service_name
,
59 const char *mcast_address
,
61 const char *mcast_nic
,
63 ACE_Time_Value
*timeout
);
65 int multicast_query (char *&buf
,
66 const char *service_name
,
68 const char *mcast_address
,
70 const char *mcast_nic
,
71 ACE_Time_Value
*timeout
,
74 /* Simple method to assign values to the global members:
75 mcast_address_, mcast_port_, mcast_nic_, mcast_ttl_ */
76 void assign_to_variables (char const * mcast_name_ptr
);
79 CORBA::String_var mcast_address_
;
81 /// Default multicast port (currently Name Service mcast port).
82 unsigned short mcast_port_
;
84 /// Multicast network interface card.
85 CORBA::String_var mcast_nic_
;
87 /// Default time-to-live (default is 1).
90 /// Multicast service name
91 CORBA::String_var service_name_
;
94 ACE_STATIC_SVC_DECLARE_EXPORT (TAO
, TAO_MCAST_Parser
)
95 ACE_FACTORY_DECLARE (TAO
, TAO_MCAST_Parser
)
97 TAO_END_VERSIONED_NAMESPACE_DECL
99 #if defined (__ACE_INLINE__)
100 # include "tao/MCAST_Parser.inl"
101 #endif /* __ACE_INLINE__ */
103 #endif /* TAO_HAS_MCAST_PARSER == 1 */
105 #include /**/ "ace/post.h"
106 #endif /* TAO_MCAST_PARSER_H */