UIPMC_Endpoint.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //=============================================================================
00004 /**
00005  *  @file     UIPMC_Endpoint.h
00006  *
00007  *  UIPMC_Endpoint.h,v 1.7 2006/03/14 06:14:34 jtc Exp
00008  *
00009  *  UIPMC implementation of PP Framework Endpoint interface.
00010  *
00011  *  @author Frank Hunleth <fhunleth@cs.wustl.edu>
00012  */
00013 //=============================================================================
00014 
00015 #ifndef TAO_UIPMC_ENDPOINT_H
00016 #define TAO_UIPMC_ENDPOINT_H
00017 
00018 #include /**/ "ace/pre.h"
00019 
00020 #include "tao/Endpoint.h"
00021 
00022 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00023 # pragma once
00024 #endif /* ACE_LACKS_PRAGMA_ONCE */
00025 
00026 #include "ace/INET_Addr.h"
00027 
00028 #include "orbsvcs/PortableGroup/portablegroup_export.h"
00029 
00030 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00031 
00032 /**
00033  * @class TAO_UIPMC_Endpoint
00034  *
00035  * @brief TAO_UIPMC_Endpoint
00036  *
00037  * UIPMC-specific implementation of PP Framework Endpoint interface.
00038  */
00039 class TAO_PortableGroup_Export TAO_UIPMC_Endpoint : public TAO_Endpoint
00040 {
00041 public:
00042   // = Initialization and termination methods.
00043 
00044   /// Default constructor.
00045   TAO_UIPMC_Endpoint (void);
00046 
00047   /// Constructor.
00048   TAO_UIPMC_Endpoint (const ACE_INET_Addr &addr);
00049 
00050   /// Constructor. @@ Frank - deprecate this.
00051   TAO_UIPMC_Endpoint (const CORBA::Octet class_d_address[4],
00052                       CORBA::UShort port);
00053 
00054   /// Destructor.
00055   ~TAO_UIPMC_Endpoint (void);
00056 
00057   // = Implementation of abstract TAO_Endpoint methods.  See
00058   // Endpoint.h for their documentation.
00059 
00060   virtual TAO_Endpoint *next (void);
00061   virtual int addr_to_string (char *buffer, size_t length);
00062 
00063   /// Makes a copy of <this>
00064   virtual TAO_Endpoint *duplicate (void);
00065 
00066   /// Return true if this endpoint is equivalent to <other_endpoint>.  Two
00067   /// endpoints are equivalent iff their port and host are the same.
00068   CORBA::Boolean is_equivalent (const TAO_Endpoint *other_endpoint);
00069 
00070   /// Return a hash value for this object.
00071   CORBA::ULong hash (void);
00072 
00073   // Allocates memory and returns a copy of <this>
00074 
00075   // = UIPMC_Endpoint-specific methods.
00076 
00077   /// Return a reference to the <object_addr>.
00078   const ACE_INET_Addr &object_addr (void) const;
00079 
00080   /// Set the IP multicast address and port.
00081   void object_addr (const ACE_INET_Addr &addr);
00082 
00083   /// Return a pointer to the stringified host address (not including the
00084   /// port).  This class retains ownership of the address memory.
00085   const char *get_host_addr (void) const;
00086 
00087   /// Return the port number.
00088   CORBA::UShort port (void) const;
00089 
00090   /// Set the port number.
00091   CORBA::UShort port (CORBA::UShort p); //@@ Frank - deprecate this.
00092 
00093   //TAO_UIPMC_Connection_Handler *&hint (void);
00094   // Access to our <hint_>.
00095 
00096 
00097 private:
00098 
00099   /// Helper methods for getting and setting the IP address.
00100   ACE_UINT32 uint_ip_addr (void) const;
00101   void uint_ip_addr (ACE_UINT32 ip_addr);
00102 
00103   /// Helper method to update the cached object address.
00104   void update_object_addr (void);
00105 
00106   /// IP Multicast address.  @@ Frank - deprecate this.
00107   CORBA::Octet class_d_address_[4];
00108 
00109   /// UDP port number.  @@ Frank - deprecate this.
00110   CORBA::UShort port_;
00111 
00112   /// Cached instance of <ACE_INET_Addr> for use in making
00113   /// invocations, etc.
00114   ACE_INET_Addr object_addr_;
00115 
00116   /// UIPMC Endpoints can be stringed into a list.  Return the next
00117   /// endpoint in the list, if any.
00118   TAO_UIPMC_Endpoint *next_;
00119 };
00120 
00121 TAO_END_VERSIONED_NAMESPACE_DECL
00122 
00123 #if defined (__ACE_INLINE__)
00124 # include "orbsvcs/PortableGroup/UIPMC_Endpoint.i"
00125 #endif /* __ACE_INLINE__ */
00126 
00127 #include /**/ "ace/post.h"
00128 
00129 #endif  /* TAO_UIPMC_PROFILE_H */

Generated on Thu Nov 9 14:03:34 2006 for TAO_PortableGroup by doxygen 1.3.6