Package org.eclipse.jetty.util.component

Examples of org.eclipse.jetty.util.component.ContainerLifeCycle$Bean


    {
        connection.setInputBufferSize(getInputBufferSize());

        if (connector instanceof ContainerLifeCycle)
        {
            ContainerLifeCycle aggregate = (ContainerLifeCycle)connector;
            for (Connection.Listener listener : aggregate.getBeans(Connection.Listener.class))
                connection.addListener(listener);
        }
        return connection;
    }
View Full Code Here


    @Test
    public void managesLifeCycleObjects() throws Exception {
        final LifeCycle lifeCycle = mock(LifeCycle.class);
        environment.manage(lifeCycle);

        final ContainerLifeCycle container = new ContainerLifeCycle();
        environment.attach(container);

        assertThat(container.getBeans())
                .contains(lifeCycle);
    }
View Full Code Here

    @Test
    public void managesManagedObjects() throws Exception {
        final Managed managed = mock(Managed.class);
        environment.manage(managed);

        final ContainerLifeCycle container = new ContainerLifeCycle();
        environment.attach(container);

        final Object bean = ImmutableList.copyOf(container.getBeans()).get(0);
        assertThat(bean)
                .isInstanceOf(JettyManaged.class);

        final JettyManaged jettyManaged = (JettyManaged) bean;
View Full Code Here

TOP

Related Classes of org.eclipse.jetty.util.component.ContainerLifeCycle$Bean

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.