Package org.eclipse.jetty.websocket.server.pathmap

Examples of org.eclipse.jetty.websocket.server.pathmap.ServletPathSpec


    @Test
    public void testMixedMatchOrder()
    {
        PathMappings<String> p = new PathMappings<>();

        p.put(new ServletPathSpec("/"),"default");
        p.put(new ServletPathSpec("/animal/bird/*"),"birds");
        p.put(new ServletPathSpec("/animal/fish/*"),"fishes");
        p.put(new ServletPathSpec("/animal/*"),"animals");
        p.put(new WebSocketPathSpec("/animal/{type}/{name}/chat"),"animalChat");
        p.put(new WebSocketPathSpec("/animal/{type}/{name}/cam"),"animalCam");
        p.put(new WebSocketPathSpec("/entrance/cam"),"entranceCam");

        // dumpMappings(p);
View Full Code Here


        long idleTimeout = getOption(IDLE_TIMEOUT_OPTION, policy.getIdleTimeout());
        policy.setIdleTimeout((int)idleTimeout);

        for (String mapping : normalizeURLMapping(cometdURLMapping))
        {
            wsFilter.addMapping(new ServletPathSpec(mapping), new WebSocketCreator()
            {
                @Override
                public Object createWebSocket(ServletUpgradeRequest request, ServletUpgradeResponse response)
                {
                    String origin = request.getHeader("Origin");
View Full Code Here

TOP

Related Classes of org.eclipse.jetty.websocket.server.pathmap.ServletPathSpec

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.