Package com.linkedin.r2.filter

Examples of com.linkedin.r2.filter.Filter


    Map<String, Object> beans = getBeans();

    boolean[] enableAsyncOptions = {true, false};
    for (boolean enableAsync: enableAsyncOptions)
    {
      HttpServer server = MockHttpServerFactory.create(PORT, resourceClasses, beans, enableAsync);

      runTest(server);
    }
  }
View Full Code Here


    Map<String, Object> beans = getBeans();

    boolean[] enableAsyncOptions = {true, false};
    for (boolean enableAsync: enableAsyncOptions)
    {
      HttpServer server = MockHttpServerFactory.create(PORT,
                                                       new String[]{"com.linkedin.restli.example.impl"},
                                                       beans,
                                                       enableAsync);

      runTest(server);
View Full Code Here

*/
public class RestLiExampleBasicServer
{
  public static void main(String[] args) throws Exception
  {
    final HttpServer server = createServer();

    startServer(server);

    System.out.println("Basic example server running on port " + SERVER_PORT + ". Press any key to stop server.");
    System.in.read();
View Full Code Here

  {
    // write D2-related configuration to ZooKeeper
    // all the configuration here are permanent, no need to re-write as long as ZooKeeper still has the data
    // therefore in real case, do this "discovery" step separately

    final HttpServer server = RestLiExampleBasicServer.createServer();
    final ZooKeeperConnectionManager zkConn = createZkConn();

    startServer(server, zkConn);

    System.out.println("Example server with D2 is running with URL " + RestLiExampleBasicServer.getServerUrl() + ". Press any key to stop server.");
View Full Code Here

    TransportDispatcher dispatcher = new DelegatingTransportDispatcher(new RestLiServer(config,
                                                                                        resourceFactory,
                                                                                        engine));

    final FilterChain fc = FilterChains.empty().addLast(new SimpleLoggingFilter());
    final HttpServer server = new HttpServerFactory(fc).createServer(port,
                                                               HttpServerFactory.DEFAULT_CONTEXT_PATH,
                                                               NUM_THREADS,
                                                               dispatcher,
                                                               enableAsync,
                                                               enableAsync ? ASYNC_TIMEOUT : -1);
View Full Code Here

    // using InjectMockResourceFactory to keep examples spring-free
    final ResourceFactory factory = new InjectMockResourceFactory(beanProvider);

    final TransportDispatcher dispatcher = new DelegatingTransportDispatcher(new RestLiServer(config, factory));
    return new HttpServerFactory(FilterChains.empty()).createServer(SERVER_PORT, dispatcher);
  }
View Full Code Here

    }

    @Test
    public void specification_with_only_filtered_out_features_should_not_be_executable() {
        final Specification specification = specificationWith(featureWith(successScenario()).tag("Broken"));
        assertFalse(specification.isExecuteable(new Filter("~Broken")));

    }
View Full Code Here

    }

    @Test
    public void feature_with_only_filtered_out_scenarios_should_not_be_executable() {
        final Feature feature = featureWith(successScenario().tag("Broken"));
        assertFalse(feature.isExecutable(new Filter("~Broken")));
    }
View Full Code Here

    public final SpecOutput execute(final Writer writer) {
        return execute(new AnsiWriterReporter(writer));
    }

    public final SpecOutput execute(final Reporter reporter) {
        final Filter filter = new Filter(System.getProperty("mbyhave.tags"));
        return specification.execute(this.getClass(), reporter, eventAnnouncer, filter);
    }
View Full Code Here

            ).tag("Broken");
        }};

        final SpecOutput output = spec.getSpecification().execute(
                spec.getClass(), new NullReporter(), new CallbackAnnouncer(),
                new Filter("~Broken"));

        assertEquals(0, output.getFeatures().size());
    }
View Full Code Here

TOP

Related Classes of com.linkedin.r2.filter.Filter

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.