Search in sources :

Example 6 with BlockingIOCometSupport

use of org.atmosphere.container.BlockingIOCometSupport in project atmosphere by Atmosphere.

the class QueryStringTest method create.

@BeforeMethod
public void create() throws Throwable {
    framework = new AtmosphereFramework();
    framework.setAsyncSupport(new BlockingIOCometSupport(framework.getAtmosphereConfig()));
    framework.init(new ServletConfig() {

        @Override
        public String getServletName() {
            return "void";
        }

        @Override
        public ServletContext getServletContext() {
            return mock(ServletContext.class);
        }

        @Override
        public String getInitParameter(String name) {
            return null;
        }

        @Override
        public Enumeration<String> getInitParameterNames() {
            return null;
        }
    });
}
Also used : BlockingIOCometSupport(org.atmosphere.container.BlockingIOCometSupport) Enumeration(java.util.Enumeration) ServletConfig(jakarta.servlet.ServletConfig) ServletContext(jakarta.servlet.ServletContext) BeforeMethod(org.testng.annotations.BeforeMethod)

Example 7 with BlockingIOCometSupport

use of org.atmosphere.container.BlockingIOCometSupport in project atmosphere by Atmosphere.

the class WebSocketTest method create.

@BeforeMethod
public void create() throws Throwable {
    framework = new AtmosphereFramework();
    framework.setAsyncSupport(new BlockingIOCometSupport(framework.getAtmosphereConfig()));
    framework.init(new ServletConfig() {

        @Override
        public String getServletName() {
            return "void";
        }

        @Override
        public ServletContext getServletContext() {
            return mock(ServletContext.class);
        }

        @Override
        public String getInitParameter(String name) {
            return null;
        }

        @Override
        public Enumeration<String> getInitParameterNames() {
            return null;
        }
    });
}
Also used : BlockingIOCometSupport(org.atmosphere.container.BlockingIOCometSupport) Enumeration(java.util.Enumeration) AtmosphereFramework(org.atmosphere.cpr.AtmosphereFramework) ServletConfig(jakarta.servlet.ServletConfig) ServletContext(jakarta.servlet.ServletContext) BeforeMethod(org.testng.annotations.BeforeMethod)

Example 8 with BlockingIOCometSupport

use of org.atmosphere.container.BlockingIOCometSupport in project atmosphere by Atmosphere.

the class AtmosphereResourceTest method create.

@BeforeMethod
public void create() throws Throwable {
    framework = new AtmosphereFramework();
    framework.setAsyncSupport(new BlockingIOCometSupport(framework.getAtmosphereConfig()));
    framework.init(new ServletConfig() {

        @Override
        public String getServletName() {
            return "void";
        }

        @Override
        public ServletContext getServletContext() {
            return mock(ServletContext.class);
        }

        @Override
        public String getInitParameter(String name) {
            return null;
        }

        @Override
        public Enumeration<String> getInitParameterNames() {
            return null;
        }
    });
}
Also used : BlockingIOCometSupport(org.atmosphere.container.BlockingIOCometSupport) BeforeMethod(org.testng.annotations.BeforeMethod)

Example 9 with BlockingIOCometSupport

use of org.atmosphere.container.BlockingIOCometSupport in project atmosphere by Atmosphere.

the class CookieTest method create.

@BeforeMethod
public void create() throws Throwable {
    framework = new AtmosphereFramework();
    framework.setAsyncSupport(new BlockingIOCometSupport(framework.getAtmosphereConfig()));
    framework.init(new ServletConfig() {

        @Override
        public String getServletName() {
            return "void";
        }

        @Override
        public ServletContext getServletContext() {
            return mock(ServletContext.class);
        }

        @Override
        public String getInitParameter(String name) {
            return null;
        }

        @Override
        public Enumeration<String> getInitParameterNames() {
            return null;
        }
    });
}
Also used : BlockingIOCometSupport(org.atmosphere.container.BlockingIOCometSupport) Enumeration(java.util.Enumeration) ServletConfig(javax.servlet.ServletConfig) ServletContext(javax.servlet.ServletContext) BeforeMethod(org.testng.annotations.BeforeMethod)

Example 10 with BlockingIOCometSupport

use of org.atmosphere.container.BlockingIOCometSupport in project atmosphere by Atmosphere.

the class WebSocketStreamingHandlerTest method create.

@BeforeMethod
public void create() throws Throwable {
    framework = new AtmosphereFramework();
    framework.setAsyncSupport(new BlockingIOCometSupport(framework.getAtmosphereConfig()));
    framework.addInitParameter(RECYCLE_ATMOSPHERE_REQUEST_RESPONSE, "false");
    framework.init(new ServletConfig() {

        @Override
        public String getServletName() {
            return "void";
        }

        @Override
        public ServletContext getServletContext() {
            return mock(ServletContext.class);
        }

        @Override
        public String getInitParameter(String name) {
            return null;
        }

        @Override
        public Enumeration<String> getInitParameterNames() {
            return null;
        }
    });
}
Also used : BlockingIOCometSupport(org.atmosphere.container.BlockingIOCometSupport) Enumeration(java.util.Enumeration) ServletConfig(javax.servlet.ServletConfig) ServletContext(javax.servlet.ServletContext) BeforeMethod(org.testng.annotations.BeforeMethod)

Aggregations

BlockingIOCometSupport (org.atmosphere.container.BlockingIOCometSupport)18 BeforeMethod (org.testng.annotations.BeforeMethod)18 Enumeration (java.util.Enumeration)17 ServletConfig (jakarta.servlet.ServletConfig)9 ServletContext (jakarta.servlet.ServletContext)9 ServletConfig (javax.servlet.ServletConfig)8 ServletContext (javax.servlet.ServletContext)8 SimpleBroadcaster (org.atmosphere.util.SimpleBroadcaster)2 AtmosphereFramework (org.atmosphere.cpr.AtmosphereFramework)1