The dhcpmgr and dhcpconfig management tools provide DHCP service configuration capabilities to system administrators. If you want your module to be available to users of the tools so they can configure the underlying data service, you must provide a JavaBeans™ component, known as a bean, for the public module.
The bean provides the public module with the context necessary to set the PATH variable, and optionally the RESOURCE_CONFIG variable, in dhcpsvc.conf.
The dhcpmgr tool provides an interface, com/sun/dhcpmgr/client/DSModule, which defines the API functions that the public module management bean must implement.
The DSModule interface is contained in the dhcpmgr.jar file. In order to compile the bean against this interface, you must add /usr/sadm/admin/dhcpmgr/dhcpmgr.jar to the javac class path. For example, for your bean named myModule.java, type
javac -classpath /usr/sadm/admin/dhcpmgr/dhcpmgr.jar myModule.java
abstract java.awt.Component getComponent()
Returns a component that is displayed as one of the wizard steps for the DHCP Configuration Wizard. The returned component should be a panel containing GUI components to be used to obtain data-store-specific data from the user during configuration. The configuration data itself will be returned to the wizard as a result of calls to the getPath() and getAdditional() methods. See getPath() and getAdditional() for more information.
abstract java.lang.String getDescription()
Returns a description that is used by the DHCP Configuration Wizard when it adds the data store to the list of data store selections. For example, the management bean for the ds_SUNWfiles.so public module returns “Text files” as the description.
abstract java.lang.String getPath()
Returns the path/location that is used by the data store (the PATH value in the Framework Configuration Layer configuration file /etc/inet/dhcpsvc.conf), or null if not set. The path/location value should be supplied by the user by interaction with the management bean's component. See Passing Data Store Configuration Data.
abstract java.lang.String getAdditional()
Returns additional data-store-specific information, such as the RESOURCE_CONFIG value in the Framework Configuration Layer configuration file /etc/inet/dhcpsvc.conf. The value returned by this method is most likely supplied by the user by interaction with the management bean's component. See Passing Data Store Configuration Data.
Public module management beans must meet the following packaging requirements.
The public module management bean must be archived as a JAR file. The name of the JAR file must consist of the name of the public module and a .jar suffix. For example, the name of the public module management bean for the ds_SUNWfiles.so public module is SUNWfiles.jar.
The JAR file must contain a manifest that identifies the bean class. For example, the manifest for the SUNWfiles.jar JAR file contains:
Name: com/sun/dhcpmgr/client/SUNWfiles/SUNWfiles.class
Java-Bean: True
The com/sun/dhcpmgr/client/SUNWfiles/SUNWfiles.class class is the Java class that implements the com/sun/dhcpmgr/client/DSModule interface.