tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Konstantin Kolinko <knst.koli...@gmail.com>
Subject Re: svn commit: r1417683 - in /tomcat/trunk/java/org/apache/tomcat/websocket: ClientContainerImpl.java PojoServerEndpointConfiguration.java ServerContainerImpl.java WsEndpointPojo.java WsFrame.java WsServlet.java WsSession.java
Date Thu, 06 Dec 2012 11:45:25 GMT
2012/12/6  <markt@apache.org>:
> Author: markt
> Date: Wed Dec  5 22:52:21 2012
> New Revision: 1417683
>
> URL: http://svn.apache.org/viewvc?rev=1417683&view=rev
> Log:
> Update implementation for API changes
>
> Added:
>     tomcat/trunk/java/org/apache/tomcat/websocket/PojoServerEndpointConfiguration.java
  (with props)
> Modified:
>     tomcat/trunk/java/org/apache/tomcat/websocket/ClientContainerImpl.java
>     tomcat/trunk/java/org/apache/tomcat/websocket/ServerContainerImpl.java
>     tomcat/trunk/java/org/apache/tomcat/websocket/WsEndpointPojo.java
>     tomcat/trunk/java/org/apache/tomcat/websocket/WsFrame.java
>     tomcat/trunk/java/org/apache/tomcat/websocket/WsServlet.java
>     tomcat/trunk/java/org/apache/tomcat/websocket/WsSession.java
>


> Added: tomcat/trunk/java/org/apache/tomcat/websocket/PojoServerEndpointConfiguration.java
> URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/PojoServerEndpointConfiguration.java?rev=1417683&view=auto
> ==============================================================================
> --- tomcat/trunk/java/org/apache/tomcat/websocket/PojoServerEndpointConfiguration.java
(added)
> +++ tomcat/trunk/java/org/apache/tomcat/websocket/PojoServerEndpointConfiguration.java
Wed Dec  5 22:52:21 2012
> +package org.apache.tomcat.websocket;
> +
> +import javax.websocket.DefaultServerConfiguration;
> +import javax.websocket.Endpoint;
> +import javax.websocket.EndpointFactory;
> +
> +public class PojoServerEndpointConfiguration extends
> +        DefaultServerConfiguration<Endpoint> {
> +
> +    @Override
> +    public boolean checkOrigin(String originHeaderValue) {
> +        // Allow all
> +        return true;
> +    }
> +
> +    private final EndpointFactory<Endpoint> endpointFactory;
> +    private final String servletPath;
> +
> +    PojoServerEndpointConfiguration(Class<?> pojo,
> +            PojoMethodMapping methodMapping, String servletPath, String pathInfo) {
> +        this.endpointFactory =
> +                new PojoEndpointFactory(pojo, methodMapping, pathInfo);
> +        this.servletPath = servletPath;
> +    }
> +

(...)

Was it intended to make the constructor package-visible? If it is then
the class itself could be made package-visible, for consistency.  My
guess that was a typo. The PojoMethodMapping class is already public
and this one does not add much.

Best regards,
Konstantin Kolinko

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message