001/*
002 * JPPF.
003 * Copyright (C) 2005-2018 JPPF Team.
004 * http://www.jppf.org
005 *
006 * Licensed under the Apache License, Version 2.0 (the "License");
007 * you may not use this file except in compliance with the License.
008 * You may obtain a copy of the License at
009 *
010 *   http://www.apache.org/licenses/LICENSE-2.0
011 *
012 * Unless required by applicable law or agreed to in writing, software
013 * distributed under the License is distributed on an "AS IS" BASIS,
014 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
015 * See the License for the specific language governing permissions and
016 * limitations under the License.
017 */
018
019package org.jppf.startup;
020
021/**
022 * This interface class represents objects that are run at client startup time.
023 * <p>More precisely, they are run just before any connection with a driver is established.
024 * <p>Classes implementing this interface must have a public no-arg constructor and implement the {@link java.lang.Runnable#run() run()} method.
025 * <p>Client startup classes allow a developer to perform initializations at runtime, such as load specific APIs,
026 * create connection pools, subscribe to the monitoring MBeans notifications, etc. The range of applications is quite broad.
027 * <p>They are looked up by using the Service Provider Interface (SPI) lookup mechanism.
028 * For the SPI to find them, proceed as follows:
029 * <ul>
030 * <li>in the classpath root create, if it does not exist, a folder named META-INF/services</li>
031 * <li>in this folder create a file named &quot;org.jppf.startup.JPPFClientStartupSPI&quot;</li>
032 * <li>the content of this file is one or more line(s) with the fully qualified class name of an implementation of this interface</li>
033 * <li>to specify multiple implementations, just put one per line in the file</li>
034 * <li>there can also be multiple META-INF/services/org.jppf.startup.JPPFClientStartupSPI resources in the classpath
035 * (for instance in multiple jar files); all of them will be looked up and processed</li>
036 * </ul>
037 * @author Laurent Cohen
038 */
039public interface JPPFClientStartupSPI extends JPPFStartup
040{
041}