Package net.jini.security

Examples of net.jini.security.BasicProxyPreparer


        // Get activatable settings, if activated
        if (activationID != null) {
            ProxyPreparer activationSystemPreparer =
                (ProxyPreparer) Config.getNonNullEntry(config,
                    TxnManager.MAHALO, "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.CONFIG)) {
    initLogger.log(Level.CONFIG, "Prepared activation system is: {0}",
                    activationSystem);
            }
            ProxyPreparer activationIdPreparer =
                (ProxyPreparer) Config.getNonNullEntry(config,
                    TxnManager.MAHALO, "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.CONFIG)) {
    initLogger.log(Level.CONFIG, "Prepared activationID is: {0}",
                    activationID);
            }
      activationPrepared = true;
            exporter = (Exporter)Config.getNonNullEntry(config,
          TxnManager.MAHALO, "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 {
            exporter = (Exporter) Config.getNonNullEntry(config,
                TxnManager.MAHALO, "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);
            }
  }
 
  ProxyPreparer recoveredParticipantPreparer =
      (ProxyPreparer)Config.getNonNullEntry(config,
                TxnManager.MAHALO, "recoveredParticipantPreparer",
    ProxyPreparer.class, new BasicProxyPreparer());
        if(initLogger.isLoggable(Level.CONFIG)) {
      initLogger.log(Level.CONFIG, "Recovered participant preparer is: {0}",
                recoveredParticipantPreparer);
        }
  participantPreparer = (ProxyPreparer)Config.getNonNullEntry(config,
            TxnManager.MAHALO, "participantPreparer", ProxyPreparer.class,
            new BasicProxyPreparer());
        if(initLogger.isLoggable(Level.CONFIG)) {
      initLogger.log(Level.CONFIG, "Participant preparer is: {0}",
                participantPreparer);
        }
  // Create lease policy -- used by recovery logic, below??
View Full Code Here


        /* Lookup service proxy preparer */
        registrarPreparer = (ProxyPreparer)config.getEntry
                                                   (COMPONENT_NAME,
                                                    "registrarPreparer",
                                                    ProxyPreparer.class,
                                                    new BasicProxyPreparer());
        /* Task manager */
        try {
            discoveryTaskMgr = (TaskManager)config.getEntry(COMPONENT_NAME,
                                                            "taskManager",
                                                            TaskManager.class);
View Full Code Here

        // 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)) {
                initLogger.log(Level.CONFIG, "Persistence directory is: {0}",
          persistenceDirectory);
     
      // Note: referenced by recovery logic in rebuildTransientState() 
            recoveredListenerPreparer =
          (ProxyPreparer) Config.getNonNullEntry(
          config, MERCURY, "recoveredListenerPreparer", ProxyPreparer.class,
                new BasicProxyPreparer());
            if (initLogger.isLoggable(Level.CONFIG)) {
                initLogger.log(Level.CONFIG, "Recovered listener preparer is: {0}",
          recoveredListenerPreparer)
      }
      // Note: referenced by recovery logic, below 
            recoveredLocatorToJoinPreparer = (ProxyPreparer)Config.getNonNullEntry
                 (config, MERCURY, "recoveredLocatorToJoinPreparer",
                  ProxyPreparer.class, new BasicProxyPreparer());
            if (initLogger.isLoggable(Level.CONFIG)) {
                initLogger.log(Level.CONFIG, "Recovered locator preparer is: {0}",
          recoveredLocatorToJoinPreparer);
     

View Full Code Here

  }

  public Object run() {
      try {
    if (methodConstraintsSpecified) {
        return new BasicProxyPreparer(
      verify, methodConstraints, permissions);
    } else {
        return new BasicProxyPreparer(verify, permissions);
    }
      } catch (Exception e) {
    return e;
      }
  }
View Full Code Here

  public static void main(String[] args) {
      test(localtests);
  }

  static Object bpp(Verify verify, Permission[] permissions) {
      return new BasicProxyPreparer(verify.value, permissions);
  }
View Full Code Here

  }
  static Object bpp(Verify verify,
        MethodConstraints methodConstraints,
        Permission[] permissions)
  {
      return new BasicProxyPreparer(
    verify.value, methodConstraints, permissions);
  }
View Full Code Here

           
        ProxyPreparer globalServicePreparer =
            (ProxyPreparer) Config.getNonNullEntry(config,
          ServiceStarter.START_PACKAGE,
    "servicePreparer", ProxyPreparer.class,
                new BasicProxyPreparer());
       
        // Needs to be called prior to setting the "descCreated" flag
        if (getServicePreparer() == null) {
            setServicePreparer(globalServicePreparer);
       
       
        synchronized (descCreatedLock) {
      descCreated = true;
  }
   
  // Get prepared activation system reference
  Created created = null;
  ActivationSystem sys =
      ServiceStarter.getActivationSystem(
          getActivationSystemHost(),
    getActivationSystemPort(),
    config);
        ProxyPreparer activationIDPreparer =
            (ProxyPreparer) Config.getNonNullEntry(config,
          ServiceStarter.START_PACKAGE, "activationIdPreparer",
    ProxyPreparer.class, new BasicProxyPreparer());

        if (innerProxyPreparer == null) {
            innerProxyPreparer = globalServicePreparer;
        }
       
View Full Code Here

        // Get activatable settings, if activated
        if (activationID != null) {
            ProxyPreparer activationSystemPreparer =
                (ProxyPreparer) Config.getNonNullEntry(config,
                    TxnManager.MAHALO, "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.CONFIG)) {
    initLogger.log(Level.CONFIG, "Prepared activation system is: {0}",
                    activationSystem);
            }
            ProxyPreparer activationIdPreparer =
                (ProxyPreparer) Config.getNonNullEntry(config,
                    TxnManager.MAHALO, "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.CONFIG)) {
    initLogger.log(Level.CONFIG, "Prepared activationID is: {0}",
                    activationID);
            }
      activationPrepared = true;
            exporter = (Exporter)Config.getNonNullEntry(config,
          TxnManager.MAHALO, "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 {
            exporter = (Exporter) Config.getNonNullEntry(config,
                TxnManager.MAHALO, "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);
            }
  }
 
  ProxyPreparer recoveredParticipantPreparer =
      (ProxyPreparer)Config.getNonNullEntry(config,
                TxnManager.MAHALO, "recoveredParticipantPreparer",
    ProxyPreparer.class, new BasicProxyPreparer());
        if(initLogger.isLoggable(Level.CONFIG)) {
      initLogger.log(Level.CONFIG, "Recovered participant preparer is: {0}",
                recoveredParticipantPreparer);
        }
  participantPreparer = (ProxyPreparer)Config.getNonNullEntry(config,
            TxnManager.MAHALO, "participantPreparer", ProxyPreparer.class,
            new BasicProxyPreparer());
        if(initLogger.isLoggable(Level.CONFIG)) {
      initLogger.log(Level.CONFIG, "Participant preparer is: {0}",
                participantPreparer);
        }
  // Create lease policy -- used by recovery logic, below??
View Full Code Here

         BROWSER, "folderView",
         boolean.class, Boolean.TRUE)).booleanValue();
  leasePreparer = (ProxyPreparer)
      Config.getNonNullEntry(config, BROWSER, "leasePreparer",
           ProxyPreparer.class,
           new BasicProxyPreparer());
  servicePreparer = (ProxyPreparer)
      Config.getNonNullEntry(config, BROWSER, "servicePreparer",
           ProxyPreparer.class,
           new BasicProxyPreparer());
  adminPreparer = (ProxyPreparer)
      Config.getNonNullEntry(config, BROWSER, "adminPreparer",
           ProxyPreparer.class,
           new BasicProxyPreparer());
  locatorConstraints = (MethodConstraints)
      config.getEntry(BROWSER, "locatorConstraints",
          MethodConstraints.class, null);
  ignoreInterfaces = Arrays.asList((String[])
      Config.getNonNullEntry(config, BROWSER, "uninterestingInterfaces",
View Full Code Here

    config, NORM, "persistenceSnapshotThreshold",
    200, 0, Integer.MAX_VALUE);
  }
  leasePreparer = (ProxyPreparer) Config.getNonNullEntry(
      config, NORM, "leasePreparer", ProxyPreparer.class,
      new BasicProxyPreparer());
  listenerPreparer = (ProxyPreparer) Config.getNonNullEntry(
      config, NORM, "listenerPreparer", ProxyPreparer.class,
      new BasicProxyPreparer());
  locatorPreparer = (ProxyPreparer) Config.getNonNullEntry(
      config, NORM, "locatorPreparer", ProxyPreparer.class,
      new BasicProxyPreparer());
  if (persistent) {
      recoveredLeasePreparer = (ProxyPreparer) Config.getNonNullEntry(
    config, NORM, "recoveredLeasePreparer", ProxyPreparer.class,
    new BasicProxyPreparer());
      recoveredListenerPreparer =
    (ProxyPreparer) Config.getNonNullEntry(
        config, NORM, "recoveredListenerPreparer",
        ProxyPreparer.class, new BasicProxyPreparer());
      recoveredLocatorPreparer = (ProxyPreparer) Config.getNonNullEntry(
    config, NORM, "recoveredLocatorPreparer", ProxyPreparer.class,
    new BasicProxyPreparer());
  }
  setLeasePolicy = (LeasePeriodPolicy) Config.getNonNullEntry(
      config, NORM, "leasePolicy", LeasePeriodPolicy.class,
      new FixedLeasePeriodPolicy(
    2 * 60 * 60 * 1000 /* max */, 60 * 60 * 1000 /* default */));
 
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.