NAME
ACE_Name_Handler -
Product object created by ACE_Name_Acceptor. A ACE_Name_Handler
exchanges messages with a ACE_Name_Proxy object on the
client-side.
SYNOPSIS
#include <ACE/ACE_Name_Handler.h>
class ACE_Name_Handler :
public ACE_Svc_Handler<ACE_SOCK_STREAM, ACE_NULL_SYNCH>
{
public:
ACE_Name_Handler (ACE_Reactor * = 0);
virtual int open (void *acceptor = 0);
virtual int close (u_long = 0);
protected:
virtual int abandon (void);
virtual int recv_request (void);
virtual int dispatch (void);
virtual int send_reply (ACE_UINT32 status, ACE_UINT32 errnum = 0);
virtual int send_request(ACE_Name_Request&);
virtual ACE_HANDLE get_handle (void) const;
virtual int handle_input (ACE_HANDLE);
virtual int handle_timeout (
const ACE_Time_Value &tv,
const void *arg
);
private:
ACE_Naming_Context *naming_context_;
ACE_Name_Request name_request_;
ACE_Name_Request name_request_back_;
ACE_Name_Reply name_reply_;
ACE_INET_Addr addr_;
~ACE_Name_Handler (void);
};
DESCRIPTION
This class is the main workhorse of the ACE_Name_Server. It
handles client requests to bind, rebind, resolve, and unbind
names. It also schedules and handles timeouts that are used to
support "timed waits." Clients used timed waits to bound the
amount of time they block trying to get a name.
Initialization and termination.
ACE_Name_Handler (ACE_Reactor * = 0);
virtual int open (void *acceptor = 0);
Activate this instance of the ACE_Name_Handler (called by the
ACE_Name_Acceptor). Note that the void *acceptor is *really*
an ACE_Acceptor but we need to keep the compiler happy with the
type signature of the open() method inherited from Svc_Handler...
virtual int close (u_long = 0);
Close down this instance of the ACE_Name_Handler.
Helper routines for the operations exported to clients.
virtual int abandon (void);
Give up waiting (e.g., when a timeout occurs or a client shuts
down unexpectedly).
Low level routines for framing requests, dispatching operations,
and returning replies.
virtual int recv_request (void);
Receive, frame, and decode the client's request.
virtual int dispatch (void);
Dispatch the appropriate operation to handle the client's request.
virtual int send_reply (ACE_UINT32 status, ACE_UINT32 errnum = 0);
Create and send a reply to the client.
virtual int send_request(ACE_Name_Request&);
Demultiplexing hooks.
virtual ACE_HANDLE get_handle (void) const;
Return the underlying ACE_HANDLE.
virtual int handle_input (ACE_HANDLE);
Callback method invoked by the ACE_Reactor when client events arrive.
Timer hook.
virtual int handle_timeout (
const ACE_Time_Value &tv,
const void *arg
);
Enable clients to limit the amount of time they wait for a name.
DESCRIPTION
Product object created by ACE_Name_Acceptor. A ACE_Name_Handler
exchanges messages with a ACE_Name_Proxy object on the
client-side.
AUTHOR
Gerhard Lenzer and Douglas C. Schmidt
LIBRARY
ACE