001/*
002 * Copyright 2012-2017 the original author or authors.
003 *
004 * Licensed under the Apache License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 *      http://www.apache.org/licenses/LICENSE-2.0
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 */
016
017package org.springframework.boot.context.event;
018
019import org.springframework.boot.SpringApplication;
020import org.springframework.context.ApplicationContext;
021import org.springframework.context.ApplicationListener;
022import org.springframework.core.env.Environment;
023
024/**
025 * Event published as early as conceivably possible as soon as a {@link SpringApplication}
026 * has been started - before the {@link Environment} or {@link ApplicationContext} is
027 * available, but after the {@link ApplicationListener}s have been registered. The source
028 * of the event is the {@link SpringApplication} itself, but beware of using its internal
029 * state too much at this early stage since it might be modified later in the lifecycle.
030 *
031 * @author Phillip Webb
032 * @author Madhura Bhave
033 * @since 1.5.0
034 */
035@SuppressWarnings("serial")
036public class ApplicationStartingEvent extends SpringApplicationEvent {
037
038        /**
039         * Create a new {@link ApplicationStartingEvent} instance.
040         * @param application the current application
041         * @param args the arguments the application is running with
042         */
043        public ApplicationStartingEvent(SpringApplication application, String[] args) {
044                super(application, args);
045        }
046
047}