Skip to content

Commit a6e4744

Browse files
committed
Fixup line endings
1 parent b583262 commit a6e4744

File tree

5 files changed

+753
-753
lines changed

5 files changed

+753
-753
lines changed
Lines changed: 41 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,41 @@
1-
<?xml version="1.0" encoding="UTF-8"?>
2-
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3-
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4-
<modelVersion>4.0.0</modelVersion>
5-
<parent>
6-
<groupId>org.springframework.boot</groupId>
7-
<artifactId>spring-boot-starters</artifactId>
8-
<version>1.2.0.BUILD-SNAPSHOT</version>
9-
</parent>
10-
<artifactId>spring-boot-starter-undertow</artifactId>
11-
<name>Spring Boot Undertow Starter</name>
12-
<description>Spring Boot Undertow Starter</description>
13-
<url>http://projects.spring.io/spring-boot/</url>
14-
<organization>
15-
<name>Pivotal Software, Inc.</name>
16-
<url>http://www.spring.io</url>
17-
</organization>
18-
<properties>
19-
<main.basedir>${basedir}/../..</main.basedir>
20-
</properties>
21-
<dependencies>
22-
<dependency>
23-
<groupId>io.undertow</groupId>
24-
<artifactId>undertow-core</artifactId>
25-
</dependency>
26-
<dependency>
27-
<groupId>io.undertow</groupId>
28-
<artifactId>undertow-servlet</artifactId>
29-
<exclusions>
30-
<exclusion>
31-
<groupId>org.jboss.spec.javax.servlet</groupId>
32-
<artifactId>jboss-servlet-api_3.1_spec</artifactId>
33-
</exclusion>
34-
</exclusions>
35-
</dependency>
36-
<dependency>
37-
<groupId>javax.servlet</groupId>
38-
<artifactId>javax.servlet-api</artifactId>
39-
</dependency>
40-
</dependencies>
41-
</project>
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4+
<modelVersion>4.0.0</modelVersion>
5+
<parent>
6+
<groupId>org.springframework.boot</groupId>
7+
<artifactId>spring-boot-starters</artifactId>
8+
<version>1.2.0.BUILD-SNAPSHOT</version>
9+
</parent>
10+
<artifactId>spring-boot-starter-undertow</artifactId>
11+
<name>Spring Boot Undertow Starter</name>
12+
<description>Spring Boot Undertow Starter</description>
13+
<url>http://projects.spring.io/spring-boot/</url>
14+
<organization>
15+
<name>Pivotal Software, Inc.</name>
16+
<url>http://www.spring.io</url>
17+
</organization>
18+
<properties>
19+
<main.basedir>${basedir}/../..</main.basedir>
20+
</properties>
21+
<dependencies>
22+
<dependency>
23+
<groupId>io.undertow</groupId>
24+
<artifactId>undertow-core</artifactId>
25+
</dependency>
26+
<dependency>
27+
<groupId>io.undertow</groupId>
28+
<artifactId>undertow-servlet</artifactId>
29+
<exclusions>
30+
<exclusion>
31+
<groupId>org.jboss.spec.javax.servlet</groupId>
32+
<artifactId>jboss-servlet-api_3.1_spec</artifactId>
33+
</exclusion>
34+
</exclusions>
35+
</dependency>
36+
<dependency>
37+
<groupId>javax.servlet</groupId>
38+
<artifactId>javax.servlet-api</artifactId>
39+
</dependency>
40+
</dependencies>
41+
</project>
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
Manifest-Version: 1.0
2-
Class-Path:
3-
1+
Manifest-Version: 1.0
2+
Class-Path:
3+
Lines changed: 106 additions & 106 deletions
Original file line numberDiff line numberDiff line change
@@ -1,107 +1,107 @@
1-
/*
2-
* Copyright 2012-2014 the original author or authors.
3-
*
4-
* Licensed under the Apache License, Version 2.0 (the "License");
5-
* you may not use this file except in compliance with the License.
6-
* You may obtain a copy of the License at
7-
*
8-
* http://www.apache.org/licenses/LICENSE-2.0
9-
*
10-
* Unless required by applicable law or agreed to in writing, software
11-
* distributed under the License is distributed on an "AS IS" BASIS,
12-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13-
* See the License for the specific language governing permissions and
14-
* limitations under the License.
15-
*/
16-
17-
package org.springframework.boot.context.embedded.undertow;
18-
19-
import io.undertow.Handlers;
20-
import io.undertow.Undertow;
21-
import io.undertow.Undertow.Builder;
22-
import io.undertow.server.HttpHandler;
23-
import io.undertow.server.handlers.PathHandler;
24-
import io.undertow.servlet.api.DeploymentManager;
25-
26-
import javax.servlet.ServletException;
27-
28-
import org.springframework.boot.context.embedded.EmbeddedServletContainer;
29-
import org.springframework.boot.context.embedded.EmbeddedServletContainerException;
30-
import org.springframework.util.StringUtils;
31-
32-
/**
33-
* {@link EmbeddedServletContainer} that can be used to control an embedded Undertow
34-
* server. Typically this class should be created using
35-
* {@link UndertowEmbeddedServletContainerFactory} and not directly.
36-
*
37-
* @author Ivan Sopov
38-
* @author Andy Wilkinson
39-
* @since 1.2.0
40-
* @see UndertowEmbeddedServletContainer
41-
*/
42-
public class UndertowEmbeddedServletContainer implements EmbeddedServletContainer {
43-
44-
private final DeploymentManager manager;
45-
46-
private final Builder builder;
47-
48-
private final String contextPath;
49-
50-
private final int port;
51-
52-
private final boolean autoStart;
53-
54-
private Undertow undertow;
55-
56-
private boolean started = false;
57-
58-
public UndertowEmbeddedServletContainer(Builder builder, DeploymentManager manager,
59-
String contextPath, int port, boolean autoStart) {
60-
this.builder = builder;
61-
this.manager = manager;
62-
this.contextPath = contextPath;
63-
this.port = port;
64-
this.autoStart = autoStart;
65-
}
66-
67-
@Override
68-
public synchronized void start() throws EmbeddedServletContainerException {
69-
if (!this.autoStart) {
70-
return;
71-
}
72-
if (this.undertow == null) {
73-
try {
74-
HttpHandler servletHandler = this.manager.start();
75-
if (StringUtils.isEmpty(this.contextPath)) {
76-
this.builder.setHandler(servletHandler);
77-
}
78-
else {
79-
PathHandler pathHandler = Handlers.path().addPrefixPath(
80-
this.contextPath, servletHandler);
81-
this.builder.setHandler(pathHandler);
82-
}
83-
this.undertow = this.builder.build();
84-
}
85-
catch (ServletException ex) {
86-
throw new EmbeddedServletContainerException(
87-
"Unable to start embdedded Undertow", ex);
88-
}
89-
}
90-
this.undertow.start();
91-
this.started = true;
92-
}
93-
94-
@Override
95-
public synchronized void stop() throws EmbeddedServletContainerException {
96-
if (this.started) {
97-
this.started = false;
98-
this.undertow.stop();
99-
}
100-
}
101-
102-
@Override
103-
public int getPort() {
104-
return this.port;
105-
}
106-
1+
/*
2+
* Copyright 2012-2014 the original author or authors.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
package org.springframework.boot.context.embedded.undertow;
18+
19+
import io.undertow.Handlers;
20+
import io.undertow.Undertow;
21+
import io.undertow.Undertow.Builder;
22+
import io.undertow.server.HttpHandler;
23+
import io.undertow.server.handlers.PathHandler;
24+
import io.undertow.servlet.api.DeploymentManager;
25+
26+
import javax.servlet.ServletException;
27+
28+
import org.springframework.boot.context.embedded.EmbeddedServletContainer;
29+
import org.springframework.boot.context.embedded.EmbeddedServletContainerException;
30+
import org.springframework.util.StringUtils;
31+
32+
/**
33+
* {@link EmbeddedServletContainer} that can be used to control an embedded Undertow
34+
* server. Typically this class should be created using
35+
* {@link UndertowEmbeddedServletContainerFactory} and not directly.
36+
*
37+
* @author Ivan Sopov
38+
* @author Andy Wilkinson
39+
* @since 1.2.0
40+
* @see UndertowEmbeddedServletContainer
41+
*/
42+
public class UndertowEmbeddedServletContainer implements EmbeddedServletContainer {
43+
44+
private final DeploymentManager manager;
45+
46+
private final Builder builder;
47+
48+
private final String contextPath;
49+
50+
private final int port;
51+
52+
private final boolean autoStart;
53+
54+
private Undertow undertow;
55+
56+
private boolean started = false;
57+
58+
public UndertowEmbeddedServletContainer(Builder builder, DeploymentManager manager,
59+
String contextPath, int port, boolean autoStart) {
60+
this.builder = builder;
61+
this.manager = manager;
62+
this.contextPath = contextPath;
63+
this.port = port;
64+
this.autoStart = autoStart;
65+
}
66+
67+
@Override
68+
public synchronized void start() throws EmbeddedServletContainerException {
69+
if (!this.autoStart) {
70+
return;
71+
}
72+
if (this.undertow == null) {
73+
try {
74+
HttpHandler servletHandler = this.manager.start();
75+
if (StringUtils.isEmpty(this.contextPath)) {
76+
this.builder.setHandler(servletHandler);
77+
}
78+
else {
79+
PathHandler pathHandler = Handlers.path().addPrefixPath(
80+
this.contextPath, servletHandler);
81+
this.builder.setHandler(pathHandler);
82+
}
83+
this.undertow = this.builder.build();
84+
}
85+
catch (ServletException ex) {
86+
throw new EmbeddedServletContainerException(
87+
"Unable to start embdedded Undertow", ex);
88+
}
89+
}
90+
this.undertow.start();
91+
this.started = true;
92+
}
93+
94+
@Override
95+
public synchronized void stop() throws EmbeddedServletContainerException {
96+
if (this.started) {
97+
this.started = false;
98+
this.undertow.stop();
99+
}
100+
}
101+
102+
@Override
103+
public int getPort() {
104+
return this.port;
105+
}
106+
107107
}

0 commit comments

Comments
 (0)