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
 void 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.
 List<JCoFunction> getFunctions()
          Returns an immutable list of function.
 JCoUnitIdentifier getIdentifier()
          Return the unique identifier for the function unit.
 Set<String> getQueueNames()
          Returns an immutable copy of the list containing the queue names.
 

Method Detail

getIdentifier

JCoUnitIdentifier getIdentifier()
Return the unique identifier for the function unit.

Returns:
the unit identifier

addQueueName

boolean addQueueName(String queueName)
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 commit
JCoRuntimeException - if the queue name is not allowed. Allowed are queue names [A-Z]([A-Z]|[0-9]|_)* only.

addQueueNames

boolean addQueueNames(Set<String> queueNames)
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 commit
JCoRuntimeException - if a queue name in the list is not allowed. Allowed are queue names [A-Z]([A-Z]|[0-9]|_)* only.

getQueueNames

Set<String> getQueueNames()
Returns an immutable copy of the list containing the queue names.

Returns:
the list of the queue names

addFunction

void addFunction(JCoFunction function)
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

void addFunctions(List<JCoFunction> functions)
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

void commit(JCoDestination destination)
            throws JCoException
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


Copyright © 2015 SAP. All Rights Reserved.