ExamplePlugin.java revision 2617
1008N/A * The contents of this file are subject to the terms of the 1008N/A * Common Development and Distribution License, Version 1.0 only 1008N/A * (the "License"). You may not use this file except in compliance 1008N/A * You can obtain a copy of the license at 1008N/A * See the License for the specific language governing permissions 1008N/A * and limitations under the License. 1008N/A * When distributing Covered Code, include this CDDL HEADER in each 1008N/A * file and include the License file at 1008N/A * add the following below this CDDL HEADER, with the fields enclosed 1008N/A * by brackets "[]" replaced with your own identifying information: 1008N/A * Portions Copyright [yyyy] [name of copyright owner] 1008N/A * Portions Copyright 2006-2007 Sun Microsystems, Inc. 1008N/A * The example plugin implementation class. This plugin will output 1008N/A * the configured message to the error log during server start up. 1008N/A // The current configuration. 2617N/A * Performs any initialization necessary for this plugin. This will 2617N/A * be called as soon as the plugin has been loaded and before it is 2617N/A * registered with the server. 2617N/A * @param pluginTypes The set of plugin types that indicate the 2617N/A * ways in which this plugin will be invoked. 2617N/A * @param configuration The configuration for this plugin. 2617N/A * @throws ConfigException If the provided entry does not contain 2617N/A * a valid configuration for this plugin. 2617N/A * @throws InitializationException If a problem occurs while 2617N/A * initializing the plugin that is 2617N/A * not related to the server 1008N/A // This plugin may only be used as a server startup plugin. 2617N/A +
" for the example plugin."));
1008N/A // Register change listeners. These are not really necessary for 1008N/A // this plugin since it is only used during server start-up. 2617N/A * Performs any processing that should be done when the Directory 2617N/A * Server is in the process of starting. This method will be called 2617N/A * after virtually all other initialization has been performed but 2617N/A * before the connection handlers are started. 2617N/A * @return The result of the startup plugin processing. 1008N/A // Log the provided message. 2617N/A * Applies the configuration changes to this change listener. 2617N/A * The new configuration containing the changes. 2617N/A * @return Returns information about the result of changing the 1008N/A // The new configuration has already been validated. 1008N/A // Log a message to say that the configuration has changed. This 1008N/A // isn't necessary, but we'll do it just to show that the change 1008N/A "Example plugin message has been changed from '" 1008N/A // Update the configuration. 1008N/A // Update was successfull, no restart required. 2617N/A * Indicates whether the proposed change to the configuration is 2617N/A * acceptable to this change listener. 2617N/A * The new configuration containing the changes. 2617N/A * A list that can be used to hold messages about why the 2617N/A * provided configuration is not acceptable. 2617N/A * @return Returns <code>true</code> if the proposed change is 2617N/A * acceptable, or <code>false</code> if it is not. 1008N/A // The only thing that can be validated here is the plugin's 1008N/A // message. However, it is always going to be valid, so let's