Package org.restlet.ext.osgi

Examples of org.restlet.ext.osgi.RouterProvider


  @Test
  public void testFinder()
  {
    ApplicationProvider applicationProvider = new TestApplicationProvider();
    RouterProvider routerProvider = new RouterProvider();
    ResourceProvider resourceProvider = new TestResourceProvider();
    applicationProvider.bindRouterProvider(routerProvider);
    routerProvider.bindResourceProvider(resourceProvider);

    testHarness.addApplication(applicationProvider);

    TestLogListener logListener = new TestLogListener();
    testHarness.getLogReaderService().addLogListener(logListener);
View Full Code Here


  @Test
  public void testHttpServiceApplication()
  {
    ApplicationProvider applicationProvider = new TestApplicationProvider();
    RouterProvider routerProvider = new RouterProvider();
    ResourceProvider resourceProvider = new TestResourceProvider();
    applicationProvider.bindRouterProvider(routerProvider);
    routerProvider.bindResourceProvider(resourceProvider);

    restletServletService.bindHttpService(httpService);
    restletServletService.bindApplicationProvider(applicationProvider);

    ClientResource client = createResource("/junit/");
View Full Code Here

  @Test
  public void testApplicationHttpService()
  {
    ApplicationProvider applicationProvider = new TestApplicationProvider();
    RouterProvider routerProvider = new RouterProvider();
    ResourceProvider resourceProvider = new TestResourceProvider();
    applicationProvider.bindRouterProvider(routerProvider);
    routerProvider.bindResourceProvider(resourceProvider);

    restletServletService.bindApplicationProvider(applicationProvider);
    restletServletService.bindHttpService(httpService);

    ClientResource client = createResource("/junit/");
View Full Code Here

  @Test(expected = ResourceException.class)
  public void testUnbindApplication()
  {
    ApplicationProvider applicationProvider = new TestApplicationProvider();
    RouterProvider routerProvider = new RouterProvider();
    ResourceProvider resourceProvider = new TestResourceProvider();
    applicationProvider.bindRouterProvider(routerProvider);
    routerProvider.bindResourceProvider(resourceProvider);

    restletServletService.bindHttpService(httpService);
    restletServletService.bindApplicationProvider(applicationProvider);

    restletServletService.unbindApplicationProvider(applicationProvider);
View Full Code Here

  @Test(expected = ResourceException.class)
  public void testUnbindHttpService()
  {
    ApplicationProvider applicationProvider = new TestApplicationProvider();
    RouterProvider routerProvider = new RouterProvider();
    ResourceProvider resourceProvider = new TestResourceProvider();
    applicationProvider.bindRouterProvider(routerProvider);
    routerProvider.bindResourceProvider(resourceProvider);

    restletServletService.bindHttpService(httpService);
    restletServletService.bindApplicationProvider(applicationProvider);

    restletServletService.unbindHttpService(httpService);
View Full Code Here

  @Test
  public void testUnbindRebindHttpService()
  {
    ApplicationProvider applicationProvider = new TestApplicationProvider();
    RouterProvider routerProvider = new RouterProvider();
    ResourceProvider resourceProvider = new TestResourceProvider();
    applicationProvider.bindRouterProvider(routerProvider);
    routerProvider.bindResourceProvider(resourceProvider);

    restletServletService.bindHttpService(httpService);
    restletServletService.bindApplicationProvider(applicationProvider);

    restletServletService.unbindHttpService(httpService);
View Full Code Here

  {
    TestLogListener logListener = new TestLogListener();
    logReaderService.addLogListener(logListener);

    ApplicationProvider applicationProvider = new TestApplicationProvider();
    RouterProvider routerProvider = new RouterProvider();
    ResourceProvider resourceProvider = new TestResourceProvider();
    applicationProvider.bindRouterProvider(routerProvider);
    routerProvider.bindResourceProvider(resourceProvider);

    restletServletService.bindLogService(logService);
    restletServletService.bindHttpService(httpService);
    restletServletService.bindApplicationProvider(applicationProvider);
    restletServletService.bindApplicationProvider(applicationProvider);
View Full Code Here

  @Test
  public void testResourceWithMultiplePaths()
  {
    ApplicationProvider applicationProvider = new TestApplicationProvider();
    RouterProvider routerProvider = new RouterProvider();
    ResourceProvider resourceProvider = new TestResourceMultiPathProvider();
    applicationProvider.bindRouterProvider(routerProvider);
    routerProvider.bindResourceProvider(resourceProvider);

    restletServletService.bindHttpService(httpService);
    restletServletService.bindApplicationProvider(applicationProvider);

    ClientResource client = createResource("/junit/");
View Full Code Here

  @Test
  public void testResourceWithMatchingModeStartsWith()
  {
    ApplicationProvider applicationProvider = new TestApplicationProvider();
    RouterProvider routerProvider = new RouterProvider();
    ResourceProvider resourceProvider = new TestResourceMatchingModeProvider();
    applicationProvider.bindRouterProvider(routerProvider);
    routerProvider.bindResourceProvider(resourceProvider);

    restletServletService.bindHttpService(httpService);
    restletServletService.bindApplicationProvider(applicationProvider);

    ClientResource client = createResource("/junit/foo");
View Full Code Here

  @Test
  public void testPassingFilterRouter()
  {
    ApplicationProvider applicationProvider = new TestApplicationProvider();
    RouterProvider routerProvider = new RouterProvider();
    ResourceProvider resourceProvider = new TestResourceProvider();
    FilterProvider filterProvider = new TestFilterProvider(Filter.CONTINUE);

    routerProvider.bindResourceProvider(resourceProvider);
    routerProvider.bindFilterProvider(filterProvider);
    applicationProvider.bindRouterProvider(routerProvider);

    restletServletService.bindHttpService(httpService);
    restletServletService.bindApplicationProvider(applicationProvider);
View Full Code Here

TOP

Related Classes of org.restlet.ext.osgi.RouterProvider

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.