Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.openspml.message
Class BatchRequest

    java.lang.Object
      |
      +--org.openspml.message.SpmlRequest
            |
            +--org.openspml.message.BatchRequest

public class BatchRequest
extends SpmlRequest
implements Constants

A class representing a collection of SPML requests to be executed as a batch.

This contains a list of SpmlRequest objects, an indication of whether parallel or serial execution is desired, and an indication of whether the batch should continue after errors in one request.

Field Summary
`static java.lang.String` | `ON_ERROR_EXIT`
`static java.lang.String` | `ON_ERROR_RESUME`
`static java.lang.String` | `PROC_PARALLEL`
`static java.lang.String` | `PROC_SEQUENTIAL`

Fields inherited from class org.openspml.message.SpmlRequest
`EXEC_ASYNCHRONOUS, EXEC_SYNCHRONOUS`

Fields inherited from interface org.openspml.message.Constants
`ACTION_PREFIX, ENUM_PREFIX`

Constructor Summary
`BatchRequest()` Create a new batch request.

Method Summary
`void` | `addRequest(SpmlRequest r)` Add one request to the batch.
`SpmlResponse` | `createResponse()` Build an empty SpmlRequest object that corresponds to this request.
`Attribute` | `getAttribute(java.lang.String name)` Lookup a batch attribute by name.
`java.util.List` | `getAttributes()` Get the list of batch attributes.
`java.lang.Object` | `getAttributeValue(java.lang.String name)` Lookup a batch attribute by name.
`java.lang.String` | `getElementName()` Return the tag name for the request element.
`java.util.List` | `getRequests()` Get the list of requests in the batch.
`boolean` | `isOnErrorResume()` Returns true if the batch is to continue even if individual requests have errors.
`boolean` | `isParallel()` Returns true if parallel execution is desired.
`void` | `setAttribute(Attribute a)` Set one batch attribute.
`void` | `setAttribute(java.lang.String name, java.lang.Object value)` Set one batch attribute.
`void` | `setAttributes(java.util.List l)` Set a collection of attribute that applies to the batch .
`void` | `setOnErrorResume(boolean b)` Specify whether the batch should terminate as soon as one request has an error, or whether the batch should continue.
`void` | `setParallel(boolean b)` Specify whether requests within the batch are to execute serially or in parallel.
`void` | `setRequests(java.util.List l)` Set the list of requests.

Methods inherited from class org.openspml.message.SpmlRequest
`dumpFile, getIdentifier, getIdentifierString, getOperationalAttribute, getOperationalAttributes, getOperationalAttributeValue, getRequestId, isAsynchronous, parseRequest, parseRequest, setAsynchronous, setIdentifier, setIdentifier, setOperationalAttribute, setOperationalAttribute, setOperationalAttributes, setRequestId, toXml, toXml`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### PROC_SEQUENTIAL

    public static final java.lang.String PROC_SEQUENTIAL

### PROC_PARALLEL

    public static final java.lang.String PROC_PARALLEL

### ON_ERROR_RESUME

    public static final java.lang.String ON_ERROR_RESUME

### ON_ERROR_EXIT

    public static final java.lang.String ON_ERROR_EXIT

Constructor Detail

### BatchRequest

    public BatchRequest()

  Create a new batch request.

Method Detail

### createResponse

    public SpmlResponse createResponse()

  Description copied from class: SpmlRequest
  Build an empty SpmlRequest object that corresponds to this request. Used in a few error conditions to return the expected response object when one was not actually sent back from the server.
  Overrides:
    createResponse in class SpmlRequest

### setParallel

    public void setParallel(boolean b)

  Specify whether requests within the batch are to execute serially or in parallel.

### setOnErrorResume

    public void setOnErrorResume(boolean b)

  Specify whether the batch should terminate as soon as one request has an error, or whether the batch should continue.

### setAttributes

    public void setAttributes(java.util.List l)

  Set a collection of attribute that applies to the batch .

### setAttribute

    public void setAttribute(Attribute a)

  Set one batch attribute.

### setAttribute

    public void setAttribute(java.lang.String name,
                             java.lang.Object value)

  Set one batch attribute.

### setRequests

    public void setRequests(java.util.List l)

  Set the list of requests. The list must contain `SpmlRequest` objects.

### addRequest

    public void addRequest(SpmlRequest r)

  Add one request to the batch.

### isParallel

    public boolean isParallel()

  Returns true if parallel execution is desired.

### isOnErrorResume

    public boolean isOnErrorResume()

  Returns true if the batch is to continue even if individual requests have errors.

### getAttributes

    public java.util.List getAttributes()

  Get the list of batch attributes.

### getRequests

    public java.util.List getRequests()

  Get the list of requests in the batch. The list will contain `SpmlRequest` objects.

### getAttribute

    public Attribute getAttribute(java.lang.String name)

  Lookup a batch attribute by name. // More common to look for these by name than in other requests? // Assuming the list is short, otherwise use a HashMap.

### getAttributeValue

    public java.lang.Object getAttributeValue(java.lang.String name)

  Lookup a batch attribute by name. The actual value of the attribute is returned, not the Attribute object.

### getElementName

    public java.lang.String getElementName()

  Description copied from class: SpmlRequest
  Return the tag name for the request element.
  Overrides:
    getElementName in class SpmlRequest

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD