Solaris Bandwidth Manager 1.6 Developer Guide

Chapter 1 Introduction

This chapter introduces the programming interfaces provided with Solaris Bandwidth Manager 1.6.

JavaTM APIs are provided for:

In addition, there is a C statistics API, similar to that provided in SunTM Bandwidth Allocator 1.0.

Java APIs

The Java interfaces to Solaris Bandwidth Manager 1.6 are implemented as a set of management beans (m-beans) based on the Java Dynamic ManagementTM Kit. This section introduces some basic Java Dynamic Management Kit terminology and information. Refer to Chapter 2, Using the Java Interfaces for an overview of how to use the Java APIs.

Key Concepts

Figure 1-1 shows how the key concepts for the Java Dynamic Management Kit relate to an agent and a manager. They are explained in the following subsections.

Figure 1-1 Java Dynamic Management Kit Key Concepts

Graphic

The Core Management Framework

The core management framework (also referred to as the framework) is a registry for objects in an agent. Objects can be registered by:

Any object that you want to be managed from outside the framework must be registered. When you register an object, the Java Dynamic Management Kit assigns a default object name to the object when it is registered. A manager uses the object name to identify the object on which it is to perform a management operation. Any object registered with the framework must be an instance of an m-bean. The framework is a component supplied with the Java Dynamic Management Kit.

M-Beans

A managed bean, or m-bean, is a Java object that conforms to certain design patterns. These design patterns are derived from the JavaBeansTM component model. They enable properties, actions, and events to be defined for an m-bean. They also enable you to make the distinction between a read-only and a read-write property in an m-bean. To comply with the design patterns for m-beans, an m-bean must be a JavaBeans component.

An m-bean instance is manageable as soon as it is registered with the framework. An m-bean can be instantiated and registered by:

Any object that you want to be accessible through the framework must be represented as an m-bean. Such objects include:

You write the m-beans representing these objects yourself. Some components of the Java Dynamic Management Kit are implemented as m-beans.

While an agent is running, the m-beans are stored in memory.

All the information in memory is lost when the agent is stopped. When an agent is started, it has to reload the information into the repository. Compiled m-bean classes can be stored at any location specified in the CLASSPATH environment variable of the agent.

Adaptors

An adaptor connects the framework to external applications. It provides a view through a specific protocol of the m-beans instantiated and registered with the framework. An adaptor enables an external application to:

The Solaris Bandwidth Manager policy agent includes an HTTP adaptor.

C-Beans

A client bean, or c-bean, is a stub object that represents a remote m-bean to a manager developed with the adaptor client API. Like an m-bean, a c-bean is a JavaBeans component. The manager accesses an m-bean by performing operations on the c-bean, which are propagated to the m-bean, namely:

Events emitted by the m-bean are propagated to the c-bean.

The C Statistics API

The Solaris Bandwidth Manager C Statistics API retrieves information about the configuration of Solaris Bandwidth Manager and the interfaces that it manages. It can also detect events that occur at the module level, and return information about these events. Figure 1-2 shows the way in which the C Statistics API is integrated with an application.

Applications that are developed using the C Statistics API must run on a machine where Solaris Bandwidth Manager is installed. The functions listed in "Device Handling", and "Event Handling" do not require the policy agent to be running. This enables you to run an application that detects when the daemon starts. The other functions return the error BA_NOTRUNNING if the policy agent is not running.

Figure 1-2 Using the C Statistics API

Graphic