Code example for Hashtable

Methods: put

0
 
        Dictionary servletParam = new Hashtable(2);
        servletParam.put("org.apache.abdera.protocol.server.Provider", "org.wso2.carbon.registry.app.RegistryProvider");
        Dictionary servletAttributes = new Hashtable(2);
        servletAttributes.put("registry", registryService);
        Dictionary params = new Hashtable(2);
        params.put("servlet-params", servletParam);
        params.put("url-pattern", "/registry/resources");
        params.put("servlet-attributes", servletAttributes);
 
        ResourceServlet resourceServlet = new ResourceServlet();
        // The HTTP Service must be available for this operation 
        serviceRegistration = bundleContext.registerService(Servlet.class.getName(), resourceServlet, params);
    } 
 
    protected void setRegistryService(RegistryService registryService) {
        this.registryService = registryService;
        CommonUtil.setRegistryService(registryService);
    } 
 
    protected void unsetRegistryService(RegistryService registryService) {