Package sk.ipesoft.d2000.d2japi.utils
Class RpcParameterTypeFactory
- java.lang.Object
-
- sk.ipesoft.d2000.d2japi.utils.RpcParameterTypeFactory
-
public class RpcParameterTypeFactory extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description RpcParameterTypeFactory()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static RpcParameterType
createParameter(boolean inout, int structureDefinitionHobj)
Create new instance ofRpcParameterType
for unival record type.static RpcParameterType
createParameter(boolean inout, sk.ipesoft.d2000.base.UnivalType type)
Create new instance ofRpcParameterType
for simple type.static boolean
equalsTypes(RpcParameterType[] one, RpcParameterType[] two)
Compares arraysone
andtwo
and returnstrue
when same.static RpcParameterType[]
toParameterTypes(boolean inOut, sk.ipesoft.d2000.base.UnivalValue<?>[] values)
Convert array of univals into array of parameter types.
-
-
-
Method Detail
-
createParameter
public static RpcParameterType createParameter(boolean inout, sk.ipesoft.d2000.base.UnivalType type)
Create new instance ofRpcParameterType
for simple type.- Parameters:
inout
-true
for IN OUT parameter,false
for IN parametertype
- type of parameter.- Returns:
- new instance
-
createParameter
public static RpcParameterType createParameter(boolean inout, int structureDefinitionHobj)
Create new instance ofRpcParameterType
for unival record type.- Parameters:
inout
-true
for IN OUT parameter,false
for IN parameterstructureDefinitionHobj
- HOBJ of structure definition or zero for anonymous RECORD NOALIAS parameter- Returns:
- new instance
-
equalsTypes
public static boolean equalsTypes(RpcParameterType[] one, RpcParameterType[] two)
Compares arraysone
andtwo
and returnstrue
when same.- Parameters:
one
-two
-- Returns:
-
toParameterTypes
public static RpcParameterType[] toParameterTypes(boolean inOut, sk.ipesoft.d2000.base.UnivalValue<?>[] values)
Convert array of univals into array of parameter types. Used by implementations ofExecRPCListener.onRPCCalledEvent(sk.ipesoft.d2000.d2japi.RPCCallEvent)
to distinguish various overloads of RPC.- Parameters:
inOut
- allRpcParameterType.isInOut()
will have this valuevalues
- array of univals- Returns:
- array of new instances
-
-