Listing RAD Interface Instances in Java
An interface can contain multiple RAD instances. For example, the zonemgr
module defines a Zone interface and there is an instance for each zone on the system. The Connection
class provides the list_objects
() method to list the interface instances as shown in the following example.
Example 2-18 Java Language – Listing RAD Interface Instances
import com.oracle.solaris.rad.client.ADRName; import com.oracle.solaris.rad.connect.Connection; import com.oracle.solaris.rad.zonemgr.Zone; Connection con = Connection.connectUnix(); System.out.println("Connected: " + con.toString()); for (ADRName name: con.listObjects(new Zone())) { System.out.println("ADR Name: " + name.toString()); }