Package net.jini.core.constraint

Examples of net.jini.core.constraint.DelegationAbsoluteTime


                                        null : new Date(maxStop);
                    logger.log(Level.FINE,"\tminStart:: " + minStartDate);
                    logger.log(Level.FINE,"\tmaxStart:: " + maxStartDate);
                    logger.log(Level.FINE,"\tminStop :: " + minStopDate);
                    logger.log(Level.FINE,"\tmaxStop :: " + maxStopDate);
                    constraint = new DelegationAbsoluteTime(minStartDate,
                                                            maxStartDate,
                                                            minStopDate,
                                                            maxStopDate);
                } else if (constructorType == DELEGATION_ABSOLUTE_TIME__LONG) {
                    constraint = new DelegationAbsoluteTime(minStart, maxStart,
                                                            minStop, maxStop);
                } else if (constructorType == DELEGATION_RELATIVE_TIME__LONG) {
                    constraint = new DelegationRelativeTime(minStart, maxStart,
                                                            minStop, maxStop);
                }
View Full Code Here


            Integrity.NO,
            ServerAuthentication.NO,
            new ClientMaxPrincipalType(TestPrincipal.class),
            new ClientMinPrincipalType(TestPrincipal.class),
            new DelegationRelativeTime(1000, 2000, 3000, 4000),
            new DelegationAbsoluteTime(1000, 2000, 3000, 4000),
            new ClientMinPrincipal(new Principal[] { tp1, tp2 }),
            new ClientMaxPrincipal(new Principal[] { tp1, tp2 }),
            new ServerMinPrincipal(new Principal[] { tp1, tp2 }),
            new ClientMinPrincipal(new Principal[] { tp1, tp3, tp2 }),
            new ClientMaxPrincipal(new Principal[] { tp1, tp3, tp2 }),
View Full Code Here

        logger.log(Level.FINE,
                "\n\t+++++ TestCase #18:: "
                + "Only duplicate DelegationAbsoluteTime constraints exist");
        {
            Collection argColl = new ArrayList();
            DelegationAbsoluteTime ic = new DelegationAbsoluteTime((long) 0,
                    (long) 0, (long) 0, (long) 0);
            argColl.add(ic);
            argColl.add(ic);

            if (!checker(argColl, ic)) {
                throw new TestException(
                        "" + " test failed");
            }
        }

        // TestCase #19
        logger.log(Level.FINE,
                "\n\t+++++ TestCase #19:: "
                + "Only duplicate DelegationRelativeTime constraints exist");
        {
            Collection argColl = new ArrayList();
            DelegationRelativeTime ic = new DelegationRelativeTime((long) 0,
                    (long) 0, (long) 0, (long) 0);
            argColl.add(ic);
            argColl.add(ic);

            if (!checker(argColl, ic)) {
                throw new TestException(
                        "" + " test failed");
            }
        }

        // TestCase #20
        logger.log(Level.FINE,
                "\n\t+++++ TestCase #20:: "
                + "There are several duplicate and non-duplicate constraints");

        try {
            // Argument for ConstraintAlternatives.create() methods
            Collection argColl = new ArrayList();
            argColl.add(ClientAuthentication.YES);
            argColl.add(ClientAuthentication.YES);
            argColl.add(ClientAuthentication.NO);
            argColl.add(Confidentiality.YES);
            argColl.add(Confidentiality.YES);
            argColl.add(Confidentiality.NO);
            argColl.add(Delegation.YES);
            argColl.add(Delegation.YES);
            argColl.add(Delegation.NO);
            argColl.add(Integrity.YES);
            argColl.add(Integrity.YES);
            argColl.add(Integrity.NO);
            argColl.add(ServerAuthentication.YES);
            argColl.add(ServerAuthentication.YES);
            argColl.add(ServerAuthentication.NO);
            argColl.add(new ClientMaxPrincipal(new
                    KerberosPrincipal("duke@FOO.COM")));
            argColl.add(new ClientMaxPrincipal(new
                    KerberosPrincipal("duke@FOO.COM")));
            argColl.add(new ClientMaxPrincipal(new
                    X500Principal(
                    "CN=Duke, OU=JavaSoft, O=Sun Microsystems, C=US")));
            argColl.add(new ClientMaxPrincipalType(KerberosPrincipal.class));
            argColl.add(new ClientMaxPrincipalType(KerberosPrincipal.class));
            argColl.add(new ClientMaxPrincipalType(X500Principal.class));
            argColl.add(new ClientMinPrincipal(new
                    KerberosPrincipal("duke@FOO.COM")));
            argColl.add(new ClientMinPrincipal(new
                    KerberosPrincipal("duke@FOO.COM")));
            argColl.add(new ClientMinPrincipal(new
                    X500Principal(
                    "CN=Duke, OU=JavaSoft, O=Sun Microsystems, C=US")));
            argColl.add(new ClientMinPrincipalType(KerberosPrincipal.class));
            argColl.add(new ClientMinPrincipalType(KerberosPrincipal.class));
            argColl.add(new ClientMinPrincipalType(X500Principal.class));
            argColl.add(new ServerMinPrincipal(new
                    KerberosPrincipal("duke@FOO.COM")));
            argColl.add(new ServerMinPrincipal(new
                    KerberosPrincipal("duke@FOO.COM")));
            argColl.add(new ServerMinPrincipal(new
                    X500Principal(
                    "CN=Duke, OU=JavaSoft, O=Sun Microsystems, C=US")));
            argColl.add(new ConnectionAbsoluteTime((long) 0));
            argColl.add(new ConnectionAbsoluteTime((long) 0));
            argColl.add(new ConnectionAbsoluteTime((long) 1));
            argColl.add(new ConnectionRelativeTime((long) 0));
            argColl.add(new ConnectionRelativeTime((long) 0));
            argColl.add(new ConnectionRelativeTime((long) 1));
            argColl.add(new DelegationAbsoluteTime((long) 0, (long) 0, (long) 0,
                    (long) 0));
            argColl.add(new DelegationAbsoluteTime((long) 0, (long) 0, (long) 0,
                    (long) 0));
            argColl.add(new DelegationAbsoluteTime((long) 1, (long) 1, (long) 1,
                    (long) 1));
            argColl.add(new DelegationRelativeTime((long) 0, (long) 0, (long) 0,
                    (long) 0));
            argColl.add(new DelegationRelativeTime((long) 0, (long) 0, (long) 0,
                    (long) 0));
            argColl.add(new DelegationRelativeTime((long) 1, (long) 1, (long) 1,
                    (long) 1));

            // Expected result of ConstraintAlternatives.create() methods
            Collection expColl = new ArrayList();
            expColl.add(ClientAuthentication.YES);
            expColl.add(ClientAuthentication.NO);
            expColl.add(Confidentiality.YES);
            expColl.add(Confidentiality.NO);
            expColl.add(Delegation.YES);
            expColl.add(Delegation.NO);
            expColl.add(Integrity.YES);
            expColl.add(Integrity.NO);
            expColl.add(ServerAuthentication.YES);
            expColl.add(ServerAuthentication.NO);
            expColl.add(new ClientMaxPrincipal(new
                    KerberosPrincipal("duke@FOO.COM")));
            expColl.add(new ClientMaxPrincipal(new
                    X500Principal(
                    "CN=Duke, OU=JavaSoft, O=Sun Microsystems, C=US")));
            expColl.add(new ClientMaxPrincipalType(KerberosPrincipal.class));
            expColl.add(new ClientMaxPrincipalType(X500Principal.class));
            expColl.add(new ClientMinPrincipal(new
                    KerberosPrincipal("duke@FOO.COM")));
            expColl.add(new ClientMinPrincipal(new
                    X500Principal(
                    "CN=Duke, OU=JavaSoft, O=Sun Microsystems, C=US")));
            expColl.add(new ClientMinPrincipalType(KerberosPrincipal.class));
            expColl.add(new ClientMinPrincipalType(X500Principal.class));
            expColl.add(new ServerMinPrincipal(new
                    KerberosPrincipal("duke@FOO.COM")));
            expColl.add(new ServerMinPrincipal(new
                    X500Principal(
                    "CN=Duke, OU=JavaSoft, O=Sun Microsystems, C=US")));
            expColl.add(new ConnectionAbsoluteTime((long) 0));
            expColl.add(new ConnectionAbsoluteTime((long) 1));
            expColl.add(new ConnectionRelativeTime((long) 0));
            expColl.add(new ConnectionRelativeTime((long) 1));
            expColl.add(new DelegationAbsoluteTime((long) 0, (long) 0, (long) 0,
                    (long) 0));
            expColl.add(new DelegationAbsoluteTime((long) 1, (long) 1, (long) 1,
                    (long) 1));
            expColl.add(new DelegationRelativeTime((long) 0, (long) 0, (long) 0,
                    (long) 0));
            expColl.add(new DelegationRelativeTime((long) 1, (long) 1, (long) 1,
                    (long) 1));
View Full Code Here

                                        null : new Date(maxStop);
                    logger.log(Level.FINE,"\tminStart:: " + minStartDate);
                    logger.log(Level.FINE,"\tmaxStart:: " + maxStartDate);
                    logger.log(Level.FINE,"\tminStop :: " + minStopDate);
                    logger.log(Level.FINE,"\tmaxStop :: " + maxStopDate);
                    constraint = new DelegationAbsoluteTime(minStartDate,
                                                            maxStartDate,
                                                            minStopDate,
                                                            maxStopDate);
                } else if (constructorType == DELEGATION_ABSOLUTE_TIME__LONG) {
                    constraint = new DelegationAbsoluteTime(minStart, maxStart,
                                                            minStop, maxStop);
                } else if (constructorType == DELEGATION_RELATIVE_TIME__LONG) {
                    constraint = new DelegationRelativeTime(minStart, maxStart,
                                                            minStop, maxStop);
                }
View Full Code Here

         */
        logger.log(Level.FINE,
                "\n\t+++++ TestCase #11:"
                + "  net.jini.core.constraint.DelegationAbsoluteTime");
        {
            DelegationAbsoluteTime obj1 = new
                    DelegationAbsoluteTime(Long.MAX_VALUE, Long.MAX_VALUE,
                    Long.MAX_VALUE, Long.MAX_VALUE);
            DelegationAbsoluteTime obj2 = new
                    DelegationAbsoluteTime(Long.MAX_VALUE, Long.MAX_VALUE,
                    Long.MAX_VALUE, Long.MAX_VALUE);
            DelegationAbsoluteTime obj3 = new DelegationAbsoluteTime((long) 0,
                    (long) 0, (long) 0, (long) 0);

            if (!checker(obj1, obj2, obj3)) {
                throw new TestException(
                        "" + " test failed");
View Full Code Here

TOP

Related Classes of net.jini.core.constraint.DelegationAbsoluteTime

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.