Sun Java System Access Manager 7 2005Q4 C API Reference

am_policy_get_url_resource_root()

Populates the pointer resourceRoot with the resource root.

Syntax

#include "am_policy.h"
 AM_EXPORT boolean_t am_policy_get_url_resource_root
                        (const char *resource_name, char *resource_root, 
                         size_t length);

Parameters

This function takes a URL resource name.

Returns

This function returns boolean_t with one of the following values:

AM_TRUE

Successful root extraction.

AM_FALSE

Otherwise

Details

This function is takes a URL and extracts a root of the URL. For example, http://www.sun.com/index.html will return http://www.sun.com/ and http://www.sun.com:8080/index.html will return http://www.sun.com:8080/. Memory Concerns: In an implementation for a different resource other than URLs, the service writer implementing this function must make accurate judgement about the minimum size of resourceRoot.