Reference

ACE_Token_Request(3)

Message format for delivering requests to the ACE_Token Server.

NAME

ACE_Token_Request - Message format for delivering requests to the ACE_Token Server.

SYNOPSIS

#include <ACE/Token_Request_Reply.h>
class ACE_Token_Request
{
  public:
    enum OPERATION{ ACQUIRE, RELEASE, RENEW, REMOVE, TRY_ACQUIRE };
    ACE_Token_Request (void);
    ACE_Token_Request (
        int token_type,
        int proxy_type,
        ACE_UINT32 operation,
        const char token_name[],
        const char client_id[],
        const ACE_Synch_Options &options
        );
    ACE_UINT32 length (void) const;
    void length (ACE_UINT32);
    int proxy_type (void) const;
    void proxy_type (int proxy_type);
    int token_type (void) const;
    void token_type (int token_type);
    ACE_UINT32 operation_type (void) const;
    void operation_type (ACE_UINT32);
    ACE_UINT32 requeue_position (void) const;
    void requeue_position (ACE_UINT32);
    ACE_UINT32 notify (void) const;
    void notify (ACE_UINT32);
    ACE_Synch_Options &options (void) const;
    void options (const ACE_Synch_Options &options);
    char *token_name (void) const;
    char *client_id (void) const;
    void token_name (const char *token_name, const char* client_id);
    int encode (void *&);
    int decode (void);
    void dump (void) const;
  private:
    Transfer transfer_;
    char *token_name_;
    char *client_id_;
    ACE_Synch_Options options_;
};

DESCRIPTION

Define the format used to exchange messages between the ACE_Token Server and its clients.

Set/get the length of the encoded/decoded message.

ACE_UINT32 length (void) const;

void length (ACE_UINT32);

Set/get the type of proxy

int proxy_type (void) const;

void proxy_type (int proxy_type);

Set/get the type of token

int token_type (void) const;

void token_type (int token_type);

Set/get the type of the operation.

ACE_UINT32 operation_type (void) const;

void operation_type (ACE_UINT32);

Set/get the requeue position. These should be used when renew

is the operation type.

ACE_UINT32 requeue_position (void) const;

void requeue_position (ACE_UINT32);

Set/get notify. These should be used when acquire is the operation type.

ACE_UINT32 notify (void) const;

void notify (ACE_UINT32);

Set/get the timeout.

ACE_Synch_Options &options (void) const;

void options (const ACE_Synch_Options &options);

Set/get the name of the token and the client id. The set

method is combined to make it easier on us. We're copying the names as a contiguous buffer.

char *token_name (void) const;

char *client_id (void) const;

void token_name (const char *token_name, const char* client_id);

int encode (void *&);

Encode the message before transmission.

int decode (void);

Decode message after reception. This must be called to set the internal options.

void dump (void) const;

Print out the values of the message for debugging purposes.

AUTHOR

Douglas C. Schmidt ([email protected]) Tim Harrison ([email protected])

LIBRARY

ACE