Examples of FailingOpCountingOwner


Examples of com.sun.jini.test.share.FailingOpCountingOwner

       // 01) any instance of a NoSuchObjectException
       badObjException01 =
     new NoSuchObjectException("LeaseExpirationTest");
       badObjOwner01 =
     new FailingOpCountingOwner(badObjException01, 0, renewGrant);

       /* 02) any instance of a java.rmi.ServerError in which the value
    of the exception's detail field is a bad object exception */
       badObjException02 =
     new ServerError("LeaseExpirationTest",
         new StackOverflowError("LeaseExpirationTest"));
       badObjOwner02 =
     new FailingOpCountingOwner(badObjException02, 0, renewGrant);

       // 03) any instance of java.lang.RuntimeException
       badObjException03 =
     new NullPointerException("LeaseExpirationTest");
       badObjOwner03 =
     new FailingOpCountingOwner(badObjException01, 0, renewGrant);

       /* 04) any instance of a java.rmi.ServerException in which the value
    of the exception's detail field is a bad object invocation */
       badObjException04 =
     new ServerException("LeaseExpirationTest", badObjException02);
       badObjOwner04 =
     new FailingOpCountingOwner(badObjException04, 0, renewGrant);

       /* 05) any instance of a java.lang.Error unless it is an instance of
    java.lang.LinkageError or java.lang.OutOfMemoryError */
       badObjException05 =
     new StackOverflowError("LeaseExpirationTest");
       badObjOwner05 =
     new FailingOpCountingOwner(badObjException05, 0, renewGrant);

       // create owners for testing bad invocation exceptions
      
       /* 01) any instance of java.rmi.MarshalException in which the
          value of the exception's detail field is an instance of
          java.io.ObjectStreamException */
       badInvException01 =
     new MarshalException("LeaseExpirationTest",
      new StreamCorruptedException("LeaseExpirationTest"));
       badInvOwner01 =
     new FailingOpCountingOwner(badInvException01, 0, renewGrant);

       /* 02) any instance of java.rmi.UnmarshalException in which the
          value of the exception's detail field is an instance of
          java.io.ObjectStreamException */
       badInvException02 =
     new UnmarshalException("LeaseExpirationTest",
      new StreamCorruptedException("LeaseExpirationTest"));
       badInvOwner02 =
     new FailingOpCountingOwner(badInvException02, 0, renewGrant);

       /* 03) any instance of java.rmi.ServerException in which the
          value of the exception's detail field is a bad invocation
          exception. */
       badInvException03 =
     new ServerException("LeaseExpirationTest", badInvException01);
       badInvOwner03 =
     new FailingOpCountingOwner(badInvException03, 0, renewGrant);

       // create owners for testing bad indefinite exceptions

       /* 01) any instance of a java.rmi.RemoteException except those
          that can be classified as either a bad invocation or bad
          object exception. */
       indefiniteException01 =
     new ConnectException("LeaseExpirationTest");
       indefiniteOwner01 =
     new FailingOpCountingOwner(indefiniteException01, 0, renewGrant);

       // 02) any instance of a java.lang.OutOfMemoryError
       indefiniteException02 = new OutOfMemoryError("LeaseExpirationTest");
       indefiniteOwner02 =
     new FailingOpCountingOwner(indefiniteException02, 0, renewGrant);
      
       // 03) any instance of a java.lang.LinkageError
       indefiniteException03 = new NoSuchFieldError("LeaseExpirationTest");
       indefiniteOwner03 =
     new FailingOpCountingOwner(indefiniteException03, 0, renewGrant);
      
       // 04) assert that 02 is true inside of a ServerError
       indefiniteException04 = new ServerError("LeaseExpirationTest",
                 indefiniteException02);
       indefiniteOwner04 =
     new FailingOpCountingOwner(indefiniteException04, 0, renewGrant);

       // 05) assert that 03 is true inside of a ServerError
       indefiniteException05 = new ServerError("LeaseExpirationTest",
                 indefiniteException03);
       indefiniteOwner05 =
     new FailingOpCountingOwner(indefiniteException05, 0, renewGrant);

       // 06) assert that 01 is true inside of a ServerException
       indefiniteException06 = new ServerException("LeaseExpirationTest",
               indefiniteException01);
       indefiniteOwner06 =
     new FailingOpCountingOwner(indefiniteException06, 0, renewGrant);

       // create lease renewal manager for wider use across implementations
       lrm = new LeaseRenewalManager(sysConfig.getConfiguration());
    }
View Full Code Here

Examples of com.sun.jini.test.share.FailingOpCountingOwner

       succeedingOwner = new OpCountingOwner(renewGrant);
      
       // create an owner for the lease that will throw a definite exception
       String testName = "AssocRenewalFailSetTest";
       Exception except = new UnknownLeaseException(testName);
       failingOwner = new FailingOpCountingOwner(except, 0, renewGrant*2);

       // logs events as they arrive
       rrl = new RememberingRemoteListener(getExporter());

       // create lease renewal manager for wider use across implementations
View Full Code Here

Examples of com.sun.jini.test.share.FailingOpCountingOwner

       // create an owner to for testing definite exceptions
       Exception definiteException =
     new IllegalArgumentException("NewListenerEventTest");
       failingOwner =
     new FailingOpCountingOwner(definiteException, 0, renewGrant);
    }
View Full Code Here

Examples of com.sun.jini.test.share.FailingOpCountingOwner

       // capture the renewal time
       String property = "com.sun.jini.test.spec.renewalservice.renewGrant";
       renewGrant = getConfig().getLongConfigVal(property, DEFAULT_RENEW_GRANT);

       // owner that will throw a succession of Exceptions
       failingOwner = new FailingOpCountingOwner(throwables, 0, renewGrant);

       // logs events as they arrive
       rrl = new RememberingRemoteListener(getExporter());

       // create lease renewal manager for wider use across implementations
View Full Code Here

Examples of com.sun.jini.test.share.FailingOpCountingOwner

       String property = "com.sun.jini.test.spec.renewalservice.renewGrant";
       renewGrant = getConfig().getLongConfigVal(property, DEFAULT_RENEW_GRANT);

       // create owners for the leases that will throw a definite exception
       Exception ex = new IllegalArgumentException("ClearFailureListenerTest");
       owner = new FailingOpCountingOwner(ex, 0, renewGrant);

       // logs events as they arrive
       rrl = new RememberingRemoteListener(getExporter());

       // create lease renewal manager for wider use across implementations
View Full Code Here

Examples of com.sun.jini.test.share.FailingOpCountingOwner

       // create an owner to for testing definite exceptions
       Exception indefiniteException =
     new RemoteException("RenewalFailureIndefiniteTest");
       indefiniteOwner =
     new FailingOpCountingOwner(indefiniteException, 0, renewGrant);
    }
View Full Code Here

Examples of com.sun.jini.test.share.FailingOpCountingOwner

       renewGrant = getConfig().getLongConfigVal(property, DEFAULT_RENEW_GRANT);

       // create an owner for the lease that will throw a definite exception
       // create an owner to for testing definite exceptions
       Exception ex = new IllegalArgumentException("EventSequenceFailTest");
       owner = new FailingOpCountingOwner(ex, 0, renewGrant);

       // logs events as they arrive
       rrl01 = new RenewingRemoteListener(getExporter(), renewGrant);
       rrl02 = new RenewingRemoteListener(getExporter(), renewGrant);
    }
View Full Code Here

Examples of com.sun.jini.test.share.FailingOpCountingOwner

       // 01) any instance of a NoSuchObjectException
       badObjException01 =
     new NoSuchObjectException("LeaseExpirationTest");
       badObjOwner01 =
     new FailingOpCountingOwner(badObjException01, 0, renewGrant);

       /* 02) any instance of a java.rmi.ServerError in which the value
    of the exception's detail field is a bad object exception */
       badObjException02 =
     new ServerError("LeaseExpirationTest",
         new StackOverflowError("LeaseExpirationTest"));
       badObjOwner02 =
     new FailingOpCountingOwner(badObjException02, 0, renewGrant);

       // 03) any instance of java.lang.RuntimeException
       badObjException03 =
     new NullPointerException("LeaseExpirationTest");
       badObjOwner03 =
     new FailingOpCountingOwner(badObjException01, 0, renewGrant);

       /* 04) any instance of a java.rmi.ServerException in which the value
    of the exception's detail field is a bad object invocation */
       badObjException04 =
     new ServerException("LeaseExpirationTest", badObjException02);
       badObjOwner04 =
     new FailingOpCountingOwner(badObjException04, 0, renewGrant);

       /* 05) any instance of a java.lang.Error unless it is an instance of
    java.lang.LinkageError or java.lang.OutOfMemoryError */
       badObjException05 =
     new StackOverflowError("LeaseExpirationTest");
       badObjOwner05 =
     new FailingOpCountingOwner(badObjException05, 0, renewGrant);

       // create owners for testing bad invocation exceptions
      
       /* 01) any instance of java.rmi.MarshalException in which the
          value of the exception's detail field is an instance of
          java.io.ObjectStreamException */
       badInvException01 =
     new MarshalException("LeaseExpirationTest",
      new StreamCorruptedException("LeaseExpirationTest"));
       badInvOwner01 =
     new FailingOpCountingOwner(badInvException01, 0, renewGrant);

       /* 02) any instance of java.rmi.UnmarshalException in which the
          value of the exception's detail field is an instance of
          java.io.ObjectStreamException */
       badInvException02 =
     new UnmarshalException("LeaseExpirationTest",
      new StreamCorruptedException("LeaseExpirationTest"));
       badInvOwner02 =
     new FailingOpCountingOwner(badInvException02, 0, renewGrant);

       /* 03) any instance of java.rmi.ServerException in which the
          value of the exception's detail field is a bad invocation
          exception. */
       badInvException03 =
     new ServerException("LeaseExpirationTest", badInvException01);
       badInvOwner03 =
     new FailingOpCountingOwner(badInvException03, 0, renewGrant);

       // create owners for testing bad indefinite exceptions

       /* 01) any instance of a java.rmi.RemoteException except those
          that can be classified as either a bad invocation or bad
          object exception. */
       indefiniteException01 =
     new ConnectException("LeaseExpirationTest");
       indefiniteOwner01 =
     new FailingOpCountingOwner(indefiniteException01, 0, renewGrant);

       // 02) any instance of a java.lang.OutOfMemoryError
       indefiniteException02 = new OutOfMemoryError("LeaseExpirationTest");
       indefiniteOwner02 =
     new FailingOpCountingOwner(indefiniteException02, 0, renewGrant);
      
       // 03) any instance of a java.lang.LinkageError
       indefiniteException03 = new NoSuchFieldError("LeaseExpirationTest");
       indefiniteOwner03 =
     new FailingOpCountingOwner(indefiniteException03, 0, renewGrant);
      
       // 04) assert that 02 is true inside of a ServerError
       indefiniteException04 = new ServerError("LeaseExpirationTest",
                 indefiniteException02);
       indefiniteOwner04 =
     new FailingOpCountingOwner(indefiniteException04, 0, renewGrant);

       // 05) assert that 03 is true inside of a ServerError
       indefiniteException05 = new ServerError("LeaseExpirationTest",
                 indefiniteException03);
       indefiniteOwner05 =
     new FailingOpCountingOwner(indefiniteException05, 0, renewGrant);

       // 06) assert that 01 is true inside of a ServerException
       indefiniteException06 = new ServerException("LeaseExpirationTest",
               indefiniteException01);
       indefiniteOwner06 =
     new FailingOpCountingOwner(indefiniteException06, 0, renewGrant);

       // create lease renewal manager for wider use across implementations
       lrm = new LeaseRenewalManager(sysConfig.getConfiguration());
    }
View Full Code Here

Examples of com.sun.jini.test.share.FailingOpCountingOwner

       succeedingOwner = new OpCountingOwner(renewGrant);
      
       // create an owner for the lease that will throw a definite exception
       String testName = "AssocRenewalFailSetTest";
       Exception except = new UnknownLeaseException(testName);
       failingOwner = new FailingOpCountingOwner(except, 0, renewGrant*2);

       // logs events as they arrive
       rrl = new RememberingRemoteListener(getExporter());

       // create lease renewal manager for wider use across implementations
View Full Code Here

Examples of com.sun.jini.test.share.FailingOpCountingOwner

       // create an owner to for testing definite exceptions
       Exception definiteException =
     new IllegalArgumentException("NewListenerEventTest");
       failingOwner =
     new FailingOpCountingOwner(definiteException, 0, renewGrant);
    }
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.