JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Remote Administration Daemon Developer Guide     Oracle Solaris 11.1 Information Library
search filter icon
search icon

Document Information

Preface

1.  Introduction

2.  Concepts

3.  Abstract Data Representation

4.  libadr

5.  Client Libraries

6.  Module Development

API Definitions and Implementation

Entry Points and Generated Stubs

Global Variables

Module Registration

Instance Management

Container Interactions

Logging

Using Threads

Synchronization

Subprocesses

Utilities

Locales

Transactional Processing

Asynchronous Methods and Progress Reporting

rad Namespaces

Static Objects

rad Module Linkage

7.  rad Best Practices

A.  rad Binary Protocol

rad Namespaces

Objects in the rad namespace can be managed either as a set of statically installed objects or as a dynamic set of objects that are listed or created on demand.

Static Objects

rad_modapi.h declares two interfaces for statically adding objects to a namespace.

cont_insert() adds an object to the namespace. In turn, objects are created by calling instance_create() with a name, a pointer to the interface the object implements, and a pointer to object-specific callback data. For example:

i = instance_create("com.oracle.solaris.user:type=User,name=Kyle",
    &interface_User_svr, kyle_data);
cont_insert(&rad_container, i, error_return);

cont_insert_singleton() is a convenience routine that creates an object instance for the specified interface with the specified name and adds it to the namespace. The callback data is set to NULL.

cont_insert_singleton(&rad_container,
    "com.oracle.solaris.user:type=UserManager", &interface_UserManager_svr,
    error_return);