Package net.jini.security

Examples of net.jini.security.ProxyPreparer


      throw new TestException(
    "MailboxPullRegistration 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",
                 "mercuryLeasePreparer",
                 ProxyPreparer.class);
        }
  logger.log(Level.INFO, "\tmailbox lease preparer: " + preparer);
  Lease proxy =
      (Lease) preparer.prepareProxy(mr.getLease());
  logger.log(Level.INFO, "\tPrepared mailbox lease proxy: " + proxy);
 
  return proxy;
   
View Full Code Here


       throw new TestException ("Got null ref for MailboxRegistration object");
  logger.log(Level.INFO,
       "Got reference to MailboxRegistration object: " + mr);
 
        Configuration serviceConf = getConfig().getConfiguration();
        ProxyPreparer preparer = new BasicProxyPreparer();
        if (serviceConf instanceof com.sun.jini.qa.harness.QAConfiguration) {
            preparer =
    (ProxyPreparer) serviceConf.getEntry("test",
                 "mercuryRegistrationPreparer",
                 ProxyPreparer.class);
        }
  logger.log(Level.INFO, "\tregistration proxy preparer: " + preparer);
  mr = (MailboxRegistration)preparer.prepareProxy(mr);
  logger.log(Level.INFO, "\tPrepared registration proxy: " + mr);
 
  return mr;
    }
View Full Code Here

       throw new TestException ("Got null ref for MailboxPullRegistration object");
  logger.log(Level.INFO,
       "Got reference to MailboxPullRegistration object: " + mr);
 
        Configuration serviceConf = getConfig().getConfiguration();
        ProxyPreparer preparer = new BasicProxyPreparer();
        if (serviceConf instanceof com.sun.jini.qa.harness.QAConfiguration) {
            preparer =
    (ProxyPreparer) serviceConf.getEntry("test",
                 "mercuryRegistrationPreparer",
                 ProxyPreparer.class);
        }
  logger.log(Level.INFO, "\tregistration proxy preparer: " + preparer);
  mr = (MailboxPullRegistration)preparer.prepareProxy(mr);
  logger.log(Level.INFO, "\tPrepared registration proxy: " + mr);
 
  return mr;
    }
View Full Code Here

            Exporter defaultExporter = new BasicJeriExporter(endpoint,
                                                             ilFactory,
                                                             false,
                                                             true);
            if(activationID != null) {
                ProxyPreparer aidPreparer =
                  (ProxyPreparer)Config.getNonNullEntry
                                                   (config,
                                                    COMPONENT_NAME,
                                                    "activationIdPreparer",
                                                    ProxyPreparer.class,
                                                    new BasicProxyPreparer());
                ProxyPreparer aSysPreparer =
                  (ProxyPreparer)Config.getNonNullEntry
                                                   (config,
                                                    COMPONENT_NAME,
                                                    "activationSystemPreparer",
                                                    ProxyPreparer.class,
                                                    new BasicProxyPreparer());
                activationID = (ActivationID)aidPreparer.prepareProxy
                                                               (activationID);
                activationSystem = (ActivationSystem)aSysPreparer.prepareProxy
                                                            (activationSystem);
                defaultExporter = new ActivationExporter(activationID,
                                                         defaultExporter);
            }//endif(activationID != null)
            try {
View Full Code Here

     *                  ignored when this lease is cancled.
     */
    public void addOutriggerLease(Lease lease, boolean unknownOk)
  throws TestException
    {
  ProxyPreparer p = null;
  Configuration c = getConfig().getConfiguration();
  if (c instanceof com.sun.jini.qa.harness.QAConfiguration) {
      try {
    p = (ProxyPreparer) c.getEntry("test",
                 "outriggerLeasePreparer",
                 ProxyPreparer.class);
    lease = (Lease) p.prepareProxy(lease);
      } catch (ConfigurationException e) {
    throw new TestException("Configuration error", e);
      } catch (RemoteException e) {
    throw new TestException("RemoteException preparing lease",e);
      }
View Full Code Here

     *                  ignored when this lease is cancled.
     */
    public void addMahaloLease(Lease lease, boolean unknownOk)
  throws TestException
    {
  ProxyPreparer p = null;
  Configuration c = getConfig().getConfiguration();
  if (c instanceof com.sun.jini.qa.harness.QAConfiguration) {
      try {
    p = (ProxyPreparer) c.getEntry("test",
                 "mahaloLeasePreparer",
                 ProxyPreparer.class);
    lease = (Lease) p.prepareProxy(lease);
      } catch (ConfigurationException e) {
    throw new TestException("Configuration error", e);
      } catch (RemoteException e) {
    throw new TestException("RemoteException preparing lease",e);
      }
View Full Code Here

        Boolean.FALSE)).booleanValue();
     
      return (java.rmi.activation.ActivationGroup) doAction(
    new PrivilegedExceptionAction() {
        public Object run() throws Exception {
      ProxyPreparer sysPreparer =
          getPreparer(config, "systemPreparer");
      monPreparer = getPreparer(config,
              "monitorPreparer");
      TcpServerEndpoint se =
          TcpServerEndpoint.getInstance(0);
      Exporter defaultExporter =
          new BasicJeriExporter(se, new AccessILFactory());
      exporter = (Exporter) config.getEntry(
        PHOENIX, "instantiatorExporter",
        Exporter.class, defaultExporter);
      if (exporter == null) {
          exporter = new AlreadyExportedExporter();
      }
      refuseCalls =
          !(exporter instanceof AlreadyExportedExporter);
      unexportTimeout = getInt(config, "unexportTimeout",
             60000);
      unexportWait = getInt(config, "unexportWait", 10);
      ActivationSystem sys = (ActivationSystem)
          sysPreparer.prepareProxy(id.getSystem());
      ActivationGroupImpl.incarnation = incarnation;
      groupID = id;
      state = CREATING;
      ActivationGroupID gid = (sys == id.getSystem() ?
             id : new WrappedGID(id, sys));
View Full Code Here

  }
//TODO - defer "big" default object to catch block around getNonNullEntry()
   
        // Get activation specific configuration items, if activated
  if (activationID != null) {
            ProxyPreparer activationSystemPreparer =
                (ProxyPreparer) Config.getNonNullEntry(config,
              MERCURY, "activationSystemPreparer",
        ProxyPreparer.class, new BasicProxyPreparer());
            if (initLogger.isLoggable(Level.CONFIG)) {
                initLogger.log(Level.CONFIG, "activationSystemPreparer: {0}",
          activationSystemPreparer);
      }   
            activationSystem =
                (ActivationSystem) activationSystemPreparer.prepareProxy(
                    ActivationGroup.getSystem());
            if (initLogger.isLoggable(Level.FINEST)) {
                initLogger.log(Level.FINEST, "Prepared activation system is: {0}",
          activationSystem);
      }   
            ProxyPreparer activationIdPreparer =
          (ProxyPreparerConfig.getNonNullEntry(config,
              MERCURY, "activationIdPreparer",
        ProxyPreparer.class, new BasicProxyPreparer());
            if (initLogger.isLoggable(Level.CONFIG)) {
                initLogger.log(Level.CONFIG, "activationIdPreparer: {0}",
          activationIdPreparer);
      }   
            activationID = (ActivationID) activationIdPreparer.prepareProxy(
                activationID);
            if (initLogger.isLoggable(Level.FINEST)) {
                initLogger.log(Level.FINEST, "Prepared activationID is: {0}",
          activationID);
      }   
            activationPrepared = true;
 
            exporter = (Exporter)Config.getNonNullEntry(config,
          MERCURY, "serverExporter", Exporter.class,
    new ActivationExporter(
        activationID,
        new BasicJeriExporter(
            TcpServerEndpoint.getInstance(0),
      new BasicILFactory(), false, true)),
    activationID);
            if (initLogger.isLoggable(Level.CONFIG)) {
                initLogger.log(Level.CONFIG, "Activatable service exporter is: {0}",
          exporter);
      }   
  } else { //Get non-activatable configuration items
            exporter = (Exporter) Config.getNonNullEntry(config,
                MERCURY, "serverExporter", Exporter.class,
    new BasicJeriExporter(
        TcpServerEndpoint.getInstance(0),
        new BasicILFactory(), false, true));
            if (initLogger.isLoggable(Level.CONFIG)) {
                initLogger.log(Level.CONFIG,
    "Non-activatable service exporter is: {0}", exporter);   
      }
  }

        listenerPreparer = (ProxyPreparer) Config.getNonNullEntry(
      config, MERCURY, "listenerPreparer", ProxyPreparer.class,
            new BasicProxyPreparer());
        if (initLogger.isLoggable(Level.CONFIG)) {
            initLogger.log(Level.CONFIG, "Listener preparer is: {0}",
      listenerPreparer)
  }
 
        /* Get the proxy preparers for the lookup locators to join */
        locatorToJoinPreparer = (ProxyPreparer)Config.getNonNullEntry
             (config, MERCURY, "locatorToJoinPreparer",
              ProxyPreparer.class, new BasicProxyPreparer());
        if (initLogger.isLoggable(Level.CONFIG)) {
            initLogger.log(Level.CONFIG, "Locator preparer is: {0}",
      locatorToJoinPreparer);
 
 
        // Create lease policy -- used by recovery logic, below
        leasePolicy = (LeasePeriodPolicy) Config.getNonNullEntry(config,
      MERCURY, "leasePeriodPolicy", LeasePeriodPolicy.class,
            new FixedLeasePeriodPolicy(3 * HOURS, 1 * HOURS));
        if (initLogger.isLoggable(Level.CONFIG)) {
            initLogger.log(Level.CONFIG, "LeasePeriodPolicy is: {0}",
      leasePolicy);
 
     
  // Note: referenced by recovery logic in rebuildTransientState() 
        ProxyPreparer recoveredListenerPreparer = null;
        if (persistent) {
      persistenceDirectory =
          (String)Config.getNonNullEntry(
                    config, MERCURY, "persistenceDirectory", String.class);
            if (initLogger.isLoggable(Level.CONFIG)) {
View Full Code Here

  int port = getInt(config, "registryPort",
        ActivationSystem.SYSTEM_PORT);
  Registry reg = LocateRegistry.getRegistry(host, port);
  ActivationSystem sys =
      (ActivationSystem) reg.lookup(ActivationSystem.class.getName());
  ProxyPreparer sysPreparer = getPreparer(config, "systemPreparer");
  sys = (ActivationSystem) sysPreparer.prepareProxy(sys);
  sys.shutdown();
    }
View Full Code Here

              listener,
              mHandback,
              leaseDuration)
      logger.log(Level.FINEST, "Preparing fiddler registration");
      Configuration c = config.getConfiguration();
      ProxyPreparer p = new BasicProxyPreparer();
      if (c instanceof com.sun.jini.qa.harness.QAConfiguration) {
      p = (ProxyPreparer) c.getEntry("test",
                 "fiddlerRegistrationPreparer",
                 ProxyPreparer.class);
      }
      registrationMap.put(p.prepareProxy(ldsReg),listener);
  } catch (ConfigurationException e) {
      throw new RemoteException("Configuration Error", e);
  }
    }//end doRegistration
View Full Code Here

TOP

Related Classes of net.jini.security.ProxyPreparer

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.