Package satin.aro

Core classes for Awesome Remote Objects.

See:
          Description

Class Summary
ARObooleanDatum An incoming boolean data element.
AROcompoundDatum This class defines an element of incoming data which contains other data elements.
AROdateTime A simple date & time class for use in ARO requests.
AROdatum This is an abstract base class for incoming data elements.
AROexportMap Provides mapping between AROobjectIDs and AROexportObjects for use in an ARO server.
AROexportObject Used by an ARO server to represent an object that is visible to clients.
AROincomingRequest An incoming request.
AROincomingResponse An incoming response to an ARO request.
AROintegerDatum An incoming integer data element.
AROobject Represents an ARO object that resides in an ARO server.
AROobjectDatum An incoming ARO object data element.
AROobjectID Identifies an ARO object that resides in an ARO server.
AROoutgoingData A collection of outgoing data for an ARO request.
AROoutgoingRequest An outgoing ARO request.
AROoutgoingResponse An outgoing response.
AROpoint A simple immutable point for use in ARO requests.
AROrealDatum An incoming real (double precision floating point) data element.
AROrectangle A simple immutable rectangle for use in ARO requests.
AROremoteObject Used by an ARO client to represent an object in an ARO server.
AROremoteServer This class represents a connection with an ARO server.
AROstringDatum An incoming string data element.
MacIntoshOS Represents the MacIntosh operating system under which the ARO server is running, or its emulation via Altura's Mac2Win.
MacWindow Represents a MacIntosh window on the operating system under which the ARO server is running.
MicrosoftOS Represents the Microsoft Windows operating system under which the ARO server is running.
MSwindow Represents a Microsoft Win32 SDK window on the operating system under which the ARO server is running.
 

Exception Summary
AROexception An ARO exception wrapped in a Java exception.
 

Package satin.aro Description

Core classes for Awesome Remote Objects. ARO (Awesome Remote Objects) is a object-oriented remote procedure call mechanism for use in COMPANY products, particularly the PRODUCT family. The Java ARO classes provide a mechanism for calling C++ API's that are internal to the PRODUCT and have been exported through ARO for testing purposes.

For more information, see Awesome Remote Objects.

Client-Side Summary

In order to talk to an ARO server, you must first instantiate an AROremoteServer object, providing it with the name of the system on which the ARO server is running, and the IP port on which the server is listening. The AROremoteServer constructor establishes communication with the ARO server. You will use this object for all subsequent communication with the server.

To send a request to a server, you must first instantiate an AROoutgoingRequest object, providing it with the name of an ARO method or subroutine that the server will recognize. If your request is an ARO method, you must also provide an AROobject as the "this" object for the request. If the request has any input parameters, you must add them using the appropriate add*** methods of AROoutgoingRequest. When the request is ready to send, pass it to the makeRequestAndThrow method of AROremoteServer.

AROremoteServer.makeRequestAndThrow will send the request to the ARO server and wait for a response. If the response is an ARO exception response, makeRequestAndThrow will convert it to a Java AROexception object and then throw it. Otherwise, makeRequestAndThrow returns a AROincomingResponse object. If the request has any output parameters, you can retrieve them by calling the appropriate get*** methods of the AROincomingResponse object.

Examples of Client-Side Wrappers

class SomePhonyClass extends AROobject
{
    // This constructor knows how to get the one-and-only SomePhonyClass
    // object from the server, using the exported global ARO subroutine
    // GetPhonyObject.
    // In practice, you would never have both this kind of constructor
    // and the kind of constructor shown below.
    public SomePhonyClass (AROserver srvr)
    {
        super(srvr);
        AROoutgoingRequest req = new AROoutgoingRequest("GetPhonyObject");
        AROincomingResponse reply = rs.makeRequestAndThrow(req);
        this.setID(reply.getObject(0));		
    }

    // This constructor creates a Java object from an AROobjectID, which
    // must be obtained from some other ARO request.
    // In practice, you would never have both this kind of constructor
    // and the kind of constructor shown above.
    public AWindow (AROremoteServer rs, AROobjectID id)
    {
        super(rs, id);
    }

    // This example has no inputs or outputs.
    public void doSomethingTrivial ()
	    throws java.io.IOException, AROexception
    {
        AROoutgoingRequest req = new AROoutgoingRequest(this, "DoSomethingTrivial");
        server.makeRequestAndThrow(req);
    }

    // This example sends input parameters, but retrieves no output parameters
    public void paintText (String text, int x, int y)
	    throws java.io.IOException, AROexception
    {
        AROoutgoingRequest req = new AROoutgoingRequest(this, "PaintText");
        req.addString(text);
        req.addInteger(x);
        req.addInteger(y);
        server.makeRequestAndThrow(req);
    }

    // This example sends no input parameters, but retrieves one boolean output parameter
    public boolean amIalive ()
	    throws java.io.IOException, AROexception
    {
        AROoutgoingRequest req = new AROoutgoingRequest(this, "PaintText");
        AROincomingResponse reply = server.makeRequestAndThrow(req);
        return reply.getBoolean(0);
    }

    // This example uses both inputs and outputs.
    public String whatsUpDoc (Boolean fudd)
	    throws java.io.IOException, AROexception
    {
        AROoutgoingRequest req = new AROoutgoingRequest(this, "WhatsUpDoc");
        req.addBoolean(fudd);
        AROincomingResponse reply = server.makeRequestAndThrow(req);
        return reply.getString(0);
    }

    // This example sends an ARO object as an input parameter,
    // and retrieves another ARO object as an output parameter.
    // In this example, MyAROclass is derived from AROobject.
    public MyAROclass getSomething (MyAROclass input)
	    throws java.io.IOException, AROexception
    {
        AROoutgoingRequest req = new AROoutgoingRequest(this, "GetSomething");
        req.addObject(input);
        AROincomingResponse reply = server.makeRequestAndThrow(req);
        AROobjectID id = reply.getObject(0, "window");
        if (id == null)
            return null;
        return new MyAROclass(this.server, id);
    }
}

Revision History

4/5/01 Ed Stauff - made changes per review.

3/27/01 Ed Stauff - initial review.