Examples of InvocationConstraint


Examples of net.jini.core.constraint.InvocationConstraint

                || tc == CL_MIN_PR__PRINCIPALS_COLL
                || tc == SRV_MIN_PR__PRINCIPALS_COLL) {
            pr_copy = new ArrayList(pr);
        }

        InvocationConstraint ic = null;

        try {
            if (       tc == CL_MAX_PR__PRINCIPALS_COLL
                    || tc == CL_MAX_PR__PRINCIPALS_NULL_COLL
                    || tc == CL_MAX_PR__PRINCIPALS_COLL_NULL_EL
View Full Code Here

Examples of net.jini.core.constraint.InvocationConstraint

     *
     * @return true if the returned result is equal to the expected one or
     *         false otherwise
     */
    public boolean checker(TestCase tc) {
        InvocationConstraint ic_init = tc.getInvocationConstraint1();
        InvocationConstraint ic_toCompare = tc.getInvocationConstraint2();
        InvocationConstraint ic_after = null;
        logger.log(Level.FINE,
                "Invocation Constraint before serialization:: " + ic_init);
        logger.log(Level.FINE, "serialization ...");
        logger.log(Level.FINE, "deserialization ...");

View Full Code Here

Examples of net.jini.core.constraint.InvocationConstraint

         * of the original object, as deserialized from the contained byte
         * stream.
         */
        try {
            MarshalledObject mObj = new MarshalledObject(ic);
            InvocationConstraint dic = (InvocationConstraint) mObj.get();
            logger.log(Level.FINE,
                    "Invocation Constraint after deserialization:: " + dic);
            return (dic == ic);
        } catch (Exception e) {
            logger.log(Level.FINE, e + "has been thrown while serialization or"
View Full Code Here

Examples of net.jini.core.constraint.InvocationConstraint

    }

    @Before
    public void setUp() {
        Collection<InvocationConstraint> required = new ArrayList<InvocationConstraint>(4);
        InvocationConstraint integrity = Integrity.YES;
        InvocationConstraint confidential = Confidentiality.YES;
        InvocationConstraint serverAuth = ServerAuthentication.YES;
        InvocationConstraint strength = ConfidentialityStrength.STRONG;
        required.add(integrity);
        required.add(confidential);
        required.add(serverAuth);
        required.add(strength);
        Collection preferred = null;
View Full Code Here

Examples of net.jini.core.constraint.InvocationConstraint

    @Test
    public void testConstraints() throws Exception {
        System.out.println("testConstraints");
        Collection<InvocationConstraint> discoveryConstraints
                = new ArrayList<InvocationConstraint>();
        InvocationConstraint usoctimout = new UnicastSocketTimeout(10);
        InvocationConstraint multicastMaxpackSize = new MulticastMaxPacketSize(512);
        InvocationConstraint discoveryProtVer = DiscoveryProtocolVersion.TWO;
        InvocationConstraint multicastTTL = new MulticastTimeToLive(100);
        discoveryConstraints.add(usoctimout);
        discoveryConstraints.add(multicastMaxpackSize);
        discoveryConstraints.add(discoveryProtVer);
        discoveryConstraints.add(multicastTTL);
       
        Collection<InvocationConstraint> requiredAdditionalConstraints = new ArrayList<InvocationConstraint>(4);
        InvocationConstraint integrity = Integrity.YES;
        InvocationConstraint confidential = Confidentiality.YES;
        InvocationConstraint serverAuth = ServerAuthentication.YES;
        InvocationConstraint strength = ConfidentialityStrength.STRONG;
        requiredAdditionalConstraints.add(integrity);
        requiredAdditionalConstraints.add(confidential);
        requiredAdditionalConstraints.add(serverAuth);
        requiredAdditionalConstraints.add(strength);
       
View Full Code Here

Examples of net.jini.core.constraint.InvocationConstraint

     */
    @Test
    public void checkUnicastDiscoveryConstraints() throws Exception {
        System.out.println("checkUnicastDiscoveryConstraints");
        Collection<InvocationConstraint> required = new ArrayList<InvocationConstraint>(4);
        InvocationConstraint integrity = Integrity.YES;
        InvocationConstraint confidential = Confidentiality.YES;
        InvocationConstraint serverAuth = ServerAuthentication.YES;
        InvocationConstraint strength = ConfidentialityStrength.STRONG;
        required.add(integrity);
        required.add(confidential);
        required.add(serverAuth);
        required.add(strength);
        Collection preferred = null;
View Full Code Here

Examples of net.jini.core.constraint.InvocationConstraint

     */
    @Test
    public void checkUnicastDiscoveryConstraints() throws Exception {
        System.out.println("checkUnicastDiscoveryConstraints");
        Collection<InvocationConstraint> required = new ArrayList<InvocationConstraint>(4);
        InvocationConstraint integrity = Integrity.YES;
        InvocationConstraint confidential = Confidentiality.YES;
        InvocationConstraint serverAuth = ServerAuthentication.YES;
        InvocationConstraint strength = ConfidentialityStrength.STRONG;
        required.add(integrity);
        required.add(confidential);
        required.add(serverAuth);
        required.add(strength);
        Collection preferred = null;
View Full Code Here

Examples of net.jini.core.constraint.InvocationConstraint

    @Test
    public void checkConstraintFailClientAuth() throws Exception {
        System.out.println("checkConstraintFailClientAuth");
        Collection<InvocationConstraint> required = new ArrayList<InvocationConstraint>(4);
        InvocationConstraint clientAuth = ClientAuthentication.YES;
        required.add(clientAuth);
        Collection preferred = null;
        InvocationConstraints constraints = new InvocationConstraints(required, preferred);
        UnsupportedConstraintException ex = null;
        try {
View Full Code Here

Examples of net.jini.core.constraint.InvocationConstraint

    }

    private static Set getUnfulfilled(Set constraints) {
  Set unfulfilled = new HashSet(constraints.size());
  for (Iterator i = constraints.iterator(); i.hasNext(); ) {
      InvocationConstraint c = (InvocationConstraint) i.next();
      if (c instanceof ConstraintAlternatives) {
    Set s = ((ConstraintAlternatives) c).elements();
    Set u = getUnfulfilled(s);
    if (u.size() == s.size()) {
        unfulfilled.add(c);
View Full Code Here

Examples of net.jini.core.constraint.InvocationConstraint

  private Set reduce(Set reduced, Set constraints, boolean required)
      throws UnsupportedConstraintException
  {
      for (Iterator i = constraints.iterator(); i.hasNext(); ) {
    InvocationConstraint c = (InvocationConstraint) i.next();

    Set toReduce = Collections.EMPTY_SET;
    if (targetClass.isInstance(c)) {
        toReduce = Collections.singleton(c);
    } else if (c instanceof ConstraintAlternatives) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.