You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2014/06/23 14:06:40 UTC
svn commit: r1604768 - in /tomcat/trunk/java/org/apache/tomcat/websocket:
WsExtension.java WsExtensionParameter.java
Author: markt
Date: Mon Jun 23 12:06:40 2014
New Revision: 1604768
URL: http://svn.apache.org/r1604768
Log:
Starting to look at WebSocket compression. These implementations will be required to process the extension negotiation.
Added:
tomcat/trunk/java/org/apache/tomcat/websocket/WsExtension.java (with props)
tomcat/trunk/java/org/apache/tomcat/websocket/WsExtensionParameter.java (with props)
Added: tomcat/trunk/java/org/apache/tomcat/websocket/WsExtension.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/WsExtension.java?rev=1604768&view=auto
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/websocket/WsExtension.java (added)
+++ tomcat/trunk/java/org/apache/tomcat/websocket/WsExtension.java Mon Jun 23 12:06:40 2014
@@ -0,0 +1,46 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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 org.apache.tomcat.websocket;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.websocket.Extension;
+
+public class WsExtension implements Extension {
+
+ private final String name;
+ private final List<Parameter> parameters = new ArrayList<>();
+
+ WsExtension(String name) {
+ this.name = name;
+ }
+
+ void addParameter(Parameter parameter) {
+ parameters.add(parameter);
+ }
+
+ @Override
+ public String getName() {
+ return name;
+ }
+
+ @Override
+ public List<Parameter> getParameters() {
+ return parameters;
+ }
+}
Propchange: tomcat/trunk/java/org/apache/tomcat/websocket/WsExtension.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: tomcat/trunk/java/org/apache/tomcat/websocket/WsExtensionParameter.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/WsExtensionParameter.java?rev=1604768&view=auto
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/websocket/WsExtensionParameter.java (added)
+++ tomcat/trunk/java/org/apache/tomcat/websocket/WsExtensionParameter.java Mon Jun 23 12:06:40 2014
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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 org.apache.tomcat.websocket;
+
+import javax.websocket.Extension.Parameter;
+
+public class WsExtensionParameter implements Parameter {
+
+ private final String name;
+ private final String value;
+
+ WsExtensionParameter(String name, String value) {
+ this.name = name;
+ this.value = value;
+ }
+
+ @Override
+ public String getName() {
+ return name;
+ }
+
+ @Override
+ public String getValue() {
+ return value;
+ }
+}
Propchange: tomcat/trunk/java/org/apache/tomcat/websocket/WsExtensionParameter.java
------------------------------------------------------------------------------
svn:eol-style = native
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
Re: svn commit: r1604768 - in /tomcat/trunk/java/org/apache/tomcat/websocket:
WsExtension.java WsExtensionParameter.java
Posted by Mark Thomas <ma...@apache.org>.
On 23/06/2014 13:06, markt@apache.org wrote:
> Author: markt
> Date: Mon Jun 23 12:06:40 2014
> New Revision: 1604768
>
> URL: http://svn.apache.org/r1604768
> Log:
> Starting to look at WebSocket compression. These implementations will be required to process the extension negotiation.
I have an initial implementation locally (in git) that works in at least
some cases. Rather than just dump all the code I am trying to organise
the commits so that they are easy to follow without having to follow the
dead ends I tried and then rejected and without being distracted by the
(plenty of) silly mistakes I made along the way.
There is a balance to strike here between experimenting locally to see
what works without exposing the community to too much noise and enabling
the community to comment on and participate in the development. I have
the result of about a day's worth of development and testing to commit
and I think that is about right in terms of balance but, as always,
feedback welcome.
Mark
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org