Package net.jini.security

Examples of net.jini.security.BasicProxyPreparer


                verify = true;
                testCase -= 10;
            }
           
            // a - same object
            BasicProxyPreparer bpp = callConstructor(
                    testCase, verify, mc, perm);
            if (!bpp.equals(bpp)) {
                throw new TestException(
                        "equals method should return true (a)");
            }    
           
            // b - eqaul object
            bpp = callConstructor(
                    testCase, verify, mc, perm);
            BasicProxyPreparer bpp2 = callConstructor(
                    testCase, verify, mc, perm);
            if (!bpp.equals(bpp2)) {
                throw new TestException(
                        "equals method should return true (b)");
            }
           
            // c - different class
            bpp = callFakeConstructor(
                    testCase, verify, mc, perm);
            BasicProxyPreparer fbpp = callConstructor(
                    testCase, verify, mc, perm);
            if (bpp.equals(bpp2)) {
                throw new TestException(
                        "equals method should return false (c)");
            }
View Full Code Here


      throw new TestException("Could not get service's "
          + "Administrable interface");
  }

        Configuration serviceConf = getConfig().getConfiguration();
  ProxyPreparer preparer = new BasicProxyPreparer();
  if (serviceConf instanceof com.sun.jini.qa.harness.QAConfiguration) {
      preparer =
    (ProxyPreparer) serviceConf.getEntry("test",
                 "mahaloAdminPreparer",
                 ProxyPreparer.class);
  }
  admin = preparer.prepareProxy(admin);
  return admin;
   
View Full Code Here

  if (mr == null) {
      throw new TestException("Created argument cannot be null");
  }

        Configuration serviceConf = getConfig().getConfiguration();
  ProxyPreparer preparer = new BasicProxyPreparer();
  if (serviceConf instanceof com.sun.jini.qa.harness.QAConfiguration) {
      preparer =
    (ProxyPreparer) serviceConf.getEntry("test",
                 "mahaloLeasePreparer",
                 ProxyPreparer.class);
  }
  Lease proxy = (Lease) preparer.prepareProxy(mr.lease);
  return proxy;
   
View Full Code Here

                try {
                    ProxyPreparer prep = (ProxyPreparer)context.getConfiguration().getEntry(BOOT_COMPONENT,
                                                                                            "adminProxyPreparer",
                                                                                            BasicProxyPreparer.class,
                                                                                            new BasicProxyPreparer());
                    Object preparedPProxy = prep.prepareProxy(sbProxy);
                    if(preparedPProxy instanceof Administrable) {
                        Administrable admin = (Administrable)preparedPProxy;
                        Object adminObject = admin.getAdmin();
                        if(adminObject instanceof DestroyAdmin) {
View Full Code Here

                                                0,
                                                Long.MAX_VALUE));
            setLeasePreparer((ProxyPreparer)config.getEntry(COMPONENT,
                                                            "leasePreparer",
                                                            ProxyPreparer.class,
                                                            new BasicProxyPreparer()));
            if(logger.isTraceEnabled()) {
                StringBuilder buffer = new StringBuilder();
                buffer.append("LeaseFaultDetectionHandler Properties : ");
                buffer.append("lease duration=").append(leaseDuration).append(", ");
                buffer.append("retry count=").append(retryCount).append(", ");
View Full Code Here

        Map<String, Object> configParameters = sc.getConfigurationParameters();

        String[] args = (String[])configParameters.get(ServiceBeanConfig.SERVICE_PROVISION_CONFIG);
        MethodConstraints serviceListenerConstraints=
                new BasicMethodConstraints(new InvocationConstraints(new ConnectionRelativeTime(30000), null));
        ProxyPreparer defaultProxyPreparer =  new BasicProxyPreparer(false, serviceListenerConstraints, null);

        if(args==null) {
            proxyPreparer = defaultProxyPreparer;
        } else {
            /* Service specific provisioning config */
 
View Full Code Here

            throw new IllegalStateException("no opStringMangerController");

        peerProxyPreparer = (ProxyPreparer)config.getEntry(CONFIG_COMPONENT,
                                                           "peerProxyPreparer",
                                                           ProxyPreparer.class,
                                                           new BasicProxyPreparer());
        /* Create the PeerInfo object */
        java.util.Random rand = new java.util.Random(System.currentTimeMillis());
        long randomNumber = rand.nextLong();
        myPeerInfo = new ProvisionMonitor.PeerInfo(getServiceProxy(),
                                                   randomNumber,
View Full Code Here

                                                   aDesc.getLocators());
                dm.addDiscoveryListener(this);
                proxyPreparer = (ProxyPreparer)config.getEntry(CONFIG_COMPONENT,
                                                               "proxyPreparer",
                                                               ProxyPreparer.class,
                                                               new BasicProxyPreparer());
                logger.debug("Association [{}] ProxyPreparer: {}",
                             aDesc.getName(), proxyPreparer.getClass().getName());
            } catch(Exception e) {
                logger.error("Creating LookupServiceHandler", e);
            }
View Full Code Here

                } else if(!lookupService) {
                    try {
                        proxyPreparer = (ProxyPreparer)getConfiguration().getEntry(CONFIG_COMPONENT,
                                                                                   "proxyPreparer",
                                                                                   ProxyPreparer.class,
                                                                                   new BasicProxyPreparer());
                    } catch (ConfigurationException e) {
                        logger.warn("Could not create ProxyPreparer from configuration, using default", e);
                        proxyPreparer = new BasicProxyPreparer();
                    }
                    logger.trace("Association [{}]  ProxyPreparer : {}",
                                 associationDescriptor.getName(), proxyPreparer.getClass().getName());
                    template = JiniClient.getServiceTemplate(associationDescriptor, callerCL);
                    logger.trace("Created ServiceTemplate {}", template.toString());
View Full Code Here

       
        /* Get the ProxyPreparer for discovered ProvisionMonitor instances */
        provisionerPreparer = (ProxyPreparer)config.getEntry(CONFIG_COMPONENT,
                                                             "provisionerPreparer",
                                                             ProxyPreparer.class,
                                                             new BasicProxyPreparer());
        logger.trace("ProxyPreparer={}", provisionerPreparer);
        this.serviceLimit = serviceLimit;
        computeResourceObserver = new ComputeResourceObserver(adapter.getComputeResource());
    }
View Full Code Here

TOP

Related Classes of net.jini.security.BasicProxyPreparer

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.