Package net.jini.security.policy

Examples of net.jini.security.policy.PolicyFileProvider


     * @throws TestException if failed
     *
     */
    protected void createPolicyFileProvider() throws TestException {
        try {
            policy = new PolicyFileProvider();
        } catch (Exception e) {
            msg = "new PolicyFileProvider()";
            throw new TestException(Util.fail(msg, e, msg));
        }
    }
View Full Code Here


      throw new TestException("No policy found for name " + policyFile);
        }
        msg = "new PolicyFileProvider(" + newPolicy + ")";

        try {
            policy = new PolicyFileProvider(newPolicy);
        } catch (Exception e) {
            throw new TestException(Util.fail(msg, e, msg));
        }
        logger.log(Level.FINE, msg + " created");
    }
View Full Code Here

     *
     */
    protected void createPolicyFileProviderSE(String msg)
            throws TestException {
        try {
            PolicyFileProvider policy = new PolicyFileProvider();
            throw new TestException(Util.fail(msg, msg, SE));
        } catch (SecurityException se) {
            logger.log(Level.FINE, Util.pass(msg, se));
        } catch (TestException qae) {
            throw qae;
View Full Code Here

     *
     */
    protected void createPolicyFileProviderSE(String policyFile, String msg)
            throws TestException {
        try {
            PolicyFileProvider policy = new PolicyFileProvider(policyFile);
            throw new TestException(Util.fail(msg, msg, SE));
        } catch (SecurityException se) {
            logger.log(Level.FINE, Util.pass(msg, se));
        } catch (TestException qae) {
            throw qae;
View Full Code Here

     *
     */
    protected void createPolicyFileProviderPIE(String msg)
            throws TestException {
        try {
            PolicyFileProvider policy = new PolicyFileProvider();
            throw new TestException(Util.fail(msg, msg, PIE));
        } catch (PolicyInitializationException pie) {
            logger.log(Level.FINE, Util.pass(msg, pie));
        } catch (TestException qae) {
            throw qae;
View Full Code Here

     *
     */
    protected void createPolicyFileProviderPIE(String policyFile, String msg)
            throws TestException {
        try {
            PolicyFileProvider policy = new PolicyFileProvider(policyFile);
            throw new TestException(Util.fail(msg, msg, PIE));
        } catch (PolicyInitializationException pie) {
            logger.log(Level.FINE, Util.pass(msg, pie));
        } catch (TestException qae) {
            throw qae;
View Full Code Here

     *
     */
    protected void createPolicyFileProviderNPE(String msg)
            throws TestException {
        try {
            PolicyFileProvider policy = new PolicyFileProvider(null);
            throw new TestException(Util.fail(msg, msg, NPE));
        } catch (NullPointerException npe) {
            logger.log(Level.FINE, Util.pass(msg, npe));
        } catch (TestException qae) {
            throw qae;
View Full Code Here

        "Global policy set: {0}", globalPolicy);
      }
     
      Policy service_policy =
    ActivateWrapper.getServicePolicyProvider(
         new PolicyFileProvider(getPolicy()));
      Policy backstop_policy =
    ActivateWrapper.getServicePolicyProvider(initialGlobalPolicy);
      LoaderSplitPolicyProvider split_service_policy =
    new LoaderSplitPolicyProvider(
        newClassLoader, service_policy, backstop_policy);
View Full Code Here

              logger.log(Level.FINEST,
            "Global policy set: {0}", globalPolicy);
          }
    Policy service_policy =
        getServicePolicyProvider(
            new PolicyFileProvider(desc.policy));
    Policy backstop_policy =
        getServicePolicyProvider(initialGlobalPolicy);
                LoaderSplitPolicyProvider split_service_policy =
                    new LoaderSplitPolicyProvider(
                        cl, service_policy, backstop_policy);
View Full Code Here

    public static void main(String[] args) throws Exception {
  if (System.getSecurityManager() == null) {
      System.setSecurityManager(new SecurityManager());
  }
  Policy policy = new PolicyFileProvider();

  checkPermissions(policy, "file:/foo.jar",
      new Permission[]{
    new GrantPermission(new RuntimePermission("A")),
    new GrantPermission(new RuntimePermission("B")),
View Full Code Here

TOP

Related Classes of net.jini.security.policy.PolicyFileProvider

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.