All Packages  This Package  Class Hierarchy  Class Search  Index

Class app.authkit.test.TestReleaseSelf
java.lang.Object
   |
   +----app.authkit.test.AuthTest
           |
           +----app.authkit.test.TestReleaseSelf

  Summary

public class  TestReleaseSelf
     extends app.authkit.test.AuthTest
{
          // Constructors 1
     public TestReleaseSelf();

          // Methods 2
     public static void main(String[]);

     public void testAuthOne(Authorization, boolean, String);
}

TestReleaseSelf tests how multiple release() and attach() calls work in a single process. The underlying session should survive and its credentials persist throughout.

The property "authkit.imp" is the fully qualified class name of an Authorization to instantiate and use.

The optional property "interact" is true to perform interactive authentication, false to not. If absent, the default state is true.




  Constructors

· TestReleaseSelf

Summary  |  Top

   public TestReleaseSelf() 

Default constructor



  Methods

· main

Summary  |  Top
   public static void main(String[] args) 

Static entry point, when used as an application.



· testAuthOne

Summary  |  Top
   public void testAuthOne(Authorization auth, 
                           boolean interact, 
                           String arg) 

Do the test on one arg. The 'arg' is a command for which privileged-exec is authorize()'d. The 'interact' flag determines whether interaction is allowed or not.

Creates another Authorization and attaches it to the same session as the one given. After authorize() returns, release() is called on the replica Authorization. The purpose is to test the effect of release() on subsequent attach()'es.

The concrete Authorization's Class is used to construct a new instance. This method naively assumes that Class.newInstance() will work for this. A smarter approach would be to use a Constructor.

Overrides:
testAuthOne in class AuthTest


All Packages  This Package  Class Hierarchy  Class Search  Index
Freshly brewed Java API Documentation automatically generated with polardoc Version 1.0.7