Package org.osgi.service.http

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


            // Register the test resource and make a call
            httpService.registerResources("/resource", "/res", null);
            Assert.assertEquals("Hello from Resource", performCall(reqspec));

            // Unregister the servlet alias
            httpService.unregister("/resource");

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


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

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

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

            // Register the test resource and make a call
            httpService.registerResources("/resource", "/res", secureContext);
            Assert.assertEquals("Hello from Resource", performCall(reqspec, headers));

            // Unregister the servlet alias
            httpService.unregister("/resource");

            // Verify that the alias is not available any more
            assertNotAvailable(reqspec, headers);
        } finally {
            context.ungetService(sref);
View Full Code Here

     
    }

    public void removedService(ServiceReference reference, Object service) {
      HttpService httpService = (HttpService) context.getService(reference);
      httpService.unregister("/js");
    }
     
    }
}
View Full Code Here

        m_servlets.remove(ref);
        for (ServiceReference reference : m_httpServices) {
            HttpService httpService = (HttpService) m_context.getService(reference);
            if ((httpService != null) && (endpoint != null)) {
                try {
                    httpService.unregister(endpoint);
                }
                catch (Exception e) {
                    m_log.log(LogService.LOG_WARNING, "Servlet cannot be unregistered, maybe not registered under this endpoint", e);
                }
            }
View Full Code Here

        m_servlets.remove(ref);
        for (ServiceReference reference : m_httpServices) {
            HttpService httpService = (HttpService) m_context.getService(reference);
            if ((httpService != null) && (endpoint != null)) {
                try {
                    httpService.unregister(endpoint);
                }
                catch (Exception e) {
                    m_log.log(LogService.LOG_WARNING, "Servlet cannot be unregistered, maybe not registered under this endpoint", e);
                }
            }
View Full Code Here

        return httpService;
    }

    public void removedService(ServiceReference reference, Object service) {
        final HttpService httpService = (HttpService) service;
        httpService.unregister("/jsp-examples"); //$NON-NLS-1$
        httpService.unregister("/jsp-examples/*.jsp"); //$NON-NLS-1$
        super.removedService(reference, service);
    }
}
View Full Code Here

    }

    public void removedService(ServiceReference reference, Object service) {
        final HttpService httpService = (HttpService) service;
        httpService.unregister("/jsp-examples"); //$NON-NLS-1$
        httpService.unregister("/jsp-examples/*.jsp"); //$NON-NLS-1$
        super.removedService(reference, service);
    }
}
View Full Code Here

      return httpService;
    }
   
    public void removedService(ServiceReference reference, Object service) {
      final HttpService httpService = (HttpService) service;
      httpService.unregister("/struts-examples"); //$NON-NLS-1$
      httpService.unregister("/struts-examples/*.jsp"); //$NON-NLS-1$
      httpService.unregister("/struts-examples/*.do"); //$NON-NLS-1$     
      super.removedService(reference, service);
    }
  }
View Full Code Here

    }
   
    public void removedService(ServiceReference reference, Object service) {
      final HttpService httpService = (HttpService) service;
      httpService.unregister("/struts-examples"); //$NON-NLS-1$
      httpService.unregister("/struts-examples/*.jsp"); //$NON-NLS-1$
      httpService.unregister("/struts-examples/*.do"); //$NON-NLS-1$     
      super.removedService(reference, service);
    }
  }
}
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.