/*
 * Copyright 2012-2014 the original author or authors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.springframework.boot.context.embedded;

/**
 * Simple interface that represents a fully configured embedded servlet container (for
 * example Tomcat or Jetty). Allows the container to be {@link #stop() stopped}.
 * <p>
 * Instances of this class are usually obtained via a
 * {@link EmbeddedServletContainerFactory}.
 * 
 * @author Phillip Webb
 * @author Dave Syer
 * @see EmbeddedServletContainerFactory
 */
public interface EmbeddedServletContainer {

	/**
	 * An empty {@link EmbeddedServletContainer} that does nothing.
	 */
	public static final EmbeddedServletContainer NONE = new EmbeddedServletContainer() {

		@Override
		public void start() throws EmbeddedServletContainerException {
			// Do nothing
		};

		@Override
		public void stop() throws EmbeddedServletContainerException {
			// Do nothing
		}

		@Override
		public int getPort() {
			return 0;
		}

	};

	/**
	 * Starts the embedded servlet container. Calling this method on an already started
	 * container has no effect.
	 * @throws EmbeddedServletContainerException of the container cannot be stopped
	 */
	void start() throws EmbeddedServletContainerException;

	/**
	 * Stops the embedded servlet container. Calling this method on an already stopped
	 * container has no effect.
	 * @throws EmbeddedServletContainerException of the container cannot be stopped
	 */
	void stop() throws EmbeddedServletContainerException;

	/**
	 * @return the port this server is listening on (or -1 if none)
	 */
	int getPort();

}

@@ -1081,428 +1081,8 @@
  %7B%0A%0A
-%09/**%0A%09 * An empty %7B@link EmbeddedServletContainer%7D that does nothing.%0A%09 */%0A%09public static final EmbeddedServletContainer NONE = new EmbeddedServletContainer() %7B%0A%0A%09%09@Override%0A%09%09public void start() throws EmbeddedServletContainerException %7B%0A%09%09%09// Do nothing%0A%09%09%7D;%0A%0A%09%09@Override%0A%09%09public void stop() throws EmbeddedServletContainerException %7B%0A%09%09%09// Do nothing%0A%09%09%7D%0A%0A%09%09@Override%0A%09%09public int getPort() %7B%0A%09%09%09return 0;%0A%09%09%7D%0A%0A%09%7D;%0A%0A
 %09/**

remove obsolete EmbeddedServletContainer.NONE