UIPMC_Endpoint.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //=============================================================================
00004 /**
00005  *  @file     UIPMC_Endpoint.h
00006  *
00007  *  $Id: UIPMC_Endpoint.h 79015 2007-07-24 15:03:04Z vridosh $
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 "tao/CORBA_String.h"
00027 #include "ace/INET_Addr.h"
00028 
00029 #include "orbsvcs/PortableGroup/portablegroup_export.h"
00030 
00031 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00032 
00033 /**
00034  * @class TAO_UIPMC_Endpoint
00035  *
00036  * @brief TAO_UIPMC_Endpoint
00037  *
00038  * UIPMC-specific implementation of PP Framework Endpoint interface.
00039  */
00040 class TAO_PortableGroup_Export TAO_UIPMC_Endpoint : public TAO_Endpoint
00041 {
00042 public:
00043   // = Initialization and termination methods.
00044 
00045   /// Default constructor.
00046   TAO_UIPMC_Endpoint (void);
00047 
00048   /// Constructor.
00049   TAO_UIPMC_Endpoint (const ACE_INET_Addr &addr);
00050 
00051   /// Constructor. @@ Frank - deprecate this.
00052   TAO_UIPMC_Endpoint (const CORBA::Octet class_d_address[4],
00053                       CORBA::UShort port);
00054 
00055   /// Destructor.
00056   ~TAO_UIPMC_Endpoint (void);
00057 
00058   // = Implementation of abstract TAO_Endpoint methods.  See
00059   // Endpoint.h for their documentation.
00060 
00061   virtual TAO_Endpoint *next (void);
00062   virtual int addr_to_string (char *buffer, size_t length);
00063 
00064   /// Makes a copy of <this>
00065   virtual TAO_Endpoint *duplicate (void);
00066 
00067   /// Return true if this endpoint is equivalent to <other_endpoint>.  Two
00068   /// endpoints are equivalent iff their port and host are the same.
00069   CORBA::Boolean is_equivalent (const TAO_Endpoint *other_endpoint);
00070 
00071   /// Return a hash value for this object.
00072   CORBA::ULong hash (void);
00073 
00074   // Allocates memory and returns a copy of <this>
00075 
00076   // = UIPMC_Endpoint-specific methods.
00077 
00078   /// Return a reference to the <object_addr>.
00079   const ACE_INET_Addr &object_addr (void) const;
00080 
00081   /// Set the IP multicast address and port.
00082   void object_addr (const ACE_INET_Addr &addr);
00083 
00084   /// Return a pointer to the stringified host address (not including the
00085   /// port).  This class retains ownership of the address memory.
00086   const char *host (void) const;
00087 
00088   /// Return the port number.
00089   CORBA::UShort port (void) const;
00090 
00091   /// Set the port number.
00092   CORBA::UShort port (CORBA::UShort p); //@@ Frank - deprecate this.
00093 
00094   //TAO_UIPMC_Connection_Handler *&hint (void);
00095   // Access to our <hint_>.
00096 
00097 private:
00098 
00099   /// Helper methods for getting and setting the IP address.  @@ Vadym - deprecate these.
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.  @@ Vadym - deprecate this.
00104   void update_object_addr (void);
00105 
00106   /// IP Multicast address.  @@ Frank - deprecate this.
00107   CORBA::Octet class_d_address_[4];
00108 
00109   /// String representing the host address.
00110   CORBA::String_var host_;
00111 
00112   /// UDP port number.
00113   CORBA::UShort port_;
00114 
00115   /// Cached instance of <ACE_INET_Addr> for use in making
00116   /// invocations, etc.
00117   ACE_INET_Addr object_addr_;
00118 
00119   /// UIPMC Endpoints can be stringed into a list.  Return the next
00120   /// endpoint in the list, if any.
00121   TAO_UIPMC_Endpoint *next_;
00122 };
00123 
00124 TAO_END_VERSIONED_NAMESPACE_DECL
00125 
00126 #if defined (__ACE_INLINE__)
00127 # include "orbsvcs/PortableGroup/UIPMC_Endpoint.inl"
00128 #endif /* __ACE_INLINE__ */
00129 
00130 #include /**/ "ace/post.h"
00131 
00132 #endif  /* TAO_UIPMC_PROFILE_H */

Generated on Tue Feb 2 17:49:50 2010 for TAO_PortableGroup by  doxygen 1.4.7