com.sun.jini.compat.harness
Class DefaultAdmin

java.lang.Object
  extended bycom.sun.jini.compat.harness.DefaultAdmin
All Implemented Interfaces:
BasicAdmin
Direct Known Subclasses:
DefaultClientAdmin, DefaultLookupAdmin, DefaultServiceAdmin

public class DefaultAdmin
extends java.lang.Object
implements BasicAdmin

An implementation of the BasicAdmin interface. This implementation is not program specific and it is not automated. It asks the person running the tests to manually start and stop the program being tested. Also it uses a property called: com.sun.jini.compat.defaultAdmin.address to specify the host the client is running on. If the property is not specified the default is the host the LDJ Kit harness is running on.


Constructor Summary
DefaultAdmin()
          A basic no-arg constructor.
DefaultAdmin(java.lang.String message)
          A constructor that takes a message to be displayed with the various user input requests.
 
Method Summary
 java.net.InetAddress getAddress()
          Returns the address of the host the program is running on by looking up the property com.sun.jini.compat.defaultAdmin.address.
protected  Config getConfig()
          Returns the Config object for this run of the LDJ Kit.
 void setConfig(Config conf)
          See comments for BasicAdmin.
 void start()
          Prompt the user to start the program.
 void stop()
          Prompt the user to stop the program.
protected  char waitForChar()
          Wait for a character to be read in.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultAdmin

public DefaultAdmin()
A basic no-arg constructor.


DefaultAdmin

public DefaultAdmin(java.lang.String message)
A constructor that takes a message to be displayed with the various user input requests.

Parameters:
message - a message to be displayed with the user input requests.
Method Detail

setConfig

public void setConfig(Config conf)
See comments for BasicAdmin.

Specified by:
setConfig in interface BasicAdmin
Parameters:
conf - the configuration object

getConfig

protected Config getConfig()
Returns the Config object for this run of the LDJ Kit.

Returns:
the Config object

waitForChar

protected char waitForChar()
Wait for a character to be read in.

Returns:
the character read from System.in

start

public void start()
           throws java.rmi.RemoteException
Prompt the user to start the program.

Specified by:
start in interface BasicAdmin
Throws:
java.rmi.RemoteException

getAddress

public java.net.InetAddress getAddress()
                                throws java.rmi.RemoteException
Returns the address of the host the program is running on by looking up the property com.sun.jini.compat.defaultAdmin.address. If that property is not specified the default is the host the LDJ Kit harness is running on.

Specified by:
getAddress in interface BasicAdmin
Returns:
the address of the program
Throws:
java.rmi.RemoteException

stop

public void stop()
          throws java.rmi.RemoteException
Prompt the user to stop the program.

Specified by:
stop in interface BasicAdmin
Throws:
java.rmi.RemoteException


Copyright 2005, Sun Microsystems, Inc.
Licensed under the Apache License, Version 2.0.