Package org.glassfish.hk2.utilities

Examples of org.glassfish.hk2.utilities.DescriptorImpl


        }
        return sb.toString();
    }

    public static Map<String, String> getCurrentValues(String basePath) {
        ServiceLocator serviceLocator = Globals.getDefaultBaseServiceLocator();
        return getCurrentValues(basePath, serviceLocator);
    }
View Full Code Here


        return javaGlobalPrefix.toString();
    }

    protected EJBContextImpl createEjbInstanceAndContext() throws Exception {

        ServiceLocator services = ejbContainerUtilImpl.getServices();

        JCDIService jcdiService = services.getService(JCDIService.class);

        EjbBundleDescriptorImpl ejbBundle = ejbDescriptor.getEjbBundleDescriptor();

  Object instance = null;
  JCDIService.JCDIInjectionContext jcdiCtx = null;
View Full Code Here

  return ejbClass.newInstance();
    }

    protected void injectEjbInstance(EJBContextImpl context) throws Exception {
       
        ServiceLocator services = ejbContainerUtilImpl.getServices();

        JCDIService jcdiService = services.getService(JCDIService.class);

        EjbBundleDescriptorImpl ejbBundle = ejbDescriptor.getEjbBundleDescriptor();

        Object[] interceptorInstances = null;
View Full Code Here

    public static final Logger logger = Logger.getAnonymousLogger();
   
    private final Subject adminSubject = prepareAdminSubject();
   
    private Subject prepareAdminSubject() {
        final ServiceLocator locator = getBaseServiceLocator();
        if (locator != null) {
            final List<ServiceHandle<? extends Object>> adminIdentities =
/*               
                    (List<ServiceHandle<? extends Object>>) getBaseServiceLocator().getAllServices(
                    new Filter() {
View Full Code Here

     * Returns a configured Habitat with the configuration.
     *
     * @return a configured Habitat
     */
    public ServiceLocator getHabitat() {
        ServiceLocator habitat = Utils.instance.getHabitat(this);
       
        assertNotNull("Transactions service from Configuration subsystem is null", habitat.getService(Transactions.class));
        return habitat;
    }
View Full Code Here

    /**
     * Given a command name, return the name of the class that implements
     * that command in the server.
     */
    private static String getCommandClass(String cmdName) {
        ServiceLocator h = getManHabitat();
        String cname = "org.glassfish.api.admin.AdminCommand";
        ActiveDescriptor<?> ad = h.getBestDescriptor(
                BuilderHelper.createNameAndContractFilter(cname, cmdName));
        if (ad == null) return null;
        return ad.getImplementation();
    }
View Full Code Here

        for (Type cType : contracts) {
            contractsAsSet.add(cType);
        }
       
        Boolean proxy = null;
        UseProxy up = constant.getClass().getAnnotation(UseProxy.class);
        if (up != null) {
            if (up.value()) {
                proxy = Boolean.TRUE;
            }
            else {
                proxy = Boolean.FALSE;
            }
View Full Code Here

        if (Factory.class.isAssignableFrom(clazz)) {
            type = DescriptorType.PROVIDE_METHOD;
        }
       
        Boolean proxy = null;
        UseProxy up = clazz.getAnnotation(UseProxy.class);
        if (up != null) {
            proxy = new Boolean(up.value());
        }
       
        Boolean proxyForSameScope = null;
        ProxyForSameScope pfss = clazz.getAnnotation(ProxyForSameScope.class);
        if (pfss != null) {
View Full Code Here

                proxyForSameScope = Boolean.FALSE;
            }
        }
       
        DescriptorVisibility visibility = DescriptorVisibility.NORMAL;
        Visibility vi = constant.getClass().getAnnotation(Visibility.class);
        if (vi != null) {
            visibility = vi.value();
        }
       
        String classAnalysisName = null;
        Service service = constant.getClass().getAnnotation(Service.class);
        if (service != null) {
View Full Code Here

        if (pfss != null) {
            proxyForSameScope = new Boolean(pfss.value());
        }
       
        DescriptorVisibility visibility = DescriptorVisibility.NORMAL;
        Visibility vi = clazz.getAnnotation(Visibility.class);
        if (vi != null) {
            visibility = vi.value();
        }
       
        // TODO:  Can we get metadata from @Service?
        return new DescriptorImpl(
                contracts,
View Full Code Here

TOP

Related Classes of org.glassfish.hk2.utilities.DescriptorImpl

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.