This chapter introduces the programming interfaces provided with Solaris Bandwidth Manager 1.6.
JavaTM APIs are provided for:
Configuration
Directory information and use
Statistics
In addition, there is a C statistics API, similar to that provided in SunTM Bandwidth Allocator 1.0.
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.
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.

The core management framework (also referred to as the framework) is a registry for objects in an agent. Objects can be registered by:
The agent itself
A manager through an adaptor in the agent
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.
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:
An agent
A manager through an adaptor in an agent
Any object that you want to be accessible through the framework must be represented as an m-bean. Such objects include:
The resources you want an agent to manage
Services you want to provide for managing resources
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.
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:
Get or set properties of existing m-bean instances
Invoke methods on existing m-bean instances
Instantiate an m-bean and register the new m-bean instance
The Solaris Bandwidth Manager policy agent includes an HTTP adaptor.
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:
Getting or setting attributes
Method invocations
Events emitted by the m-bean are propagated to the c-bean.
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.