Package com.arunta.app.remote

Total Recall VR System Java RMI Interface

See: Description

Package com.arunta.app.remote Description

Total Recall VR System Java RMI Interface

This package contains the classes which implement the Java RMI interface to Total Recall VR systems.

A set of examples are provided to show the basic use of the RMI interface. These can be found in the examples directory of the API package.

Basic Use

In summary, use the TRRemoteUtility to obtain an instance of a remote interface. For example:

        final String rmIpAddress = "192.168.4.115";
        final int rmPort = 10010;
        final String trPassword = "0000";

        TRSystemServiceRI trSystemService = null;
        try {
            trSystemService = TRRemoteUtility.getSystemService(rmIpAddress, rmPort);;
        } 
        catch (RemoteException e) {
            e.printStackTrace();
        } 
    

You must obtain a security key from a Total Recall VR system before making requests on various RMI interfaces to the Total Recall VR system. The security key is a token which defines a trust relationship between a Total Recall VR system (the issuer of the key)and a remote client. Use the TRSystemServiceRI to obtain a key. For example:

        SecurityKey securityKey = null;
        try {
            securityKey = trSystemService.logon(trPassword, "example");
        } 
        catch (RemoteException e) {
            e.printStackTrace();
        } 
        catch (SecurityException e) {
            e.printStackTrace();
        }
    

Once you have a security key, you can make other requests over the RMI interfaces.

File Copy

Use TRScpConnection to transfer files to and from a Total Recall system. For example:

        TRScpConnection scpConnection = 
            new TRScpConnection("192.168.4.115", "totalrecall");
        
        if (!scpConnection.isAuthorized())
            System.out.println("Authorisation FAILED");
        else {
            System.out.println("Authorised!!!");
            scpConnection.getRemoteFile("/home/totalrecall/tmp/systemLogJ", "c:\\");
            scpConnection.putAsLocalFile("c:\\systemLogJ", "/tmp/systemLogX", "0644");
        }
        
        scpConnection.close();
    

Copyright ©, 2005-2012 Prolancer Pty Ltd, Sydney Australia.