Package org.osgi.service.http

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


   
    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


            return httpService;
        }

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

                        String key = (String) enm.nextElement();
                        adaptedJspServlet.getServletConfig().getServletContext().setAttribute(key, servletAttrs.get(key));
                    }
                }
            } else if (event == ServiceEvent.UNREGISTERING) {
                httpService.unregister(urlPattern);
            }

        } catch (Exception e) {
            throw new CarbonException("Error occurred while registering servlet", e);
        }
View Full Code Here

            }
            catch (NamespaceException ignore)
            {
            }

            service.unregister("/a/b");
        }
        finally
        {
            httpService.stop();
        }
View Full Code Here

            assertEquals((byte) 0xfe, reader.readByte());

            assertEquals((byte) 0xba, reader.readByte());
            assertEquals((byte) 0xbe, reader.readByte());

            service.unregister("/a/b");
        }
        finally
        {
            httpService.stop();
            server.stop();
View Full Code Here

            assertEquals((byte) 0xfe, reader.readByte());

            assertEquals((byte) 0xba, reader.readByte());
            assertEquals((byte) 0xbe, reader.readByte());

            service.unregister("/a/b");
        }
        finally
        {
            httpService.stop();
            server.stop();
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

        Object[] httpServices = httpTracker.getServices();

        for (int i = 0; httpServices != null && i < httpServices.length; i++) {
            HttpService http = (HttpService)httpServices[i];
            try {
                http.unregister(alias);
            } catch (Exception e) {
                throw new IllegalStateException(e);
            }
            bc.ungetService(sr);
        }
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

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.