FileDocCategorySizeDatePackage
ConvertClient.javaAPI DocExample2211Thu Mar 16 11:52:36 GMT 2000None

ConvertClient

public class ConvertClient extends Object

Fields Summary
Constructors Summary
Methods Summary
public static voidmain(java.lang.String[] args)

        System.setSecurityManager(new RMISecurityManager());

        // Find the service by its interface type
        ServiceFinder sf = new ServiceFinder(ConvertService.class);
        ConvertService cs = (ConvertService) sf.getObject();
        ConvertServiceRegistration csr = cs.getInstance(Lease.FOREVER);

        // Because we exit immediately, we don't need to manage the
        // lease in this case, but if we did, here's the simple way to
        // do it.
        LeaseRenewalManager lrm = new LeaseRenewalManager(csr.getLease(), Lease.FOREVER, null);

        // Now invoke methods on the service object
        System.out.println(csr.convert(5));