Package org.osgi.service.http

Examples of org.osgi.service.http.HttpService.unregister()


      }
     
      HttpService http = (HttpService)Activator.bc.getService(httpSR);
     
      if(http != null) {
        http.unregister(AXIS2_SERVLET_ALIAS);
        http.unregister(AXIS2ADMIN_SERVLET_ALIAS);
        bc.ungetService(httpSR);
      }
      servletRegistrations.remove(httpSR);
    }
View Full Code Here


     
      HttpService http = (HttpService)Activator.bc.getService(httpSR);
     
      if(http != null) {
        http.unregister(AXIS2_SERVLET_ALIAS);
        http.unregister(AXIS2ADMIN_SERVLET_ALIAS);
        bc.ungetService(httpSR);
      }
      servletRegistrations.remove(httpSR);
    }
  }
View Full Code Here

                }

                public void removedService(ServiceReference serviceReference, Object o) {
                    HttpService service = (HttpService)_context.getService(serviceReference);
                    if (service != null) {
                        service.unregister(_path);
                    }
                }
            }
        );
        _tracker.open();
View Full Code Here

    {
        HttpService httpService = getHTTPService( registry.getBundleContext() );

        httpService.registerServlet( "/alias", new BasicTestingServlet(), null, null );

        httpService.unregister( "/alias" );

        httpService.registerServlet( "/alias", new BasicTestingServlet(), null, null );
    }

View Full Code Here

        printBytes( content.getBytes() );
        printBytes( response.getBytes() );
        assertTrue( content.equals( response ) );

        httpService.unregister( "/test" );

        content = "test content";
        testServlet = new BasicTestingServlet( content, true );
        httpService.registerServlet( "/test", testServlet, null, null );
View Full Code Here

        for (int i = 0; i < content.length; ++i)
        {
            assertTrue( content[i] == response[i] );
        }

        httpService.unregister( "/test" );      
    }


    private byte[] generateRandomBinaryContent()
    {
View Full Code Here

        String servletAlias = getRuntimeAwareAlias("/servlet");
        httpService.registerServlet(servletAlias, new HttpServiceServlet(module), null, null);
        Assert.assertEquals("http-service:1.0.0", performCall(reqspec));

        // Unregister the servlet alias
        httpService.unregister(servletAlias);
        assertNotAvailable(reqspec);

        // Verify that the alias is not available any more
        assertNotAvailable(reqspec);
    }
View Full Code Here

            String servletAlias = getRuntimeAwareAlias("/servlet");
            httpService.registerServlet(servletAlias, new HttpServiceServlet(module), null, null);
            Assert.assertEquals("http-service:1.0.0", performCall(reqspec));

            // Unregister the servlet alias
            httpService.unregister(servletAlias);
            assertNotAvailable(reqspec);

            // Verify that the alias is not available any more
            assertNotAvailable(reqspec);
        } finally {
View Full Code Here

            }

            @Override
            public void removedService(ServiceReference<HttpService> reference, HttpService service) {
                RuntimeLogger.LOGGER.info("Unregister system HttpService with alias: " + SYSTEM_ALIAS);
                service.unregister(SYSTEM_ALIAS);
                super.removedService(reference, service);
            }
        };
        tracker.open();
    }
View Full Code Here

            // Register the test servlet and make a call
            httpService.registerServlet("/service", new HttpServiceServlet(module), null, null);
            Assert.assertEquals("Hello: Kermit", performCall(reqspec));

            // Unregister the servlet alias
            httpService.unregister("/service");
            assertNotAvailable(reqspec);

            // Verify that the alias is not available any more
            assertNotAvailable(reqspec);
        } finally {
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.