Progress
Open Client
Developer’s Guide


ProcObjects

Each ProcObject represents a particular persistent procedure running on an AppServer. The ProcObject exposes all non-PRIVATE internal procedures and user-defined functions to the client that you do not explicitly omit in ProxyGen when you define the ProcObject.

A ProcObject also shares a connection established by an associated AppObject. You can create the ProcObject using a class factory method on the AppObject or SubAppObject to which this procedure was added in ProxyGen

When you call the ProcObject class factory method on the AppObject or SubAppObject, it creates the ProcObject on the client and executes the corresponding procedure persistently on the AppServer. Any parameters required by this procedure are required as parameters on the class factory method. The ProcObject saves a handle to the persistent procedure for future calls to its internal procedures and functions and for releasing and disconnecting the object from the AppServer application.

Methods

A ProcObject has the following types of methods:

Example Java ProcObject

Example 4–3 shows a partial sample Java class definition for a ProcObject, AccountInfo. This proxy contains Remote 4GL methods to run getPaymentsInfo(), setDirectDeposit(), and getDirectDeposit() on the AppServer.

Java ProcObject
public class AccountInfo
{
  // ------------------------Remote 4GL Methods---------------------------

  public void getPaymentsInfo(Date fromDate, ResultSet payeeList,
         int paymentsNum, ResultSet paymentsInfo) {}
                            // runs internal proc getPaymentsInfo()
  public void setDirectDeposit(ResultSet ddData) {} 
                            // runs internal proc setDirectDeposit()
  public void getDirectDeposit(ResultSetHolder ddData) {}
                            // runs internal proc getDirectDeposit()

  // --------------------------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–3: Java AccountInfo Class

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

Example ActiveX ProcObject

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

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

For information on TEMP-TABLE parameters, first see the "Passing TEMP-TABLE And TABLE-HANDLE Parameters" in this chapter and then in Programming ActiveX Controller Clients."


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