Package com.sap.conn.jco
Interface JCoFunctionUnit
public interface JCoFunctionUnit
The interface comprises public methods to work with function unit.
Function unit is used as function container in bgRFC calls. It contains one or more functions and may defines queues
to ensure execution order.
Note: The implementation for this interface provided by the JCo runtime. Other implementations are not supported.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addFunction
(JCoFunction function) Adds a function to the unit.void
addFunctions
(List<JCoFunction> functions) Adds the functions to the unit.boolean
addQueueName
(String queueName) Adds a queue name.boolean
addQueueNames
(Set<String> queueNames) Adds the given queue names.void
commit
(JCoDestination destination) Commits the unit.Returns an immutable list of function.Return the unique identifier for the function unit.Returns an immutable copy of the list containing the queue names.
-
Method Details
-
getIdentifier
JCoUnitIdentifier getIdentifier()Return the unique identifier for the function unit.- Returns:
- the unit identifier
-
addQueueName
Adds a queue name.- Parameters:
queueName
- name of the queue- Returns:
- true, if the queue name is added, false if the name is already in the list
- Throws:
JCoRuntimeException
- if the unit is being modified after commitJCoRuntimeException
- if the queue name is not allowed. Allowed are queue names [A-Z]([A-Z]|[0-9]|_)* only.
-
addQueueNames
Adds the given queue names.- Parameters:
queueNames
- set of the queue names to add- Returns:
- true, if all queue names are added, false if a name is already in the list
- Throws:
JCoRuntimeException
- if the unit is being modified after commitJCoRuntimeException
- if a queue name in the list is not allowed. Allowed are queue names [A-Z]([A-Z]|[0-9]|_)* only.
-
getQueueNames
Returns an immutable copy of the list containing the queue names.- Returns:
- the list of the queue names
-
addFunction
Adds a function to the unit.
Note: the function shall not be changed before commit.- Parameters:
function
- function to be added to the function unit- Throws:
JCoRuntimeException
- if the unit is being modified after commit
-
addFunctions
Adds the functions to the unit.
Note: the functions shall not be changed before commit.- Parameters:
functions
- list of functions to be added to the function unit- Throws:
JCoRuntimeException
- if the unit is being modified after commit
-
getFunctions
List<JCoFunction> getFunctions()Returns an immutable list of function.- Returns:
- the list of the functions
-
commit
Commits the unit. After commit the unit cannot be changed. It is allowed to invoke commit more than once in case of exceptions.- Parameters:
destination
- to which the unit has to be send- Throws:
JCoException
- if transmission or processing on the remote side fails
-