org.starhope.catullus
Class JavaRMIVehicle

java.lang.Object
  extended by org.starhope.catullus.JavaRMIVehicle
All Implemented Interfaces:
Remote, Vehicle

public class JavaRMIVehicle
extends Object
implements Vehicle, Remote

Vehicle for performing Java RMI RPC

Author:
brpocock@star-hope.org

Field Summary
private  String rmiURL
          RMI naming URL
(package private)  JavaRMIServer server
          RMI server object obtained from the naming service
 
Constructor Summary
JavaRMIVehicle()
           
 
Method Summary
 void connect()
          WRITEME: Document this method brpocock@star-hope.org
 void disconnect()
          WRITEME: Document this method brpocock@star-hope.org
 String getURL()
           
<T extends DataRecord>
T
read(Via<T> via, Class<T> klass, int id)
          WRITEME: Document this method brpocock@star-hope.org
<T extends DataRecord>
T
read(Via<T> via, Class<T> klass, String ident)
          WRITEME: Document this method brpocock@star-hope.org
<T extends DataRecord>
void
remove(T obj)
          WRITEME: Document this method brpocock@star-hope.org
 void setURL(String newRMI_URL)
           
<T extends DataRecord>
T
write(T obj)
          WRITEME: Document this method brpocock@star-hope.org
<T extends DataRecord>
T
writeSync(T obj)
          WRITEME: Document this method brpocock@star-hope.org
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

rmiURL

private String rmiURL
RMI naming URL


server

JavaRMIServer server
RMI server object obtained from the naming service

Constructor Detail

JavaRMIVehicle

public JavaRMIVehicle()
Method Detail

connect

public void connect()
             throws NotFoundException,
                    CredentialExpiredException,
                    ForbiddenUserException,
                    NotReadyException,
                    ParameterException,
                    SerialDataException
Description copied from interface: Vehicle
WRITEME: Document this method brpocock@star-hope.org

Specified by:
connect in interface Vehicle
Throws:
NotFoundException - perhaps the remote host is unreachable
CredentialExpiredException - the credentials may have once been valid, but are not any more
ForbiddenUserException - the credentials are invalid
NotReadyException - the remote host might not be responding
ParameterException - general problem caused by the caller
SerialDataException - general problem caused in data transfer
See Also:
Vehicle.connect()

disconnect

public void disconnect()
                throws SerialDataException,
                       AlreadyUsedException,
                       ParameterException
Description copied from interface: Vehicle
WRITEME: Document this method brpocock@star-hope.org

Specified by:
disconnect in interface Vehicle
Throws:
SerialDataException - general problem caused by data transfer
AlreadyUsedException - not connected
ParameterException - general problem caused by the caller
See Also:
Vehicle.disconnect()

getURL

public String getURL()
Specified by:
getURL in interface Vehicle
Returns:
the rmiURL

read

public <T extends DataRecord> T read(Via<T> via,
                                     Class<T> klass,
                                     int id)
                          throws NotReadyException,
                                 NotFoundException
Description copied from interface: Vehicle
WRITEME: Document this method brpocock@star-hope.org

Specified by:
read in interface Vehicle
Type Parameters:
T - WRITEME
Parameters:
via - WRITEME
klass - WRITEME
id - WRITEME
Returns:
WRITEME
Throws:
NotReadyException - if the server isn't connected
NotFoundException - if the object can't be found
See Also:
Vehicle.read(Via,java.lang.Class, int)

read

public <T extends DataRecord> T read(Via<T> via,
                                     Class<T> klass,
                                     String ident)
                          throws NotReadyException,
                                 NotFoundException
Description copied from interface: Vehicle
WRITEME: Document this method brpocock@star-hope.org

Specified by:
read in interface Vehicle
Type Parameters:
T - WRITEME
Parameters:
via - WRITEME
klass - WRITEME
ident - WRITEME
Returns:
WRITEME
Throws:
NotReadyException - if the server isn't connected
NotFoundException - if the object can't be found
See Also:
Vehicle.read(Via,java.lang.Class, String)

remove

public <T extends DataRecord> void remove(T obj)
            throws NotReadyException,
                   NotFoundException
Description copied from interface: Vehicle
WRITEME: Document this method brpocock@star-hope.org

Specified by:
remove in interface Vehicle
Type Parameters:
T - WRITEME
Parameters:
obj - WRITEME
Throws:
NotReadyException - WRITEME
NotFoundException - WRITEME
See Also:
Vehicle.remove(org.starhope.appius.util.DataRecord)

setURL

public void setURL(String newRMI_URL)
Specified by:
setURL in interface Vehicle
Parameters:
newRMI_URL - the rmiURL to set

write

public <T extends DataRecord> T write(T obj)
                           throws NotReadyException
Description copied from interface: Vehicle
WRITEME: Document this method brpocock@star-hope.org

Specified by:
write in interface Vehicle
Type Parameters:
T - WRITEME
Parameters:
obj - WRITEME
Throws:
NotReadyException - server not connected or ready
See Also:
Vehicle.write(DataRecord)

writeSync

public <T extends DataRecord> T writeSync(T obj)
                               throws NotReadyException
Description copied from interface: Vehicle
WRITEME: Document this method brpocock@star-hope.org

Specified by:
writeSync in interface Vehicle
Type Parameters:
T - WRITEME
Parameters:
obj - WRITEME
Throws:
NotReadyException - WRITEME
See Also:
Vehicle.writeSync(org.starhope.appius.util.DataRecord)