#include <AVStreams_i.h>
Public Member Functions | |
TAO_FlowProducer (void) | |
default constructor | |
TAO_FlowProducer (const char *flowname, AVStreams::protocolSpec protocols, const char *format) | |
virtual char * | get_rev_channel (const char *pcol_name) |
virtual void | stop (void) |
stop this flow, to be overridden by the application. | |
virtual void | start (void) |
start this flow, to be overridden by the application. | |
virtual char * | go_to_listen (AVStreams::QoS &the_qos, CORBA::Boolean is_mcast, AVStreams::FlowEndPoint_ptr peer, char *&flowProtocol) |
virtual CORBA::Boolean | connect_to_peer (AVStreams::QoS &the_qos, const char *address, const char *use_flow_protocol) |
virtual char * | connect_mcast (AVStreams::QoS &the_qos, CORBA::Boolean_out is_met, const char *address, const char *use_flow_protocol) |
connect to the multicast address, not implemented. | |
virtual void | set_key (const AVStreams::key &the_key) |
sets the public key to be used for encryption of the data. | |
virtual void | set_source_id (CORBA::Long source_id) |
Protected Attributes | |
CORBA::Long | source_id_ |
source id of this producer. | |
CORBA::String_var | peer_address_ |
Definition at line 1028 of file AVStreams_i.h.
TAO_FlowProducer::TAO_FlowProducer | ( | void | ) |
TAO_FlowProducer::TAO_FlowProducer | ( | const char * | flowname, | |
AVStreams::protocolSpec | protocols, | |||
const char * | format | |||
) |
Definition at line 4279 of file AVStreams_i.cpp.
{ this->open (flowname, protocols, format); }
char * TAO_FlowProducer::connect_mcast | ( | AVStreams::QoS & | the_qos, | |
CORBA::Boolean_out | is_met, | |||
const char * | address, | |||
const char * | use_flow_protocol | |||
) | [virtual] |
connect to the multicast address, not implemented.
Definition at line 4350 of file AVStreams_i.cpp.
{ // The address variable gives the multicast address to subscribe to. for (u_int i=0;i<this->protocols_.length ();i++) { // choose the protocol which supports multicast. } if (address == 0) if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, "TAO_FlowProducer::connect_mcast address is 0\n")); TAO_Forward_FlowSpec_Entry *entry; ACE_NEW_RETURN (entry, TAO_Forward_FlowSpec_Entry(this->flowname_.in (), "IN", this->format_.in (), use_flow_protocol, address), 0); this->flow_spec_set_.insert (entry); TAO_AV_Acceptor_Registry *acceptor_registry = TAO_AV_CORE::instance ()->acceptor_registry (); int result = acceptor_registry->open (this, TAO_AV_CORE::instance (), this->flow_spec_set_); if (result < 0) ACE_ERROR_RETURN ((LM_ERROR, "TAO_FlowProducer::connect_mcast:acceptor_registry open failed\n"), 0); // Now remove our handler from the reactor since we're a producer and dont want to get called for // multicast packets. ACE_Event_Handler *event_handler = entry->handler ()->event_handler (); event_handler->reactor ()->remove_handler (event_handler, ACE_Event_Handler::READ_MASK); return CORBA::string_dup (address); }
CORBA::Boolean TAO_FlowProducer::connect_to_peer | ( | AVStreams::QoS & | the_qos, | |
const char * | address, | |||
const char * | use_flow_protocol | |||
) | [virtual] |
This should be implemented in both the FlowProducer and consumer and hence is pure virtual since we need to know the role of the flowendpoint to create appropriate protocol objects. eg. in SFP to create Producer Object/ Consumer Object.
Implements TAO_FlowEndPoint.
Definition at line 4339 of file AVStreams_i.cpp.
{ return this->connect_to_peer_i (TAO_FlowSpec_Entry::TAO_AV_PRODUCER, the_qos, address, use_flow_protocol); }
char * TAO_FlowProducer::get_rev_channel | ( | const char * | pcol_name | ) | [virtual] |
get the reverse channel, to be used for feedback for protocols like UDP. @Naga: In the spec this is defined in the TAO_FlowProducer but it seems more reasonable for this to be in a FlowEndPoint since any of the flowendpoints can be made to listen. So in the case of UDP if the producer is listening and the consumer connects (logically) then the producer needs to know the reverse channel on its peer fep to send data to.
Definition at line 4288 of file AVStreams_i.cpp.
{
return 0;
}
char * TAO_FlowProducer::go_to_listen | ( | AVStreams::QoS & | the_qos, | |
CORBA::Boolean | is_mcast, | |||
AVStreams::FlowEndPoint_ptr | peer, | |||
char *& | flowProtocol | |||
) | [virtual] |
This should be implemented in both the FlowProducer and consumer and hence is pure virtual since we need to know the role of the flowendpoint to create appropriate protocol objects. eg. in SFP to create Producer Object/ Consumer Object.
Implements TAO_FlowEndPoint.
Definition at line 4326 of file AVStreams_i.cpp.
{ return this->go_to_listen_i (TAO_FlowSpec_Entry::TAO_AV_PRODUCER, the_qos, is_mcast, peer_fep, flowProtocol); }
void TAO_FlowProducer::set_key | ( | const AVStreams::key & | the_key | ) | [virtual] |
sets the public key to be used for encryption of the data.
Definition at line 4391 of file AVStreams_i.cpp.
{ try { CORBA::Any anyval; anyval <<= the_key; this->define_property ("PublicKey", anyval); } catch (const CORBA::Exception& ex) { ex._tao_print_exception ("TAO_FlowProducer::set_key"); } }
void TAO_FlowProducer::set_source_id | ( | CORBA::Long | source_id | ) | [virtual] |
sets the source id of this flow producer so that it can be used to distinguish this producer from others in the multicast case.
Definition at line 4408 of file AVStreams_i.cpp.
{ this->source_id_ = source_id; }
void TAO_FlowProducer::start | ( | void | ) | [virtual] |
start this flow, to be overridden by the application.
Definition at line 4307 of file AVStreams_i.cpp.
{ TAO_AV_FlowSpecSetItor end = this->flow_spec_set_.end (); for (TAO_AV_FlowSpecSetItor begin = this->flow_spec_set_.begin (); begin != end; ++begin) { TAO_FlowSpec_Entry *entry = (*begin); if (entry->handler () != 0) { entry->handler ()->start (TAO_FlowSpec_Entry::TAO_AV_PRODUCER); } if (entry->control_handler () != 0) { entry->control_handler ()->start (TAO_FlowSpec_Entry::TAO_AV_PRODUCER); } } }
void TAO_FlowProducer::stop | ( | void | ) | [virtual] |
stop this flow, to be overridden by the application.
Definition at line 4295 of file AVStreams_i.cpp.
{ TAO_AV_FlowSpecSetItor end = this->flow_spec_set_.end (); for (TAO_AV_FlowSpecSetItor begin = this->flow_spec_set_.begin (); begin != end; ++begin) { TAO_FlowSpec_Entry *entry = (*begin); entry->handler ()->stop (TAO_FlowSpec_Entry::TAO_AV_PRODUCER); } }
CORBA::String_var TAO_FlowProducer::peer_address_ [protected] |
Definition at line 1082 of file AVStreams_i.h.
CORBA::Long TAO_FlowProducer::source_id_ [protected] |
source id of this producer.
Definition at line 1081 of file AVStreams_i.h.