Java Code Examples for org.eclipse.jetty.continuation.ContinuationFilter

Following code examples demonstrate how to use org.eclipse.jetty.continuation.ContinuationFilter from jetty. These examples are extracted from various highly rated open source projects. You can directly use these code snippets or view their entire linked source code. These snippets are extracted to provide contextual information about how to use this class in the real world. These samples also let you understand some good practices on how to use org.eclipse.jetty.continuation.ContinuationFilter and various code implementation of this class.

    
    public void undispatch()
    {
        if (isSuspended())
        {
            if (ContinuationFilter.__debug)
                throw new ContinuationThrowable();
            throw __exception;
        }
        throw new IllegalStateException("!suspended");
        
    } 


    public void addsFilterClasses() throws Exception {
        final FilterRegistration.Dynamic builder = environment.addFilter("filter", ContinuationFilter.class);
        assertThat(builder)
                .isNotNull();

        final ArgumentCaptor<FilterHolder> holder = ArgumentCaptor.forClass(FilterHolder.class);
        verify(servletHandler).addFilter(holder.capture());

        assertThat(holder.getValue().getName())
                .isEqualTo("filter");

        assertThat(holder.getValue().getHeldClass().equals(ContinuationFilter.class))
                .isTrue();
    } 

			protected void configureServlets() {
				bind(ContinuationFilter.class).in(Singleton.class);

				filter("/gwtRequest*").through(GwtRequest.class);

				serve("/gwtRequest*").with(RequestFactoryServlet.class);
				serve("/logger").with(Logger.class);
				serve("/process").with(Process.class);
				serve("/start").with(Start.class);
				serve("/stop").with(Stop.class);
				serve("/weaver").with(Weave.class);
				filter("/worker").through(ContinuationFilter.class);
				serve("/worker").with(Workers.class);

				bind(ServiceLayerDecorator.class).to(InjectingServiceLayerDecorator.class);

				bind(Database.class).asEagerSingleton();

				bind(ClazzService.class).to(ClassManager.class);
				bind(DatasetService.class).to(DatasetManager.class);
				bind(EventService.class).to(EventManager.class);
				bind(FieldService.class).to(ClassManager.class);
				bind(MethodService.class).to(ClassManager.class);
			} 

Advertisement
Javadoc
------------------------------------------------------------
Advertisement