public class PolicyInstaller{

	protected PolicyEngine policyEngine;

	protected void doInstall(){;}

	public PolicyInstaller( PolicyEngine pe ){
		this.policyEngine = pe;
	}

}

public class FooInstaller extends PolicyInstaller{

	public FooInstaller( PolicyEngine pe ){
		super( pe );
	}
	
	
	public void doInstall(){
		Zone zone = new Zone( "blah" );
		Policy policy = new Policy( "foo" );


		Principal p1 = new Principal( "Michael" );
		
		Rule rule1 = new Rule();
		rule1.setPrincipal( p1 );
		rule1.setAction( "GET /index.html HTTP/1.1" );
		//set conditional

		//pe code
		//iterate through rules
		//rule.match( req );
		//if( match ){ rule.fire() }
		Rule{

		   public void fire(){

		   	//go through list of fire handlers and ivoke
			//doit()

		   }

		}

		//////

		Rule rule1, rule2;

		rule1 = new Rule() { public void fire() { rule2.setActive(); }
		rule2 = new Rule() { }

		// inside PE
		rule1.match goes off
		rule1.fire()


		//////

			Rule r2 = new Rule(){

				public void fire(){


				rule3.setActive();
					///
					newCommand = "";
					//XXX NOT THIS Rule.fire( newCommand );

				}

			}
		);

		r2.setPrin
		r2.setACtion



		p1.addRule( rule1 );

			rule1.addPolicyEventHandler(
				new PolicyEventHandler(){

					public void handlePolicyEvent( PolicyEvent pevt, Rule rule ){

					///

					}
				}
			);

			p1.addPolicyEventHandler(
				new PolicyEventHandler(){
					public void handlePolicyEvent( PolicyEvent pevt
				}
			);


		Principal p2 = new Principal( "Chun" );
		zone.attach( policy );

		policyEngine.load( zone );

	}



}