Progress
Open Client
Developer’s Guide


SubAppObjects

Each SubAppObject represents the encapsulation of a particular business function deployed at a particular AppServer. It differs from an AppObject only in the fact that it does not establish its own connection to an AppServer but shares the one from its associated AppObject.

The associated AppObject defines a class factory method for creating each SubAppObject that shares its AppServer connection. This method exchanges no communications with the AppServer. Rather, it only performs operations to instantiate the SubAppObject on the client.

Methods

A SubAppObject has the following types of methods:

Example Java SubAppObject

Example 4–2 shows a partial sample Java class definition for a SubAppObject, Tax. This proxy contains a Remote 4GL method to run SetStatus.p and a Class Factory method that runs TaxInfo.p on the AppServer persistently.

Java SubAppObject
public class Tax
{
  // ------------------------Remote 4GL Methods---------------------------

  public void SetStatus(int status) {}   // runs SetStatus.p 

  // -------------------ProcObject Class Factory Methods------------------

  public TaxInfo createPO_TaxInfo (int accountNum) 
         throws Open4GLException, NotRunException, RunTime4GLException, 
         SystemErrorException  {}  // Runs TaxInfo.p persistently

  public SDOResultSet _createSDOResultSet(String procName)
         throws Open4GLException, ProSQLException {}
  public SDOResultSet _createSDOResultSet(String procName, 
         String whereClause, String sortBy)
         throws Open4GLException, ProSQLException {}
  public SDOResultSet _createSDOResultSet(String procName, 
         String whereClause, String sortBy, SDOPameters params)
         throws Open4GLException, ProSQLException {}

  // --------------------------Common Methods-----------------------------

  public void _cancelAllRequests() throws Open4GLException {}
  public String _getConnectionId() throws Open4GLException {}
  public String _getProcReturnString() {}
  public boolean _isStreaming() throws Open4GLException {}
  public void _release() {}
} 

Example 4–2: Java Tax Class

For more information on the three types of methods in a SubAppObject, see the "Understanding Proxy Object Methods" section in this chapter.

Example ActiveX SubAppObject

The following Visual Basic subroutines and functions comprise the definition for a sample ActiveX SubAppObject, Tax, where each method appears as it is displayed by the VB Object Browser:

For more information on the three types of methods in a SubAppObject, see the "Understanding Proxy Object Methods" section in this chapter.


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095