Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
S
spring-boot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DEMO
spring-boot
Commits
013d45a4
Commit
013d45a4
authored
Jan 24, 2017
by
Andy Wilkinson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Upgrade to Jetty 9.4.1.v20170120
Closes gh-7750
parent
e3235f23
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
102 deletions
+9
-102
pom.xml
spring-boot-dependencies/pom.xml
+1
-1
SampleWebSocketsApplicationTests.java
...les/websocket/jetty/SampleWebSocketsApplicationTests.java
+3
-7
FixedClientContainer.java
.../samples/websocket/jetty/client/FixedClientContainer.java
+0
-87
CustomContainerWebSocketsApplicationTests.java
...jetty/echo/CustomContainerWebSocketsApplicationTests.java
+5
-7
No files found.
spring-boot-dependencies/pom.xml
View file @
013d45a4
...
...
@@ -112,7 +112,7 @@
<jedis.version>
2.9.0
</jedis.version>
<jersey.version>
2.25
</jersey.version>
<jest.version>
2.0.4
</jest.version>
<jetty.version>
9.4.
0.v20161208
</jetty.version>
<jetty.version>
9.4.
1.v20170120
</jetty.version>
<jetty-jsp.version>
2.2.0.v201112011158
</jetty-jsp.version>
<jetty-el.version>
8.0.33
</jetty-el.version>
<jms-api.version>
1.1-rev-1
</jms-api.version>
...
...
spring-boot-samples/spring-boot-sample-websocket-jetty/src/test/java/samples/websocket/jetty/SampleWebSocketsApplicationTests.java
View file @
013d45a4
...
...
@@ -22,10 +22,8 @@ import java.util.concurrent.atomic.AtomicReference;
import
org.apache.commons.logging.Log
;
import
org.apache.commons.logging.LogFactory
;
import
org.eclipse.jetty.websocket.jsr356.ClientContainer
;
import
org.junit.Test
;
import
org.junit.runner.RunWith
;
import
samples.websocket.jetty.client.FixedClientContainer
;
import
samples.websocket.jetty.client.GreetingService
;
import
samples.websocket.jetty.client.SimpleClientWebSocketHandler
;
import
samples.websocket.jetty.client.SimpleGreetingService
;
...
...
@@ -110,7 +108,7 @@ public class SampleWebSocketsApplicationTests {
}
@Bean
public
WebSocketConnectionManager
wsConnectionManager
()
throws
Exception
{
public
WebSocketConnectionManager
wsConnectionManager
()
{
WebSocketConnectionManager
manager
=
new
WebSocketConnectionManager
(
client
(),
handler
(),
this
.
webSocketUri
);
...
...
@@ -120,10 +118,8 @@ public class SampleWebSocketsApplicationTests {
}
@Bean
public
StandardWebSocketClient
client
()
throws
Exception
{
ClientContainer
clientContainer
=
new
FixedClientContainer
();
clientContainer
.
start
();
return
new
StandardWebSocketClient
(
clientContainer
);
public
StandardWebSocketClient
client
()
{
return
new
StandardWebSocketClient
();
}
@Bean
...
...
spring-boot-samples/spring-boot-sample-websocket-jetty/src/test/java/samples/websocket/jetty/client/FixedClientContainer.java
deleted
100644 → 0
View file @
e3235f23
/*
* Copyright 2012-2016 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
samples
.
websocket
.
jetty
.
client
;
import
java.net.URI
;
import
java.util.Collections
;
import
java.util.List
;
import
javax.websocket.Extension
;
import
org.eclipse.jetty.websocket.client.WebSocketClient
;
import
org.eclipse.jetty.websocket.common.LogicalConnection
;
import
org.eclipse.jetty.websocket.common.WebSocketSession
;
import
org.eclipse.jetty.websocket.common.events.EventDriver
;
import
org.eclipse.jetty.websocket.jsr356.ClientContainer
;
import
org.eclipse.jetty.websocket.jsr356.JsrSession
;
import
org.eclipse.jetty.websocket.jsr356.JsrSessionFactory
;
import
org.springframework.test.util.ReflectionTestUtils
;
/**
* Jetty {@link ClientContainer} to work around
* https://github.com/eclipse/jetty.project/issues/1202.
*
* @author Phillip Webb
*/
public
class
FixedClientContainer
extends
ClientContainer
{
public
FixedClientContainer
()
{
super
();
WebSocketClient
client
=
getClient
();
ReflectionTestUtils
.
setField
(
client
,
"sessionFactory"
,
new
FixedJsrSessionFactory
(
this
));
}
private
static
class
FixedJsrSessionFactory
extends
JsrSessionFactory
{
private
final
ClientContainer
container
;
public
FixedJsrSessionFactory
(
ClientContainer
container
)
{
super
(
container
);
this
.
container
=
container
;
}
@Override
public
WebSocketSession
createSession
(
URI
requestURI
,
EventDriver
websocket
,
LogicalConnection
connection
)
{
return
new
FixedJsrSession
(
this
.
container
,
connection
.
getId
(),
requestURI
,
websocket
,
connection
);
}
}
private
static
class
FixedJsrSession
extends
JsrSession
{
public
FixedJsrSession
(
ClientContainer
container
,
String
id
,
URI
requestURI
,
EventDriver
websocket
,
LogicalConnection
connection
)
{
super
(
container
,
id
,
requestURI
,
websocket
,
connection
);
}
@Override
public
List
<
Extension
>
getNegotiatedExtensions
()
{
try
{
return
super
.
getNegotiatedExtensions
();
}
catch
(
NullPointerException
ex
)
{
return
Collections
.
emptyList
();
}
}
}
}
spring-boot-samples/spring-boot-sample-websocket-jetty/src/test/java/samples/websocket/jetty/echo/CustomContainerWebSocketsApplicationTests.java
View file @
013d45a4
...
...
@@ -22,11 +22,9 @@ import java.util.concurrent.atomic.AtomicReference;
import
org.apache.commons.logging.Log
;
import
org.apache.commons.logging.LogFactory
;
import
org.eclipse.jetty.websocket.jsr356.ClientContainer
;
import
org.junit.Test
;
import
org.junit.runner.RunWith
;
import
samples.websocket.jetty.SampleJettyWebSocketsApplication
;
import
samples.websocket.jetty.client.FixedClientContainer
;
import
samples.websocket.jetty.client.GreetingService
;
import
samples.websocket.jetty.client.SimpleClientWebSocketHandler
;
import
samples.websocket.jetty.client.SimpleGreetingService
;
...
...
@@ -125,18 +123,18 @@ public class CustomContainerWebSocketsApplicationTests {
}
@Bean
public
WebSocketConnectionManager
wsConnectionManager
()
throws
Exception
{
public
WebSocketConnectionManager
wsConnectionManager
()
{
WebSocketConnectionManager
manager
=
new
WebSocketConnectionManager
(
client
(),
handler
(),
this
.
webSocketUri
);
manager
.
setAutoStartup
(
true
);
return
manager
;
}
@Bean
public
StandardWebSocketClient
client
()
throws
Exception
{
ClientContainer
container
=
new
FixedClientContainer
();
container
.
start
();
return
new
StandardWebSocketClient
(
container
);
public
StandardWebSocketClient
client
()
{
return
new
StandardWebSocketClient
();
}
@Bean
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment