Skip to content

Commit db2c248

Browse files
committed
Javadocs and general formatting polish
1 parent 9da2c21 commit db2c248

File tree

65 files changed

+321
-92
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+321
-92
lines changed

spring-websocket/src/main/java/org/springframework/sockjs/AbstractSockJsSession.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@
3737
*/
3838
public abstract class AbstractSockJsSession implements WebSocketSession {
3939

40-
protected Log logger = LogFactory.getLog(this.getClass());
40+
protected final Log logger = LogFactory.getLog(getClass());
41+
4142

4243
private final String sessionId;
4344

spring-websocket/src/main/java/org/springframework/sockjs/SockJsSessionFactory.java

+7-1
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,21 @@
2020
import org.springframework.websocket.WebSocketHandler;
2121
import org.springframework.websocket.WebSocketSession;
2222

23-
2423
/**
2524
* A factory for creating a SockJS session.
2625
*
26+
* @param <S> The type of session being created
2727
* @author Rossen Stoyanchev
2828
* @since 4.0
2929
*/
3030
public interface SockJsSessionFactory<S extends WebSocketSession>{
3131

32+
/**
33+
* Create a new SockJS session.
34+
* @param sessionId the ID of the session
35+
* @param handler the underlying {@link WebSocketHandler}
36+
* @return a new non-null session
37+
*/
3238
S createSession(String sessionId, HandlerProvider<WebSocketHandler> handler);
3339

3440
}
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,21 @@
1+
/*
2+
* Copyright 2002-2013 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+
*/
116

217
/**
318
* Common abstractions and Spring configuration support for the SockJS protocol.
4-
*
519
*/
620
package org.springframework.sockjs;
721

spring-websocket/src/main/java/org/springframework/sockjs/server/AbstractServerSockJsSession.java

-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
import org.springframework.websocket.WebSocketHandler;
3131
import org.springframework.websocket.WebSocketMessage;
3232

33-
3433
/**
3534
* Provides partial implementations of {@link SockJsSession} methods to send messages,
3635
* including heartbeat messages and to manage session state.

spring-websocket/src/main/java/org/springframework/sockjs/server/AbstractSockJsService.java

-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@
3939
import org.springframework.websocket.HandlerProvider;
4040
import org.springframework.websocket.WebSocketHandler;
4141

42-
4342
/**
4443
* Provides support for SockJS configuration options and serves the static SockJS URLs.
4544
*

spring-websocket/src/main/java/org/springframework/sockjs/server/ConfigurableTransportHandler.java

-2
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,7 @@
1616

1717
package org.springframework.sockjs.server;
1818

19-
2019
/**
21-
*
2220
* @author Rossen Stoyanchev
2321
* @since 4.0
2422
*/

spring-websocket/src/main/java/org/springframework/sockjs/server/NestedSockJsRuntimeException.java

-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818

1919
import org.springframework.core.NestedRuntimeException;
2020

21-
2221
/**
2322
*
2423
* @author Rossen Stoyanchev
@@ -27,7 +26,6 @@
2726
@SuppressWarnings("serial")
2827
public class NestedSockJsRuntimeException extends NestedRuntimeException {
2928

30-
3129
public NestedSockJsRuntimeException(String msg) {
3230
super(msg);
3331
}

spring-websocket/src/main/java/org/springframework/sockjs/server/SockJsConfiguration.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16+
1617
package org.springframework.sockjs.server;
1718

1819
import org.springframework.scheduling.TaskScheduler;
1920
import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler;
2021

2122
/**
22-
*
2323
* @author Rossen Stoyanchev
2424
* @since 4.0
2525
*/

spring-websocket/src/main/java/org/springframework/sockjs/server/SockJsFrame.java

+2-3
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16+
1617
package org.springframework.sockjs.server;
1718

1819
import java.nio.charset.Charset;
@@ -21,10 +22,7 @@
2122

2223
import com.fasterxml.jackson.core.io.JsonStringEncoder;
2324

24-
2525
/**
26-
*
27-
*
2826
* @author Rossen Stoyanchev
2927
* @since 4.0
3028
*/
@@ -46,6 +44,7 @@ private SockJsFrame(String content) {
4644
this.content = content;
4745
}
4846

47+
4948
public static SockJsFrame openFrame() {
5049
return OPEN_FRAME;
5150
}

spring-websocket/src/main/java/org/springframework/sockjs/server/SockJsService.java

-3
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,12 @@
2323
import org.springframework.websocket.HandlerProvider;
2424
import org.springframework.websocket.WebSocketHandler;
2525

26-
2726
/**
28-
*
2927
* @author Rossen Stoyanchev
3028
* @since 4.0
3129
*/
3230
public interface SockJsService {
3331

34-
3532
void handleRequest(ServerHttpRequest request, ServerHttpResponse response, String sockJsPath,
3633
HandlerProvider<WebSocketHandler> handler) throws IOException, TransportErrorException;
3734

spring-websocket/src/main/java/org/springframework/sockjs/server/TransportHandler.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16+
1617
package org.springframework.sockjs.server;
1718

1819
import org.springframework.http.server.ServerHttpRequest;
@@ -21,9 +22,7 @@
2122
import org.springframework.websocket.HandlerProvider;
2223
import org.springframework.websocket.WebSocketHandler;
2324

24-
2525
/**
26-
*
2726
* @author Rossen Stoyanchev
2827
* @since 4.0
2928
*/

spring-websocket/src/main/java/org/springframework/sockjs/server/TransportType.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,15 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16+
1617
package org.springframework.sockjs.server;
1718

1819
import java.util.Arrays;
1920
import java.util.List;
2021

2122
import org.springframework.http.HttpMethod;
2223

23-
2424
/**
25-
*
2625
* @author Rossen Stoyanchev
2726
* @since 4.0
2827
*/
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,21 @@
1+
/*
2+
* Copyright 2002-2013 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+
*/
116

217
/**
318
* Server-side SockJS abstractions and base classes.
4-
*
519
*/
620
package org.springframework.sockjs.server;
721

spring-websocket/src/main/java/org/springframework/sockjs/server/support/DefaultSockJsService.java

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16+
1617
package org.springframework.sockjs.server.support;
1718

1819
import java.io.IOException;

spring-websocket/src/main/java/org/springframework/sockjs/server/support/SockJsHttpRequestHandler.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,7 @@
3535
import org.springframework.websocket.WebSocketHandler;
3636
import org.springframework.websocket.support.SimpleHandlerProvider;
3737

38-
3938
/**
40-
*
4139
* @author Rossen Stoyanchev
4240
* @since 4.0
4341
*/
@@ -89,6 +87,7 @@ public SockJsHttpRequestHandler(String prefix, SockJsService sockJsService,
8987
this.handlerProvider = handlerProvider;
9088
}
9189

90+
9291
public String getPrefix() {
9392
return this.prefix;
9493
}

spring-websocket/src/main/java/org/springframework/sockjs/server/support/package-info.java

+15
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
/*
2+
* Copyright 2002-2013 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+
*/
116

217
/**
318
* Server-side SockJS classes including a

spring-websocket/src/main/java/org/springframework/sockjs/server/transport/AbstractHttpReceivingTransportHandler.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16+
1617
package org.springframework.sockjs.server.transport;
1718

1819
import java.io.IOException;
@@ -34,7 +35,6 @@
3435
import com.fasterxml.jackson.databind.JsonMappingException;
3536
import com.fasterxml.jackson.databind.ObjectMapper;
3637

37-
3838
/**
3939
* TODO
4040
*

spring-websocket/src/main/java/org/springframework/sockjs/server/transport/AbstractHttpSendingTransportHandler.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16+
1617
package org.springframework.sockjs.server.transport;
1718

1819
import java.io.IOException;
@@ -94,4 +95,4 @@ else if (!httpServerSession.isActive()) {
9495

9596
protected abstract FrameFormat getFrameFormat(ServerHttpRequest request);
9697

97-
}
98+
}

spring-websocket/src/main/java/org/springframework/sockjs/server/transport/AbstractHttpServerSockJsSession.java

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16+
1617
package org.springframework.sockjs.server.transport;
1718

1819
import java.io.IOException;

spring-websocket/src/main/java/org/springframework/sockjs/server/transport/EventSourceTransportHandler.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16+
1617
package org.springframework.sockjs.server.transport;
1718

1819
import java.io.IOException;
@@ -27,7 +28,6 @@
2728
import org.springframework.websocket.HandlerProvider;
2829
import org.springframework.websocket.WebSocketHandler;
2930

30-
3131
/**
3232
* TODO
3333
*
@@ -36,7 +36,6 @@
3636
*/
3737
public class EventSourceTransportHandler extends AbstractHttpSendingTransportHandler {
3838

39-
4039
@Override
4140
public TransportType getTransportType() {
4241
return TransportType.EVENT_SOURCE;

spring-websocket/src/main/java/org/springframework/sockjs/server/transport/HtmlFileTransportHandler.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16+
1617
package org.springframework.sockjs.server.transport;
1718

1819
import java.io.IOException;
@@ -32,7 +33,6 @@
3233
import org.springframework.websocket.HandlerProvider;
3334
import org.springframework.websocket.WebSocketHandler;
3435

35-
3636
/**
3737
* TODO
3838
*

spring-websocket/src/main/java/org/springframework/sockjs/server/transport/JsonpPollingTransportHandler.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16+
1617
package org.springframework.sockjs.server.transport;
1718

1819
import java.nio.charset.Charset;
@@ -31,7 +32,6 @@
3132
import org.springframework.websocket.HandlerProvider;
3233
import org.springframework.websocket.WebSocketHandler;
3334

34-
3535
/**
3636
* TODO
3737
*
@@ -40,7 +40,6 @@
4040
*/
4141
public class JsonpPollingTransportHandler extends AbstractHttpSendingTransportHandler {
4242

43-
4443
@Override
4544
public TransportType getTransportType() {
4645
return TransportType.JSONP;

spring-websocket/src/main/java/org/springframework/sockjs/server/transport/JsonpTransportHandler.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16+
1617
package org.springframework.sockjs.server.transport;
1718

1819
import java.io.IOException;
@@ -27,7 +28,6 @@
2728

2829
public class JsonpTransportHandler extends AbstractHttpReceivingTransportHandler {
2930

30-
3131
@Override
3232
public TransportType getTransportType() {
3333
return TransportType.JSONP_SEND;

0 commit comments

Comments
 (0)