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);
virtual int close (u_long = 0);

Helper routines for the operations exported to clients.

virtual int abandon (void);

Low level routines for framing requests, dispatching operations,

and returning replies.
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&);

Demultiplexing hooks.

virtual ACE_HANDLE get_handle (void) const;
virtual int handle_input (ACE_HANDLE);

Timer hook.

virtual int handle_timeout (
    const ACE_Time_Value &tv,
    const void *arg
    );

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