public class Call extends HandleChain implements CallResource
Modifier and Type | Class and Description |
---|---|
private static class |
Call.ExtentCallParameter
A wrapper for extent parameters (without a subscript).
|
private static class |
Call.NativeCallParameter
A wrapper for parameters which will be passed to a direct native OS API call.
|
Modifier and Type | Field and Description |
---|---|
private character |
admData
The value of the ADM-DATA attribute.
|
private boolean |
async
The value of the ASYNCHRONOUS attribute.
|
private handle |
asyncHandle
The value of the ASYNC-REQUEST-HANDLE attribute.
|
private static java.util.Map<java.lang.Integer,java.lang.Integer> |
ATTRIBUTES_AND_METHODS
A cache of attributes and methods token types to their actual type.
|
private static int |
BEGIN_CALL_TYPE
The first value of valid call types.
|
private java.lang.String |
callName
The value of the CALL-NAME attribute.
|
private int |
callType
The value of the CALL-TYPE attribute.
|
private static java.util.Set<java.lang.String> |
DATA_TYPES
A cache of data types.
|
private static java.util.regex.Pattern |
dataTypePattern |
private boolean |
deleted
Flag indicating if this resource has been deleted or not.
|
static int |
DLL_CALL_TYPE
Constant mapping the legacy DLL-CALL-TYPE value.
|
private static int |
END_CALL_TYPE
The last value of valid call types.
|
private java.lang.String |
eventProcedure
The value of the EVENT-PROCEDURE attribute.
|
private handle |
eventProcedureContext
The value of the EVENT-PROCEDURE-CONTEXT attribute.
|
static int |
FUNCTION_CALL_TYPE
Constant mapping the legacy FUNCTION-CALL-TYPE value.
|
static int |
GET_ATTR_CALL_TYPE
Constant mapping the legacy GET-ATTR-CALL-TYPE value.
|
private handle |
inHandle
The value of the IN-HANDLE attribute.
|
private java.lang.String |
library
The value of the LIBRARY attribute.
|
private java.lang.String |
libraryCallingConvention
The value of the LIBRARY-CALLING-CONVENTION attribute.
|
(package private) static java.util.logging.Logger |
LOG
Logger
|
private int |
numParameters
The value of the NUM-PARAMETERS attribute.
|
private java.lang.Integer |
ordinal
The value of the ORDINAL attribute.
|
private CallParameter[] |
parameters
The list of configured parameters.
|
private boolean |
persistent
The value of the PERSISTENT attribute.
|
static int |
PROCEDURE_CALL_TYPE
Constant mapping the legacy PROCEDURE-CALL-TYPE value.
|
private java.lang.String |
procedureType
The value of the PROCEDURE-TYPE attribute.
|
private BaseDataType |
returnValue
The value of the RETURN-VALUE attribute.
|
private java.lang.String |
returnValueDataType
The value of the RETURN-VALUE-DATA-TYPE attribute.
|
private java.lang.String |
returnValueDllType
The value of the RETURN-VALUE-DLL-TYPE attribute.
|
private handle |
server
The value of the SERVER attribute.
|
static int |
SET_ATTR_CALL_TYPE
Constant mapping the legacy SET-ATTR-CALL-TYPE value.
|
private boolean |
singleRun
Flag indicating if this dynamic run will be emulated in SINGLE-RUN mode.
|
private boolean |
singleton
Flag indicating if this dynamic run will be emulated in SINGLETON mode.
|
private static java.util.Set<java.lang.String> |
SYS_HANDLES
A cache of system handle keywords.
|
private boolean |
threadSafe
The value of the THREAD-SAFE attribute.
|
private integer |
uniqueID
Corresponds to UNIQUE-ID attribute.
|
name, nextSibling, prevSibling
instProc
Modifier | Constructor and Description |
---|---|
private |
Call()
Create a new resource and
initialize it with the default values. |
Modifier and Type | Method and Description |
---|---|
private void |
accessAttributeOrMethod(boolean setter)
Worker method for the
GET_ATTR_CALL_TYPE and SET_ATTR_CALL_TYPE modes. |
private InvokeConfig |
buildInvokeConfig(boolean function)
Build an
configuration to emulate a RUN or dynamic function call, using
this CALL's configuration. |
private void |
callOrdinalError(java.lang.String attr)
Raise an ERROR condition when both the ORDINAL and CALL-NAME attributes are being set.
|
logical |
clear()
Returns the resource to its clear state.
|
static void |
create(handle h)
Create a new resource and assign it to the specified handle.
|
static void |
create(handle h,
character widgetPool)
Create a new resource and assign it to the specified handle.
|
static void |
create(handle h,
java.lang.String widgetPool)
Create a new resource and assign it to the specified handle.
|
static CallParameter |
createParameter(java.lang.String dataType,
CallMode mode,
java.lang.Object value,
boolean library,
boolean validateType)
Create a new parameter with the specified details, if at all possible.
|
(package private) static byte[] |
decimalBytes(decimal val)
Given a decimal value, convert it to a byte representation; this representation is assumed
as an 'in memory representation' of the value, usable for converting to another data type,
where:
rightmost bit is "0x8#", where "#" is the number of fractional digits in hex
concatenate the fractional and non-fractional digits
if there is an odd number of digits, pad with 'F'
|
character |
getADMData()
Get the value of the ADM-DATA attribute.
|
handle |
getAsyncHandle()
Get the
ASYNC-REQUEST-HANDLE attribute of this CALL resource. |
character |
getCallName()
Get the
CALL-NAME attribute of this CALL resource. |
integer |
getCallType()
Get the
CALL-TYPE attribute of this CALL resource. |
character |
getEventProcedure()
Get the
EVENT-PROCEDURE attribute of this async request. |
handle |
getEventProcedureContext()
Get the
EVENT-PROCEDURE-CONTEXT attribute of this async request. |
handle |
getInHandle()
Get the
IN-HANDLE attribute of this CALL resource. |
character |
getLibrary()
Get the
LIBRARY attribute of this CALL resource. |
character |
getLibraryCallingConvention()
Get the
LIBRARY-CALLING-CONVENTION attribute of this CALL resource. |
integer |
getNumParameters()
Get the
NUM-PARAMETERS attribute of this CALL resource. |
integer |
getOrdinal()
Get the
ORDINAL attribute of this CALL resource. |
character |
getProcedureType()
Get the
PROCEDURE-TYPE attribute of this CALL resource. |
BaseDataType |
getReturnValue()
Get the
RETURN-VALUE attribute of this CALL resource. |
character |
getReturnValueDataType()
Get the
RETURN-VALUE-DATA-TYPE attribute of this CALL resource. |
character |
getReturnValueDllType()
Get the
RETURN-VALUE-DLL-TYPE attribute of this CALL resource. |
handle |
getServerHandle()
Returns a handle to the app server in which the procedure is ran.
|
integer |
getUniqueID()
Gets the the unique ID number associated to this object by the
underlying system.
|
protected boolean |
hasName()
Check if this resource supports the NAME attribute.
|
protected boolean |
hasNameReadOnly()
Check if this resource supports the NAME attribute in read-only mode.
|
protected boolean |
hasNextSibling()
Check if this resource supports the NEXT-SIBLING attribute.
|
protected boolean |
hasParent(HandleChain parent)
Check if this resource has as parent the specified resource.
|
protected boolean |
hasPrevSibling()
Check if this resource supports the PREV-SIBLING attribute.
|
protected boolean |
implicitDeletion()
Check if the resource may be implicitly deleted.
|
void |
invoke()
Execute this dynamic invoke, based on the current CALL configuration.
|
private static boolean |
isAssignableFrom(object<? extends _BaseObject_>[] values,
java.lang.Class cls)
Check if all values in the array/extent are compatible with the given data type.
|
logical |
isAsync()
Get the
ASYNCHRONOUS attribute of this CALL resource. |
protected boolean |
isChained()
Check if this resource can be reported as chained.
|
logical |
isParameterSet(int paramNum)
Check if the specified parameter is set.
|
logical |
isParameterSet(NumberType paramNum)
Check if the specified parameter is set.
|
logical |
isPersistent()
Get the
persistent attribute of this procedure instance. |
logical |
isThreadSafe()
Get the
THREAD-SAFE attribute of this CALL resource. |
private static java.lang.String |
resolveDataType(java.lang.String dataType) |
protected boolean |
resourceDelete()
Worker to be implemented by each resource.
|
void |
setADMData(character value)
Set the value of the ADM-DATA attribute.
|
void |
setADMData(java.lang.String value)
Set the value of the ADM-DATA attribute.
|
void |
setAsync(boolean l)
Set the
ASYNCHRONOUS attribute of this CALL resource. |
void |
setAsync(logical l)
Set the
ASYNCHRONOUS attribute of this CALL resource. |
void |
setCallName(character callName)
Set the
CALL-NAME attribute of this CALL resource. |
void |
setCallName(java.lang.String callName)
Set the
CALL-NAME attribute of this CALL resource. |
void |
setCallType(int callType)
Set the
CALL-TYPE attribute of this CALL resource. |
void |
setCallType(NumberType callType)
Set the
CALL-TYPE attribute of this CALL resource. |
void |
setEventProcedure(character procName)
Set the
EVENT-PROCEDURE attribute of this async request. |
void |
setEventProcedure(java.lang.String procName)
Set the
EVENT-PROCEDURE attribute of this async request. |
void |
setEventProcedureContext(handle h)
Set the
EVENT-PROCEDURE-CONTEXT attribute of this async request. |
void |
setInHandle(character resource)
Set the
IN-HANDLE attribute of this CALL resource. |
void |
setInHandle(handle h)
Set the
IN-HANDLE attribute of this CALL resource. |
void |
setInHandle(java.lang.String resource)
Set the
IN-HANDLE attribute of this CALL resource. |
void |
setLibrary(character libName)
Set the
LIBRARY attribute of this CALL resource. |
void |
setLibrary(java.lang.String libName)
Set the
LIBRARY attribute of this CALL resource. |
void |
setLibraryCallingConvention(character libCall)
Set the
LIBRARY-CALLING-CONVENTION attribute of this CALL resource. |
void |
setLibraryCallingConvention(java.lang.String libCall)
Set the
LIBRARY-CALLING-CONVENTION attribute of this CALL resource. |
void |
setNumParameters(long num)
Set the
NUM-PARAMETERS attribute of this CALL resource. |
void |
setNumParameters(NumberType num)
Set the
NUM-PARAMETERS attribute of this CALL resource. |
void |
setOrdinal(int ordinal)
Set the
ORDINAL attribute of this CALL resource. |
void |
setOrdinal(NumberType ordinal)
Set the
ORDINAL attribute of this CALL resource. |
logical |
setParameter(int64 parmNum,
character dataType,
character ioMode,
java.lang.Object value)
Set the specified parameter for this dynamic invocation.
|
logical |
setParameter(int64 parmNum,
character dataType,
java.lang.String ioMode,
java.lang.Object value)
Set the specified parameter for this dynamic invocation.
|
logical |
setParameter(int64 parmNum,
java.lang.String dataType,
character ioMode,
java.lang.Object value)
Set the specified parameter for this dynamic invocation.
|
logical |
setParameter(int64 parmNum,
java.lang.String dataType,
java.lang.String ioMode,
java.lang.Object value)
Set the specified parameter for this dynamic invocation.
|
logical |
setParameter(long parmNum,
character dataType,
character ioMode,
java.lang.Object value)
Set the specified parameter for this dynamic invocation.
|
logical |
setParameter(long parmNum,
character dataType,
java.lang.String ioMode,
java.lang.Object value)
Set the specified parameter for this dynamic invocation.
|
logical |
setParameter(long parmNum,
java.lang.String dataType,
character ioMode,
java.lang.Object value)
Set the specified parameter for this dynamic invocation.
|
logical |
setParameter(long parmNum,
java.lang.String dataType,
java.lang.String ioMode,
java.lang.Object value)
Set the specified parameter for this dynamic invocation.
|
void |
setPersistent(boolean persistent)
Set the
persistent attribute of this CALL request. |
void |
setPersistent(logical persistent)
Set the
persistent attribute of this CALL request. |
void |
setProcedureType(character procType)
Set the
PROCEDURE-TYPE attribute of this CALL resource. |
void |
setProcedureType(java.lang.String procType)
Set the
PROCEDURE-TYPE attribute of this CALL resource. |
void |
setReturnValueDataType(character dataType)
Set the
RETURN-VALUE-DATA-TYPE attribute of this CALL resource. |
void |
setReturnValueDataType(java.lang.String dataType)
Set the
RETURN-VALUE-DATA-TYPE attribute of this CALL resource. |
void |
setReturnValueDllType(character dataType)
Set the
RETURN-VALUE-DLL-TYPE attribute of this CALL resource. |
void |
setReturnValueDllType(java.lang.String dataType)
Set the
RETURN-VALUE-DLL-TYPE attribute of this CALL resource. |
void |
setServerHandle(handle h)
Sets a handle for the app server in which the procedure will be ran.
|
void |
setThreadSafe(boolean threadSafe)
Set the
THREAD-SAFE attribute of this CALL resource. |
void |
setThreadSafe(logical threadSafe)
Set the
THREAD-SAFE attribute of this CALL resource. |
private void |
unableToSetAttribute(int err1,
java.lang.String msg1,
java.lang.String attr)
Raise an error that the attribute can't be set.
|
private void |
unknownWarning(java.lang.String attr)
Show a warning that the given attribute is unknown.
|
boolean |
valid()
Reports if this object is valid for use.
|
static boolean |
validDllType(java.lang.String dataType)
Check if the specified data-type is valid to be used via
SET-PARAMETER ,
for a native library API call. |
static boolean |
validOutputParameter(int pnum,
java.lang.Object value)
Verify if the given parameter value can be used in OUTPUT or INPUT-OUTPUT mode.
|
delete, firstResource, firstResource, getHead, getNextSibling, getNextSibling, getPrevSibling, getPrevSibling, getPrivateData, getTail, hasNameConstraints, hasPrivateData, interlink, lastResource, lastResource, moveInChain, name, name, name, readOnlyError, readOnlyError, setHead, setNextSibling, setNextSibling, setPrevSibling, setPrevSibling, setPrivateData, setPrivateData, setPrivateData, validateName
doDelete, getResourceType, id, id, incrementTrigger, instantiatingProcedure, invalidAttribute, processResource, registerResource, setInstantiatingProcedure, toString, type, unableToAssignUnknown, unknown
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getResourceType
id, id, unknown
public static final int PROCEDURE_CALL_TYPE
public static final int FUNCTION_CALL_TYPE
public static final int GET_ATTR_CALL_TYPE
public static final int SET_ATTR_CALL_TYPE
public static final int DLL_CALL_TYPE
static final java.util.logging.Logger LOG
private static final int BEGIN_CALL_TYPE
private static final int END_CALL_TYPE
private static final java.util.Map<java.lang.Integer,java.lang.Integer> ATTRIBUTES_AND_METHODS
private static final java.util.Set<java.lang.String> SYS_HANDLES
private static final java.util.Set<java.lang.String> DATA_TYPES
private static java.util.regex.Pattern dataTypePattern
private final character admData
private final integer uniqueID
private boolean deleted
private java.lang.String callName
private int callType
private handle inHandle
private int numParameters
private BaseDataType returnValue
private java.lang.String returnValueDataType
private handle server
private boolean persistent
private boolean singleRun
private boolean singleton
private java.lang.String procedureType
private boolean threadSafe
private boolean async
private handle asyncHandle
private java.lang.String eventProcedure
private handle eventProcedureContext
private java.lang.Integer ordinal
private java.lang.String library
private java.lang.String returnValueDllType
private java.lang.String libraryCallingConvention
private CallParameter[] parameters
NUM-PARAMETERS
attribute is set.private Call()
initialize
it with the default values.public static void create(handle h)
h
- The handle where to save the resource. Must be not-null.public static void create(handle h, character widgetPool)
If a widget pool is not specified, then the resource will be added to the SESSION pool, and not the closest unnamed pool.
h
- The handle where to save the resource. Must be not-null.widgetPool
- The named widget pool where to save the widget. If null
, the SESSION
widget pool will be used.public static void create(handle h, java.lang.String widgetPool)
If a widget pool is not specified, then the resource will be added to the SESSION pool, and not the closest unnamed pool.
h
- The handle where to save the resource. Must be not-null.widgetPool
- The named widget pool where to save the widget. If null
, the SESSION
widget pool will be used.public character getADMData()
getADMData
in interface ADMData
public void setADMData(java.lang.String value)
setADMData
in interface ADMData
value
- The new value.public void setADMData(character value)
setADMData
in interface ADMData
value
- The new value.public integer getUniqueID()
getUniqueID
in interface UniqueID
public boolean valid()
valid
in interface WrappedResource
true
if we are valid (can be used).public logical isPersistent()
persistent
attribute of this procedure instance.isPersistent
in interface PersistableProcedure
public void setPersistent(boolean persistent)
persistent
attribute of this CALL request.setPersistent
in interface PersistableProcedure
persistent
- The flag indicating how the call will be performed.public void setPersistent(logical persistent)
persistent
attribute of this CALL request.setPersistent
in interface PersistableProcedure
persistent
- The flag indicating how the call will be performed.public handle getServerHandle()
getServerHandle
in interface Remotable
public void setServerHandle(handle h)
setServerHandle
in interface Remotable
h
- The server handle.public character getCallName()
CALL-NAME
attribute of this CALL resource.getCallName
in interface CallResource
public void setCallName(character callName)
CALL-NAME
attribute of this CALL resource.setCallName
in interface CallResource
callName
- The target's name (attribute, method, RUN's invoke target, native API).public void setCallName(java.lang.String callName)
CALL-NAME
attribute of this CALL resource.setCallName
in interface CallResource
callName
- The target's name (attribute, method, RUN's invoke target, native API).public integer getCallType()
CALL-TYPE
attribute of this CALL resource.getCallType
in interface CallResource
public void setCallType(NumberType callType)
CALL-TYPE
attribute of this CALL resource.setCallType
in interface CallResource
callType
- One of the call-type constant values.public void setCallType(int callType)
CALL-TYPE
attribute of this CALL resource.setCallType
in interface CallResource
callType
- One of the call-type constant values.public logical isParameterSet(NumberType paramNum)
isParameterSet
in interface CallResource
paramNum
- The 1-based parameter index.true
if the parameter is set.public logical isParameterSet(int paramNum)
isParameterSet
in interface CallResource
paramNum
- The 1-based parameter index.true
if the parameter is set.public integer getNumParameters()
NUM-PARAMETERS
attribute of this CALL resource.getNumParameters
in interface CallResource
public void setNumParameters(NumberType num)
NUM-PARAMETERS
attribute of this CALL resource.setNumParameters
in interface CallResource
num
- The number of parameters.public void setNumParameters(long num)
NUM-PARAMETERS
attribute of this CALL resource.setNumParameters
in interface CallResource
num
- The number of parameters.public handle getInHandle()
IN-HANDLE
attribute of this CALL resource.getInHandle
in interface CallResource
public void setInHandle(handle h)
IN-HANDLE
attribute of this CALL resource.setInHandle
in interface CallResource
h
- The external program where the target function/procedure will be invoked or the
resource for which the attribute/method will be accessed.public void setInHandle(character resource)
IN-HANDLE
attribute of this CALL resource.setInHandle
in interface CallResource
resource
- The external program where the target function/procedure will be invoked or the
resource for which the attribute/method will be accessed.public void setInHandle(java.lang.String resource)
IN-HANDLE
attribute of this CALL resource.setInHandle
in interface CallResource
resource
- The external program where the target function/procedure will be invoked or the
resource for which the attribute/method will be accessed.public character getProcedureType()
PROCEDURE-TYPE
attribute of this CALL resource.getProcedureType
in interface CallResource
public void setProcedureType(character procType)
PROCEDURE-TYPE
attribute of this CALL resource.setProcedureType
in interface CallResource
procType
- The procedure's type, one of PERSISTENT, SINGLE-RUN or SINGLETON strings.public void setProcedureType(java.lang.String procType)
PROCEDURE-TYPE
attribute of this CALL resource.setProcedureType
in interface CallResource
procType
- The procedure's type, one of PERSISTENT, SINGLE-RUN or SINGLETON strings.public logical isThreadSafe()
THREAD-SAFE
attribute of this CALL resource.isThreadSafe
in interface CallResource
public void setThreadSafe(logical threadSafe)
THREAD-SAFE
attribute of this CALL resource.setThreadSafe
in interface CallResource
threadSafe
- The new state of this flag.public void setThreadSafe(boolean threadSafe)
THREAD-SAFE
attribute of this CALL resource.setThreadSafe
in interface CallResource
threadSafe
- The new state of this flag.public BaseDataType getReturnValue()
RETURN-VALUE
attribute of this CALL resource.getReturnValue
in interface CallResource
public character getReturnValueDataType()
RETURN-VALUE-DATA-TYPE
attribute of this CALL resource.getReturnValueDataType
in interface CallResource
public void setReturnValueDataType(character dataType)
RETURN-VALUE-DATA-TYPE
attribute of this CALL resource.setReturnValueDataType
in interface CallResource
dataType
- The return type for the next call.public void setReturnValueDataType(java.lang.String dataType)
RETURN-VALUE-DATA-TYPE
attribute of this CALL resource.setReturnValueDataType
in interface CallResource
dataType
- The return type for the next call.public character getLibrary()
LIBRARY
attribute of this CALL resource.getLibrary
in interface CallResource
public void setLibrary(character libName)
LIBRARY
attribute of this CALL resource.setLibrary
in interface CallResource
libName
- The native library name.public void setLibrary(java.lang.String libName)
LIBRARY
attribute of this CALL resource.setLibrary
in interface CallResource
libName
- The native library name.public character getLibraryCallingConvention()
LIBRARY-CALLING-CONVENTION
attribute of this CALL resource.getLibraryCallingConvention
in interface CallResource
public void setLibraryCallingConvention(character libCall)
LIBRARY-CALLING-CONVENTION
attribute of this CALL resource.setLibraryCallingConvention
in interface CallResource
libCall
- The library's calling convention, CDECL or STDCALL.public void setLibraryCallingConvention(java.lang.String libCall)
LIBRARY-CALLING-CONVENTION
attribute of this CALL resource.setLibraryCallingConvention
in interface CallResource
libCall
- The library's calling convention, CDECL or STDCALL.public integer getOrdinal()
ORDINAL
attribute of this CALL resource.getOrdinal
in interface CallResource
public void setOrdinal(NumberType ordinal)
ORDINAL
attribute of this CALL resource.setOrdinal
in interface CallResource
ordinal
- The native API ordinal, if CALL-NAME is not specified.public void setOrdinal(int ordinal)
ORDINAL
attribute of this CALL resource.setOrdinal
in interface CallResource
ordinal
- The native API ordinal, if CALL-NAME is not specified.public character getReturnValueDllType()
RETURN-VALUE-DLL-TYPE
attribute of this CALL resource.getReturnValueDllType
in interface CallResource
public void setReturnValueDllType(character dataType)
RETURN-VALUE-DLL-TYPE
attribute of this CALL resource.setReturnValueDllType
in interface CallResource
dataType
- The return type for the next native API call.public void setReturnValueDllType(java.lang.String dataType)
RETURN-VALUE-DLL-TYPE
attribute of this CALL resource.setReturnValueDllType
in interface CallResource
dataType
- The return type for the next native API call.public logical isAsync()
ASYNCHRONOUS
attribute of this CALL resource.isAsync
in interface CallResource
public void setAsync(logical l)
ASYNCHRONOUS
attribute of this CALL resource.setAsync
in interface CallResource
l
- The new state of this flag.public void setAsync(boolean l)
ASYNCHRONOUS
attribute of this CALL resource.setAsync
in interface CallResource
l
- The new state of this flag.public handle getAsyncHandle()
ASYNC-REQUEST-HANDLE
attribute of this CALL resource.getAsyncHandle
in interface CallResource
public character getEventProcedure()
EVENT-PROCEDURE
attribute of this async request.getEventProcedure
in interface EventProcedure
public void setEventProcedure(character procName)
EVENT-PROCEDURE
attribute of this async request.setEventProcedure
in interface EventProcedure
procName
- The procedure name.public void setEventProcedure(java.lang.String procName)
EVENT-PROCEDURE
attribute of this async request.setEventProcedure
in interface EventProcedure
procName
- The procedure name.public handle getEventProcedureContext()
EVENT-PROCEDURE-CONTEXT
attribute of this async request.getEventProcedureContext
in interface EventProcedure
public void setEventProcedureContext(handle h)
EVENT-PROCEDURE-CONTEXT
attribute of this async request.setEventProcedureContext
in interface EventProcedure
h
- The procedure handle.public logical clear()
public void invoke()
The dynamic invoke will be delegated to accessAttributeOrMethod(boolean)
in case of
GET_ATTR_CALL_TYPE
and SET_ATTR_CALL_TYPE
modes.
For PROCEDURE_CALL_TYPE
and FUNCTION_CALL_TYPE
, the call will be delegated
to ControlFlowOps.invoke(InvokeConfig)
, which in turn will relies on the normal
ControlFlowOps
APIs to perform the call. If the PROCEDURE_CALL_TYPE
mode
is used and the target is resolved as an PROCEDURE ... EXTERNAL
, then this
will still be invoked using the RUN emulated call.
The DLL_CALL_TYPE
mode will rely on the
NativeInvoker.invoke(NativeAPIEntry, boolean, String, Class[], String, Object...)
:
this will use a synthetic NativeAPIEntry
, which will be configured as if a
PROCEDURE ... EXTERNAL
was defined in the 4GL code, using the current
CALL's
configuration. The actual invoke will bypass the ControlFlowOps
APIs for this mode.
invoke
in interface CallResource
public logical setParameter(int64 parmNum, character dataType, character ioMode, java.lang.Object value)
setParameter
in interface CallResource
parmNum
- The 1-based parameter index.dataType
- The parameter's data type.ioMode
- The parameter's mode (INPUT, OUTPUT, INPUT-OUTPUT, with -APPEND or -BY-REFERENCE
suffix).value
- The argument's value. Can be only a variable/field-ref or extent, if mode is
OUTPUT or INPUT-OUTPUT.true
if the parameter was set successfully.public logical setParameter(long parmNum, character dataType, character ioMode, java.lang.Object value)
setParameter
in interface CallResource
parmNum
- The 1-based parameter index.dataType
- The parameter's data type.ioMode
- The parameter's mode (INPUT, OUTPUT, INPUT-OUTPUT, with -APPEND or -BY-REFERENCE
suffix).value
- The argument's value. Can be only a variable/field-ref or extent, if mode is
OUTPUT or INPUT-OUTPUT.true
if the parameter was set successfully.public logical setParameter(int64 parmNum, java.lang.String dataType, character ioMode, java.lang.Object value)
setParameter
in interface CallResource
parmNum
- The 1-based parameter index.dataType
- The parameter's data type.ioMode
- The parameter's mode (INPUT, OUTPUT, INPUT-OUTPUT, with -APPEND or -BY-REFERENCE
suffix).value
- The argument's value. Can be only a variable/field-ref or extent, if mode is
OUTPUT or INPUT-OUTPUT.true
if the parameter was set successfully.public logical setParameter(long parmNum, java.lang.String dataType, character ioMode, java.lang.Object value)
setParameter
in interface CallResource
parmNum
- The 1-based parameter index.dataType
- The parameter's data type.ioMode
- The parameter's mode (INPUT, OUTPUT, INPUT-OUTPUT, with -APPEND or -BY-REFERENCE
suffix).value
- The argument's value. Can be only a variable/field-ref or extent, if mode is
OUTPUT or INPUT-OUTPUT.true
if the parameter was set successfully.public logical setParameter(int64 parmNum, character dataType, java.lang.String ioMode, java.lang.Object value)
setParameter
in interface CallResource
parmNum
- The 1-based parameter index.dataType
- The parameter's data type.ioMode
- The parameter's mode (INPUT, OUTPUT, INPUT-OUTPUT, with -APPEND or -BY-REFERENCE
suffix).value
- The argument's value. Can be only a variable/field-ref or extent, if mode is
OUTPUT or INPUT-OUTPUT.true
if the parameter was set successfully.public logical setParameter(long parmNum, character dataType, java.lang.String ioMode, java.lang.Object value)
setParameter
in interface CallResource
parmNum
- The 1-based parameter index.dataType
- The parameter's data type.ioMode
- The parameter's mode (INPUT, OUTPUT, INPUT-OUTPUT, with -APPEND or -BY-REFERENCE
suffix).value
- The argument's value. Can be only a variable/field-ref or extent, if mode is
OUTPUT or INPUT-OUTPUT.true
if the parameter was set successfully.public logical setParameter(int64 parmNum, java.lang.String dataType, java.lang.String ioMode, java.lang.Object value)
setParameter
in interface CallResource
parmNum
- The 1-based parameter index.dataType
- The parameter's data type.ioMode
- The parameter's mode (INPUT, OUTPUT, INPUT-OUTPUT, with -APPEND or -BY-REFERENCE
suffix).value
- The argument's value. Can be only a variable/field-ref or extent, if mode is
OUTPUT or INPUT-OUTPUT.true
if the parameter was set successfully.public logical setParameter(long parmNum, java.lang.String dataType, java.lang.String ioMode, java.lang.Object value)
setParameter
in interface CallResource
parmNum
- The 1-based parameter index.dataType
- The parameter's data type.ioMode
- The parameter's mode (INPUT, OUTPUT, INPUT-OUTPUT, with -APPEND or -BY-REFERENCE
suffix).value
- The argument's value. Can be only a variable/field-ref or extent, if mode is
OUTPUT or INPUT-OUTPUT.true
if the parameter was set successfully.protected boolean hasName()
hasName
in class HandleChain
false
.protected boolean hasNameReadOnly()
hasNameReadOnly
in class HandleChain
false
.protected boolean isChained()
isChained
in class HandleChain
false
.protected boolean hasNextSibling()
hasNextSibling
in class HandleChain
false
.protected boolean hasPrevSibling()
hasPrevSibling
in class HandleChain
false
.protected boolean hasParent(HandleChain parent)
hasParent
in class HandleChain
parent
- The parent for which the first child is needed. If null
, the first
resource with no parent set is returned.false
.protected boolean resourceDelete()
HandleChain.delete()
.resourceDelete
in class HandleResource
true
if the resource was deleted.protected boolean implicitDeletion()
implicitDeletion
in class HandleResource
false
.public static boolean validDllType(java.lang.String dataType)
SET-PARAMETER
,
for a native library API call.dataType
- The data type to be validated.true
if this is a valid data type.public static boolean validOutputParameter(int pnum, java.lang.Object value)
pnum
- The parameter number.value
- The parameter's value.true
if the value can be used.public static CallParameter createParameter(java.lang.String dataType, CallMode mode, java.lang.Object value, boolean library, boolean validateType)
If validation fails (invalid data type, mode or value combinations), then a null
value will be returned.
When calling external dynamic/shared library routine parameter data type is validated for
supported external data types.
SetParameter method in ParametersList does an extra validation on input value against data type.
dataType
- The data type to be used.mode
- The parameter's mode.value
- The parameter's value.library
- Flag set to true if a dynamic/shared library routine is invoked.validateType
- Optional data type validationinstance
with the parameter configuration.private static boolean isAssignableFrom(object<? extends _BaseObject_>[] values, java.lang.Class cls)
values
- The values array (extent).cls
- The data type to validate values against.private void accessAttributeOrMethod(boolean setter)
GET_ATTR_CALL_TYPE
and SET_ATTR_CALL_TYPE
modes.
It will try to access the attribute or method, using the current configuration.
setter
- When true
, we are in SET_ATTR_CALL_TYPE
mode, and only
writable attributes are accessed; otherwise, all readable attributes and methods.private void unknownWarning(java.lang.String attr)
attr
- The attribute name.private void callOrdinalError(java.lang.String attr)
attr
- The attribute being set.private void unableToSetAttribute(int err1, java.lang.String msg1, java.lang.String attr)
err1
- The first error code.msg1
- The first error message.attr
- The attribute's name.private InvokeConfig buildInvokeConfig(boolean function)
configuration
to emulate a RUN or dynamic function call, using
this CALL's configuration.
This can be later used to perform the actual invoke
.
function
- Flag indicating if this is a function call.private static java.lang.String resolveDataType(java.lang.String dataType)
static byte[] decimalBytes(decimal val)
val
- The decimal value.