Examples of addResourcePackageNames()


Examples of com.linkedin.restli.server.RestLiConfig.addResourcePackageNames()

                                  String[] resourcePackageNames,
                                  Map<String, Object> beans,
                                  boolean enableAsync)
  {
    RestLiConfig config = createConfig(port);
    config.addResourcePackageNames(resourcePackageNames);
    return create(port, config, beans, enableAsync);
  }

  /**
   * Creates a {@link HttpServer} that contains a {@link RestLiServer} to be used for testing a set of Rest.li
View Full Code Here

Examples of com.linkedin.restli.server.RestLiConfig.addResourcePackageNames()

  public static HttpServer createServer()
  {
    // create Rest.li resource class information and initialize documentation generator
    // only the resource classes in the specified package names are visible for public
    final RestLiConfig config = new RestLiConfig();
    config.addResourcePackageNames("com.linkedin.restli.example.impl");
    config.setServerNodeUri(URI.create(getServerUrl()));
    config.setDocumentationRequestHandler(new DefaultDocumentationRequestHandler());
    // Create an instance of the Example Filter and add it to the config.
    RestLiExampleFilter filter = new RestLiExampleFilter();
    config.addRequestFilter(filter);
View Full Code Here

Examples of com.linkedin.restli.server.RestLiConfig.addResourcePackageNames()

      throws IOException
  {
    final RestLiConfig config = new RestLiConfig();
    if (resourcePackages != null)
    {
      config.addResourcePackageNames(resourcePackages);
    }

    final Map<String, String> classFileNames = new HashMap<String, String>();
    for (String path : sourcePaths)
    {
View Full Code Here

Examples of com.linkedin.restli.server.RestLiConfig.addResourcePackageNames()

    throws IOException
  {
    final RestLiConfig config = new RestLiConfig();
    if (resourcePackages != null)
    {
      config.addResourcePackageNames(resourcePackages);
    }

    final Map<String, String> classFileNames = new HashMap<String, String>();
    for (String path : sourcePaths)
    {
View Full Code Here

Examples of com.linkedin.restli.server.RestLiConfig.addResourcePackageNames()

public class TestResourceSchemaCollection
{
  public TestResourceSchemaCollection()
  {
    final RestLiConfig config = new RestLiConfig();
    config.addResourcePackageNames("com.linkedin.restli.examples.groups.server.rest.impl",
                                   "com.linkedin.restli.examples.greetings.server",
                                   "com.linkedin.restli.examples.typeref.server");
    final Map<String, ResourceModel> rootResources = new RestLiApiBuilder(config).build();
    _schemas = ResourceSchemaCollection.loadOrCreateResourceSchema(rootResources);
  }
View Full Code Here

Examples of com.linkedin.restli.server.RestLiConfig.addResourcePackageNames()

                                        int asyncTimeOut,
                                        List<? extends RequestFilter> requestFilters,
                                        List<? extends ResponseFilter> responseFilters)
  {
    RestLiConfig config = new RestLiConfig();
    config.addResourcePackageNames(RESOURCE_PACKAGE_NAMES);
    config.setServerNodeUri(URI.create("http://localhost:" + port));
    config.setDocumentationRequestHandler(new DefaultDocumentationRequestHandler());
    config.addDebugRequestHandlers(new ParseqTraceDebugRequestHandler());
    config.setRequestFilters(requestFilters);
    config.setResponseFilters(responseFilters);
View Full Code Here

Examples of com.linkedin.restli.server.RestLiConfig.addResourcePackageNames()

    InjectMockResourceFactory factory =
            new InjectMockResourceFactory(new SimpleBeanProvider()
                                                  .add("counterBean", counter)
                                                  .add("mySpecialBean", new SpecialBean()));
    RestLiConfig config = new RestLiConfig();
    config.addResourcePackageNames("com.linkedin.restli.server.mock");
    RestLiServer server = new RestLiServer(config, factory);
    server.handleRequest(new MockRequest(), new RequestContext(), new Callback<RestResponse>()
    {
      @Override
      public void onError(Throwable e)
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.