#include <AVStreams_i.h>
Inheritance diagram for TAO_StreamEndPoint:
Public Member Functions | |
TAO_StreamEndPoint (void) | |
Constructor. | |
virtual void | stop (const AVStreams::flowSpec &the_spec ACE_ENV_ARG_DECL_WITH_DEFAULTS) throw (CORBA::SystemException, AVStreams::noSuchFlow) |
Stop the stream. Empty the_spec means, for all the flows. | |
virtual void | start (const AVStreams::flowSpec &the_spec ACE_ENV_ARG_DECL_WITH_DEFAULTS) throw (CORBA::SystemException, AVStreams::noSuchFlow) |
Start the stream, Empty the_spec means, for all the flows. | |
virtual void | destroy (const AVStreams::flowSpec &the_spec ACE_ENV_ARG_DECL_WITH_DEFAULTS) throw (CORBA::SystemException, AVStreams::noSuchFlow) |
Destroy the stream, Empty the_spec means, for all the flows. | |
virtual CORBA::Boolean | connect (AVStreams::StreamEndPoint_ptr responder, AVStreams::streamQoS &qos_spec, const AVStreams::flowSpec &the_spec ACE_ENV_ARG_DECL_WITH_DEFAULTS) throw (CORBA::SystemException, AVStreams::noSuchFlow, AVStreams::QoSRequestFailed, AVStreams::streamOpFailed) |
Called by StreamCtrl. responder is the peer to connect to. | |
virtual CORBA::Boolean | request_connection (AVStreams::StreamEndPoint_ptr initiator, CORBA::Boolean is_mcast, AVStreams::streamQoS &qos, AVStreams::flowSpec &the_spec ACE_ENV_ARG_DECL_WITH_DEFAULTS) throw (CORBA::SystemException, AVStreams::streamOpDenied, AVStreams::noSuchFlow, AVStreams::QoSRequestFailed, AVStreams::FPError) |
virtual CORBA::Boolean | modify_QoS (AVStreams::streamQoS &new_qos, const AVStreams::flowSpec &the_flows ACE_ENV_ARG_DECL_WITH_DEFAULTS) throw (CORBA::SystemException, AVStreams::noSuchFlow, AVStreams::QoSRequestFailed) |
Change the transport qos on a stream. | |
virtual int | change_qos (AVStreams::streamQoS &new_qos, const AVStreams::flowSpec &the_flows ACE_ENV_ARG_DECL_WITH_DEFAULTS) |
virtual CORBA::Boolean | set_protocol_restriction (const AVStreams::protocolSpec &the_pspec ACE_ENV_ARG_DECL_WITH_DEFAULTS) throw (CORBA::SystemException) |
Used to restrict the set of protocols. | |
virtual void | disconnect (const AVStreams::flowSpec &the_spec ACE_ENV_ARG_DECL_WITH_DEFAULTS) throw (CORBA::SystemException, AVStreams::noSuchFlow, AVStreams::streamOpFailed) |
disconnect the flows | |
virtual void | set_FPStatus (const AVStreams::flowSpec &the_spec, const char *fp_name, const CORBA::Any &fp_settings ACE_ENV_ARG_DECL_WITH_DEFAULTS) throw (CORBA::SystemException, AVStreams::noSuchFlow, AVStreams::FPError) |
Used to control the flow. | |
virtual CORBA::Object_ptr | get_fep (const char *flow_name ACE_ENV_ARG_DECL_WITH_DEFAULTS) throw (CORBA::SystemException, AVStreams::notSupported, AVStreams::noSuchFlow) |
Not implemented in the light profile, throws notsupported. | |
virtual char * | add_fep (CORBA::Object_ptr the_fep ACE_ENV_ARG_DECL_WITH_DEFAULTS) throw (CORBA::SystemException, AVStreams::notSupported, AVStreams::streamOpFailed) |
Not implemented in the light profile, throws notsupported. | |
virtual void | remove_fep (const char *fep_name ACE_ENV_ARG_DECL_WITH_DEFAULTS) throw (CORBA::SystemException, AVStreams::notSupported, AVStreams::streamOpFailed) |
Not implemented in the light profile, throws notsupported. | |
virtual void | set_negotiator (AVStreams::Negotiator_ptr new_negotiator ACE_ENV_ARG_DECL_WITH_DEFAULTS) throw (CORBA::SystemException) |
Used to "attach" a negotiator to the endpoint. | |
virtual void | set_key (const char *flow_name, const AVStreams::key &the_key ACE_ENV_ARG_DECL_WITH_DEFAULTS) throw (CORBA::SystemException) |
Used for public key encryption. | |
virtual void | set_source_id (CORBA::Long source_id ACE_ENV_ARG_DECL_WITH_DEFAULTS) throw (CORBA::SystemException) |
Used to set a unique id for packets sent by this streamendpoint. | |
virtual | ~TAO_StreamEndPoint (void) |
Destructor. | |
CORBA::Boolean | multiconnect (AVStreams::streamQoS &the_qos, AVStreams::flowSpec &the_spec ACE_ENV_ARG_DECL) |
Protected Member Functions | |
char * | add_fep_i (AVStreams::FlowEndPoint_ptr fep ACE_ENV_ARG_DECL) throw (CORBA::SystemException, AVStreams::notSupported, AVStreams::streamOpFailed) |
Helper methods to implement add_fep(). | |
char * | add_fep_i_add_property (AVStreams::FlowEndPoint_ptr fep ACE_ENV_ARG_DECL) throw (CORBA::SystemException, AVStreams::notSupported, AVStreams::streamOpFailed) |
int | translate_qos (const AVStreams::streamQoS &application_qos, AVStreams::streamQoS &network_qos) |
translate from application level to network level qos. | |
Protected Attributes | |
u_int | flow_count_ |
u_int | flow_num_ |
current flow number used for system generation of flow names. | |
FlowEndPoint_Map | fep_map_ |
hash table for the flownames and its corresponding flowEndpoint reference. | |
AVStreams::flowSpec | flows_ |
sequence of supported flow names. | |
CORBA::Long | source_id_ |
source id used for multicast. | |
AVStreams::Negotiator_var | negotiator_ |
our local negotiator for QoS. | |
AVStreams::protocolSpec | protocols_ |
Our available list of protocols. | |
CORBA::String_var | protocol_ |
Chosen protocol for this streamendpoint based on availableprotocols property. | |
AVStreams::key | key_ |
Key used for encryption. | |
u_short | mcast_port_ |
ACE_CString | mcast_addr_ |
ACE_Hash_Map_Manager< ACE_CString, TAO_FlowSpec_Entry *, ACE_Null_Mutex > | mcast_entry_map_ |
TAO_AV_FlowSpecSet | forward_flow_spec_set |
TAO_AV_FlowSpecSet | reverse_flow_spec_set |
AVStreams::StreamEndPoint_var | peer_sep_ |
AVStreams::SFPStatus * | sfp_status_ |
AVStreams::StreamCtrl_var | streamctrl_ |
Definition at line 540 of file AVStreams_i.h.
|
Constructor.
Definition at line 1784 of file AVStreams_i.cpp. References ACE_DEBUG, ACE_DEFAULT_MULTICAST_ADDR, ACE_DEFAULT_MULTICAST_PORT, LM_DEBUG, mcast_addr_, and TAO_debug_level.
01785 :flow_count_ (0), 01786 flow_num_ (0), 01787 mcast_port_ (ACE_DEFAULT_MULTICAST_PORT+1) 01788 { 01789 //is->mcast_addr_ = ACE_OS::inet_addr (ACE_DEFAULT_MULTICAST_ADDR); 01790 this->mcast_addr_.set (ACE_DEFAULT_MULTICAST_ADDR); 01791 if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, "TAO_StreamEndPoint::TAO_StreamEndPoint::mcast_addr = %s", this->mcast_addr_.c_str ())); 01792 // this->handle_open (); 01793 } |
|
Destructor.
Definition at line 2717 of file AVStreams_i.cpp. References ACE_Unbounded_Set< T >::begin(), ACE_Unbounded_Set< T >::end(), forward_flow_spec_set, reverse_flow_spec_set, and TAO_AV_FlowSpecSetItor.
02718 { 02719 //this->handle_close (); 02720 TAO_AV_FlowSpecSetItor begin = this->forward_flow_spec_set.begin (); 02721 TAO_AV_FlowSpecSetItor end = this->forward_flow_spec_set.end (); 02722 02723 int i=0; 02724 // @@ Naga: Will the iterator always give the entries in the order of insertion. 02725 // or is it an implementation fact of ACE containers. 02726 for ( ; begin != end; ++begin, ++i) 02727 { 02728 // if (i >= FLOWSPEC_MAX) 02729 // { 02730 TAO_FlowSpec_Entry *entry = *begin; 02731 delete entry; 02732 // } 02733 } 02734 begin = this->reverse_flow_spec_set.begin (); 02735 end = this->reverse_flow_spec_set.end (); 02736 i = 0; 02737 for (; begin != end; ++begin) 02738 { 02739 // if (i >= FLOWSPEC_MAX) 02740 // { 02741 TAO_FlowSpec_Entry *entry = *begin; 02742 delete entry; 02743 // } 02744 } 02745 } |
|
Not implemented in the light profile, throws notsupported.
|
|
Helper methods to implement add_fep().
Definition at line 2535 of file AVStreams_i.cpp. References ACE_CATCHANY, ACE_CHECK_RETURN, ACE_ENDTRY, ACE_ENV_ARG_PARAMETER, ACE_TRY, ACE_TRY_CHECK, and CORBA::string_dup().
02540 { 02541 CORBA::String_var flow_name; 02542 ACE_TRY 02543 { 02544 CORBA::Any_var flow_name_any = 02545 fep->get_property_value ("FlowName" ACE_ENV_ARG_PARAMETER); 02546 ACE_TRY_CHECK; 02547 02548 const char *tmp; 02549 flow_name_any >>= tmp; 02550 flow_name = CORBA::string_dup (tmp); 02551 } 02552 ACE_CATCHANY 02553 { 02554 flow_name = 02555 this->add_fep_i_add_property (fep ACE_ENV_ARG_PARAMETER); 02556 ACE_CHECK_RETURN (0); 02557 } 02558 ACE_ENDTRY; 02559 return flow_name._retn (); 02560 } |
|
Definition at line 2500 of file AVStreams_i.cpp. References ACE_ANY_EXCEPTION, ACE_CATCHANY, ACE_CString, ACE_ENDTRY, ACE_ENV_ARG_PARAMETER, ACE_PRINT_EXCEPTION, ACE_TRY, ACE_TRY_CHECK, ACE_OS::sprintf(), and ACE_OS::strdup().
02505 { 02506 ACE_CString flow_name; 02507 02508 ACE_TRY 02509 { 02510 // exception implies the flow name is not defined and is system 02511 // generated. 02512 flow_name = "flow"; 02513 char tmp[255]; 02514 ACE_OS::sprintf (tmp, "%u", this->flow_num_++); 02515 flow_name += tmp; 02516 02517 CORBA::Any flowname_any; 02518 flowname_any <<= flow_name.c_str (); 02519 fep->define_property ("Flow", 02520 flowname_any 02521 ACE_ENV_ARG_PARAMETER); 02522 ACE_TRY_CHECK; 02523 } 02524 ACE_CATCHANY 02525 { 02526 ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, 02527 "TAO_StreamEndPoint::add_fep"); 02528 return 0; 02529 } 02530 ACE_ENDTRY; 02531 return ACE_OS::strdup( flow_name.c_str () ); 02532 } |
|
|
|
Called by StreamCtrl. responder is the peer to connect to.
|
|
Destroy the stream, Empty the_spec means, for all the flows.
|
|
disconnect the flows
|
|
Not implemented in the light profile, throws notsupported.
|
|
Change the transport qos on a stream.
|
|
Reimplemented in TAO_StreamEndPoint_A, and TAO_StreamEndPoint_B. |
|
Not implemented in the light profile, throws notsupported.
|
|
Called by the peer StreamEndPoint. The flow_spec indicates the flows (which contain transport addresses etc.) |
|
Used to control the flow.
|
|
Used for public key encryption.
|
|
Used to "attach" a negotiator to the endpoint.
Definition at line 2648 of file AVStreams_i.cpp. References ACE_ANY_EXCEPTION, ACE_CATCHANY, ACE_CHECK, ACE_ENDTRY, ACE_ENV_ARG_PARAMETER, ACE_PRINT_EXCEPTION, ACE_TRY, and ACE_TRY_CHECK.
02651 { 02652 ACE_TRY 02653 { 02654 CORBA::Any negotiator; 02655 negotiator <<= new_negotiator; 02656 this->define_property ("Negotiator", 02657 negotiator 02658 ACE_ENV_ARG_PARAMETER); 02659 ACE_TRY_CHECK; 02660 this->negotiator_ = AVStreams::Negotiator::_duplicate (new_negotiator); 02661 } 02662 ACE_CATCHANY 02663 { 02664 ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "TAO_StreamEndPoint::set_negotiator"); 02665 } 02666 ACE_ENDTRY; 02667 ACE_CHECK; 02668 } |
|
Used to restrict the set of protocols.
|
|
Used to set a unique id for packets sent by this streamendpoint.
Definition at line 2700 of file AVStreams_i.cpp.
02703 { 02704 this->source_id_ = source_id; 02705 } |
|
Start the stream, Empty the_spec means, for all the flows.
|
|
Stop the stream. Empty the_spec means, for all the flows.
|
|
translate from application level to network level qos.
Definition at line 1983 of file AVStreams_i.cpp. References AVStreams::streamQoS.
01985 { 01986 u_int len = application_qos.length (); 01987 network_qos.length (len); 01988 for (u_int i=0;i<len;i++) 01989 { 01990 network_qos [i].QoSType = application_qos [i].QoSType; 01991 network_qos [i].QoSParams = application_qos [i].QoSParams; 01992 } 01993 return 0; 01994 } |
|
hash table for the flownames and its corresponding flowEndpoint reference.
Definition at line 692 of file AVStreams_i.h. |
|
Count of the number of flows in this streamendpoint, used to generate unique names for the flows. Definition at line 686 of file AVStreams_i.h. |
|
current flow number used for system generation of flow names.
Definition at line 689 of file AVStreams_i.h. |
|
sequence of supported flow names.
Definition at line 695 of file AVStreams_i.h. |
|
Definition at line 717 of file AVStreams_i.h. Referenced by ~TAO_StreamEndPoint(). |
|
Key used for encryption.
Definition at line 710 of file AVStreams_i.h. |
|
Definition at line 715 of file AVStreams_i.h. Referenced by TAO_StreamEndPoint(). |
|
Definition at line 716 of file AVStreams_i.h. |
|
TAO_Forward_FlowSpec_Entry forward_entries_ [FLOWSPEC_MAX]; TAO_Reverse_FlowSpec_Entry reverse_entries_ [FLOWSPEC_MAX]; Definition at line 714 of file AVStreams_i.h. |
|
our local negotiator for QoS.
Definition at line 701 of file AVStreams_i.h. |
|
Definition at line 719 of file AVStreams_i.h. |
|
Chosen protocol for this streamendpoint based on availableprotocols property.
Definition at line 707 of file AVStreams_i.h. |
|
Our available list of protocols.
Definition at line 704 of file AVStreams_i.h. |
|
Definition at line 718 of file AVStreams_i.h. Referenced by ~TAO_StreamEndPoint(). |
|
Definition at line 720 of file AVStreams_i.h. |
|
source id used for multicast.
Definition at line 698 of file AVStreams_i.h. |
|
Definition at line 721 of file AVStreams_i.h. |