Search in sources :

Example 1 with BlockingIOCometSupport

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

the class AtmosphereResourceListenerTest 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 2 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(javax.servlet.ServletConfig) ServletContext(javax.servlet.ServletContext) BeforeMethod(org.testng.annotations.BeforeMethod)

Example 3 with BlockingIOCometSupport

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

the class AtmosphereRequestTest 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 4 with BlockingIOCometSupport

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

the class WebSocketHandlerTest 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;
        }
    });
    framework.setDefaultBroadcasterClassName(SimpleBroadcaster.class.getName());
}
Also used : SimpleBroadcaster(org.atmosphere.util.SimpleBroadcaster) BlockingIOCometSupport(org.atmosphere.container.BlockingIOCometSupport) Enumeration(java.util.Enumeration) ServletConfig(javax.servlet.ServletConfig) ServletContext(javax.servlet.ServletContext) BeforeMethod(org.testng.annotations.BeforeMethod)

Example 5 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) 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