Skip to content

Commit

Permalink
Javadocs and general formatting polish
Browse files Browse the repository at this point in the history
  • Loading branch information
philwebb committed Apr 25, 2013
1 parent 9da2c21 commit db2c248
Show file tree
Hide file tree
Showing 65 changed files with 321 additions and 92 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@
*/
public abstract class AbstractSockJsSession implements WebSocketSession {

protected Log logger = LogFactory.getLog(this.getClass());
protected final Log logger = LogFactory.getLog(getClass());


private final String sessionId;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,21 @@
import org.springframework.websocket.WebSocketHandler;
import org.springframework.websocket.WebSocketSession;


/**
* A factory for creating a SockJS session.
*
* @param <S> The type of session being created
* @author Rossen Stoyanchev
* @since 4.0
*/
public interface SockJsSessionFactory<S extends WebSocketSession>{

/**
* Create a new SockJS session.
* @param sessionId the ID of the session
* @param handler the underlying {@link WebSocketHandler}
* @return a new non-null session
*/
S createSession(String sessionId, HandlerProvider<WebSocketHandler> handler);

}
Original file line number Diff line number Diff line change
@@ -1,7 +1,21 @@
/*
* Copyright 2002-2013 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.
*/

/**
* Common abstractions and Spring configuration support for the SockJS protocol.
*
*/
package org.springframework.sockjs;

Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
import org.springframework.websocket.WebSocketHandler;
import org.springframework.websocket.WebSocketMessage;


/**
* Provides partial implementations of {@link SockJsSession} methods to send messages,
* including heartbeat messages and to manage session state.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
import org.springframework.websocket.HandlerProvider;
import org.springframework.websocket.WebSocketHandler;


/**
* Provides support for SockJS configuration options and serves the static SockJS URLs.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@

package org.springframework.sockjs.server;


/**
*
* @author Rossen Stoyanchev
* @since 4.0
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

import org.springframework.core.NestedRuntimeException;


/**
*
* @author Rossen Stoyanchev
Expand All @@ -27,7 +26,6 @@
@SuppressWarnings("serial")
public class NestedSockJsRuntimeException extends NestedRuntimeException {


public NestedSockJsRuntimeException(String msg) {
super(msg);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package org.springframework.sockjs.server;

import org.springframework.scheduling.TaskScheduler;
import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler;

/**
*
* @author Rossen Stoyanchev
* @since 4.0
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package org.springframework.sockjs.server;

import java.nio.charset.Charset;
Expand All @@ -21,10 +22,7 @@

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


/**
*
*
* @author Rossen Stoyanchev
* @since 4.0
*/
Expand All @@ -46,6 +44,7 @@ private SockJsFrame(String content) {
this.content = content;
}


public static SockJsFrame openFrame() {
return OPEN_FRAME;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,12 @@
import org.springframework.websocket.HandlerProvider;
import org.springframework.websocket.WebSocketHandler;


/**
*
* @author Rossen Stoyanchev
* @since 4.0
*/
public interface SockJsService {


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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package org.springframework.sockjs.server;

import org.springframework.http.server.ServerHttpRequest;
Expand All @@ -21,9 +22,7 @@
import org.springframework.websocket.HandlerProvider;
import org.springframework.websocket.WebSocketHandler;


/**
*
* @author Rossen Stoyanchev
* @since 4.0
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,15 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package org.springframework.sockjs.server;

import java.util.Arrays;
import java.util.List;

import org.springframework.http.HttpMethod;


/**
*
* @author Rossen Stoyanchev
* @since 4.0
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,21 @@
/*
* Copyright 2002-2013 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.
*/

/**
* Server-side SockJS abstractions and base classes.
*
*/
package org.springframework.sockjs.server;

Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package org.springframework.sockjs.server.support;

import java.io.IOException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,7 @@
import org.springframework.websocket.WebSocketHandler;
import org.springframework.websocket.support.SimpleHandlerProvider;


/**
*
* @author Rossen Stoyanchev
* @since 4.0
*/
Expand Down Expand Up @@ -89,6 +87,7 @@ public SockJsHttpRequestHandler(String prefix, SockJsService sockJsService,
this.handlerProvider = handlerProvider;
}


public String getPrefix() {
return this.prefix;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
/*
* Copyright 2002-2013 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.
*/

/**
* Server-side SockJS classes including a
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package org.springframework.sockjs.server.transport;

import java.io.IOException;
Expand All @@ -34,7 +35,6 @@
import com.fasterxml.jackson.databind.JsonMappingException;
import com.fasterxml.jackson.databind.ObjectMapper;


/**
* TODO
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package org.springframework.sockjs.server.transport;

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

protected abstract FrameFormat getFrameFormat(ServerHttpRequest request);

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package org.springframework.sockjs.server.transport;

import java.io.IOException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package org.springframework.sockjs.server.transport;

import java.io.IOException;
Expand All @@ -27,7 +28,6 @@
import org.springframework.websocket.HandlerProvider;
import org.springframework.websocket.WebSocketHandler;


/**
* TODO
*
Expand All @@ -36,7 +36,6 @@
*/
public class EventSourceTransportHandler extends AbstractHttpSendingTransportHandler {


@Override
public TransportType getTransportType() {
return TransportType.EVENT_SOURCE;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package org.springframework.sockjs.server.transport;

import java.io.IOException;
Expand All @@ -32,7 +33,6 @@
import org.springframework.websocket.HandlerProvider;
import org.springframework.websocket.WebSocketHandler;


/**
* TODO
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package org.springframework.sockjs.server.transport;

import java.nio.charset.Charset;
Expand All @@ -31,7 +32,6 @@
import org.springframework.websocket.HandlerProvider;
import org.springframework.websocket.WebSocketHandler;


/**
* TODO
*
Expand All @@ -40,7 +40,6 @@
*/
public class JsonpPollingTransportHandler extends AbstractHttpSendingTransportHandler {


@Override
public TransportType getTransportType() {
return TransportType.JSONP;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package org.springframework.sockjs.server.transport;

import java.io.IOException;
Expand All @@ -27,7 +28,6 @@

public class JsonpTransportHandler extends AbstractHttpReceivingTransportHandler {


@Override
public TransportType getTransportType() {
return TransportType.JSONP_SEND;
Expand Down
Loading

0 comments on commit db2c248

Please sign in to comment.