Interface part in EGL source format

For an overview of interfaces, see EGL interfaces. You can declare interfaces in an EGL source file, which is described in EGL source format.

The syntax diagram for an Interface part is here:

Syntax diagram for an Interface part
Interface interfacePartName ... end
Identifies the part as an interface and specifies the part name. For the rules of naming, see Naming conventions.
extendsextendedInterfaceName
Indicates that the interface inherits the functions of each of the other named interfaces and of any interfaces that the named interfaces were extended from, to any level of inheritance.

If a function description in the interface has the same name as an inherited function description, the function description in the interface overrides the inherited description.

An interface can inherit more than one function having the same argument list; but a compile-time error occurs if two such functions have different return types or if one has a return type and the other does not.

An interface can extend interfaces only of the same subtype; an interface of type JavaObject, for example, cannot extend an interface of type BasicInterface.

subtype
One of these subtypes:
BasicInterface (the default)
For accessing services
JavaObject
For accessing Java™ code
PropertyList
List of properties. For details, see the topic of interest:
  • Interfaces of type BasicInterface
  • Interfaces of type JavaObject
static
Indicates that the function is not specific to a variable of type Interface but can be invoked as follows:
  interfaceName.functionName
interfaceName
Name of the Interface part.
functionName
Name of the function.
functionName
Name of the function as used in EGL code.
parmList
Each parameter, type, and modifier (IN, OUT, or INOUT), with one entry separated from the next by a comma.

If you are creating an interface of type JavaObject, a parameter can be of type BOOLEAN, and the built-in EGL interface BooleanLib allows you to convert between Boolean and integer values. For details, see Interfaces of type JavaObject.

When an EGL wizard creates an interface of type BasicInterface to access a Web service that returns an array or record (as is possible when the service is written in a language other than EGL), no return value is specified; instead, the wizard acts as follows:
  • Adds a parameter to the end of the parameter list, specifying the type of the return value and including the OUT modifier; and
  • Sets the @WSDL property, field isLastParamReturnValue to yes.
returns (returnType)
Describes the data (if any) that the function returns to the invoker.

In an interface of type JavaObject, the return type can be BOOLEAN, and the built-in EGL interface BooleanLib allows you to convert between Boolean and integer values. For details, see Interfaces of type JavaObject.

When an EGL wizard creates an interface of type BasicInterface to access a Web service that returns an array or record (as is possible when the service is written in a language other than EGL), no return value is specified; instead, the wizard acts as follows:
  • Adds a parameter to the end of the parameter list, specifying the type of the return value and including the OUT modifier; and
  • Sets the @WSDL property, field isLastParamReturnValue to yes.
functionDescriptionProperties
The following properties are supported:
@WSDL
Allows EGL to extract data from the Web Service Description Language (WSDL) definition for use in interacting with the Java JAX-RPC runtime code. The @WSDL property fields and their types are as follows:
elementName String
If this property field is present, the value must exactly match the name in the WSDL operation element for the service that is being accessed by the interface. If the property field is not present, the name of the Interface part must exactly match the name in the WSDL operation element. In either case, the match is case sensitive: for example, the name myFunction is different from MYFUNCTION.
namespace String
This property field is ignored in the context of a function description.
isLastParamReturnValue BooleanKind
Indicates whether the last parameter in parmList refers to the function's return value. The default is no, which means that the last parameter in the function description refers to the last parameter in the function itself.
When an EGL wizard creates an interface of type BasicInterface to access a Web service that returns an array or record (as is possible when the service is written in a language other than EGL), no return value is specified; instead, the wizard acts as follows:
  • Adds a parameter to the end of the parameter list, specifying the type of the return value and including the OUT modifier; and
  • Sets the @WSDL property, field isLastParamReturnValue to yes.
JavaName STRING
Specifies the name of the Java method associated with the EGL function description. The default is the function name; but the property is useful if the Java name includes characters that are not valid in EGL. For details on validity, see Naming conventions.

To use an interface, you must specify the package com.ibm.egl.jsf.

Related concepts
EGL interfaces

Related tasks
Creating an EGL Interface part

Related reference
Interfaces of type BasicInterface
Interfaces of type JavaObject

Feedback
(C) Copyright IBM Corporation 2000, 2005. All Rights Reserved.