package edu.ucsb.cs.jicos.examples.fibonacci; import edu.ucsb.cs.jicos.services.*; import java.rmi.*; final class Application { public static void main ( String args[] ) throws Exception { String hspDomainName = args[0]; // get a reference to a Hosting Service Provider HspAgent agent = new HspAgent( hspDomainName ); Client2Hsp hsp = agent.getClient2Hsp(); // login Environment environment = new Environment( null, null ); hsp.login( environment ); // compute int number = Integer.parseInt( args[1] ); Task task = new F( number ); Integer value = (Integer) hsp.compute( task ); System.out.println("F( " + number + " ) = " + value ); // logout Invoice invoice = hsp.logout(); System.out.println ( invoice ); } }