com.sap.conn.jco
Interface JCoRequestUnit


public interface JCoRequestUnit

The interface comprises public methods to work with request unit. Request unit is used as function container in bgRFC calls, where each function represented by JCoRequest. The request unit 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
 boolean addQueueName(java.lang.String queueName)
          Adds a queue name
 boolean addQueueNames(java.util.Set<java.lang.String> queueNames)
          Adds the given queue names
 void addRequest(JCoRequest request)
          Adds a request to the unit.
 void addRequests(java.util.List<JCoRequest> requests)
          Adds the request to the unit.
 void commit(JCoDestination destination)
          Commits the unit.
 JCoUnitIdentifier getIdentifier()
          Return the unique identifier for the function unit
 java.util.Set<java.lang.String> getQueueNames()
          Returns an immutable copy of the list containing the queue names
 java.util.List<JCoRequest> getRequests()
          Returns an immutable list of function
 

Method Detail

getIdentifier

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

Returns:
the unit identifier

addQueueName

boolean addQueueName(java.lang.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(java.util.Set<java.lang.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

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

Returns:
the list of the queue names

addRequest

void addRequest(JCoRequest request)
Adds a request to the unit.
Note: the request shall not be changed before commit.

Parameters:
request - request to be added to the unit
Throws:
JCoRuntimeException - if the unit is being modified after commit

addRequests

void addRequests(java.util.List<JCoRequest> requests)
Adds the request to the unit.
Note: the request shall not be changed before commit.

Parameters:
requests - list of requests to be added to the unit
Throws:
JCoRuntimeException - if the unit is being modified after commit

getRequests

java.util.List<JCoRequest> getRequests()
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 © 2008-2014 SAP AG. All Rights Reserved.