Author: markt Date: Mon Feb 25 12:13:54 2013 New Revision: 1449678 URL: http://svn.apache.org/r1449678 Log: Fix a couple of TODOs
Modified: tomcat/trunk/java/org/apache/tomcat/websocket/WsSession.java Modified: tomcat/trunk/java/org/apache/tomcat/websocket/WsSession.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/WsSession.java?rev=1449678&r1=1449677&r2=1449678&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/tomcat/websocket/WsSession.java (original) +++ tomcat/trunk/java/org/apache/tomcat/websocket/WsSession.java Mon Feb 25 12:13:54 2013 @@ -54,6 +54,8 @@ public class WsSession implements Sessio private final Endpoint localEndpoint; private final WsRemoteEndpointBase wsRemoteEndpoint; + private final RemoteEndpoint.Async remoteEndpointAsync; + private final RemoteEndpoint.Basic remoteEndpointBasic; private final ClassLoader applicationClassLoader; private final WsWebSocketContainer webSocketContainer; private final WsRequest request; @@ -93,6 +95,8 @@ public class WsSession implements Sessio this.localEndpoint = localEndpoint; this.wsRemoteEndpoint = wsRemoteEndpoint; this.wsRemoteEndpoint.setSession(this); + this.remoteEndpointAsync = new WsRemoteEndpointAsync(wsRemoteEndpoint); + this.remoteEndpointBasic = new WsRemoteEndpointBasic(wsRemoteEndpoint); this.webSocketContainer = wsWebSocketContainer; applicationClassLoader = Thread.currentThread().getContextClassLoader(); wsRemoteEndpoint.setSendTimeout( @@ -263,15 +267,13 @@ public class WsSession implements Sessio @Override public RemoteEndpoint.Async getAsyncRemote() { - // TODO Don't create new wrappers on every call - return new WsRemoteEndpointAsync(wsRemoteEndpoint); + return remoteEndpointAsync; } @Override public RemoteEndpoint.Basic getBasicRemote() { - // TODO Don't create new wrappers on every call - return new WsRemoteEndpointBasic(wsRemoteEndpoint); + return remoteEndpointBasic; } --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org