Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

Name_Proxy.h

Go to the documentation of this file.
00001 /* -*- C++ -*- */
00002 
00003 //=============================================================================
00004 /**
00005  *  @file    Name_Proxy.h
00006  *
00007  *  $Id: Name_Proxy.h,v 1.1.1.3 2001/12/04 14:33:04 chad Exp $
00008  *
00009  *  Proxy for dealing with remote server process managing NET_LOCAL
00010  *  Name_Bindings.
00011  *
00012  *
00013  *  @author Gerhard Lenzer
00014  *  @author Douglas C. Schmidt
00015  *  @author and Prashant Jain
00016  */
00017 //=============================================================================
00018 
00019 
00020 #ifndef ACE_NAME_PROXY_H
00021 #define ACE_NAME_PROXY_H
00022 #include "ace/pre.h"
00023 
00024 #include "ace/INET_Addr.h"
00025 
00026 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00027 # pragma once
00028 #endif /* ACE_LACKS_PRAGMA_ONCE */
00029 
00030 #include "ace/SOCK_Connector.h"
00031 #include "ace/SOCK_Stream.h"
00032 #include "ace/Service_Config.h"
00033 #include "ace/Synch_Options.h"
00034 #include "ace/Name_Request_Reply.h"
00035 
00036 /**
00037  * @class ACE_Name_Proxy
00038  *
00039  * @brief Proxy for dealing with remote server process managing NET_LOCAL
00040  * NameBindings.
00041  *
00042  * Shields applications from details of interacting with the
00043  * ACE_Name Server.
00044  */
00045 class ACE_Export ACE_Name_Proxy : public ACE_Event_Handler
00046 {
00047 public:
00048   /// Default constructor.
00049   ACE_Name_Proxy (void);
00050 
00051   // = Establish a binding with the ACE_Name Server.
00052   ACE_Name_Proxy (const ACE_INET_Addr &remote_addr, // Address of ACE_Name Server.
00053                   ACE_Synch_Options& options =
00054                   ACE_Synch_Options::defaults);
00055 
00056   int open (const ACE_INET_Addr &remote_addr,  // Address of ACE_Name Server.
00057             ACE_Synch_Options& options =
00058             ACE_Synch_Options::defaults);
00059 
00060   /// Perform the request and wait for the reply.
00061   int request_reply (ACE_Name_Request &request);
00062 
00063   /// Perform the request.
00064   int send_request (ACE_Name_Request &request);
00065 
00066   /// Receive the reply.
00067   int recv_reply (ACE_Name_Request &reply);
00068 
00069   /// Obtain underlying handle.
00070   virtual ACE_HANDLE get_handle (void) const;
00071 
00072   /// Close down the connection to the server.
00073   virtual ~ACE_Name_Proxy (void);
00074 
00075   /// Dump the state of the object;
00076   void dump (void) const;
00077 
00078 private:
00079 
00080   /// ACE_Connector factory used to establish connections actively.
00081   ACE_SOCK_Connector connector_;
00082 
00083   /// Connection to ACE_Name Server peer.
00084   ACE_SOCK_Stream peer_;
00085 
00086   /// Pointer to ACE_Reactor (used if we are run in "reactive-mode").
00087   ACE_Reactor *reactor_;
00088 };
00089 
00090 #include "ace/post.h"
00091 #endif /* ACE_NAME_PROXY_H */

Generated on Mon Jun 16 11:20:27 2003 for ACE by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002