BulkResponse (Java EE 5)

Java EE API


javax.xml.registry Interface BulkResponse

All Superinterfaces:
JAXRResponse

public interface BulkResponse
extends JAXRResponse

Implements: JAXRResponse

包含对 API 中执行批量操作的方法的响应,返回批量响应。对于批量操作,允许部分提交。

在获得部分成功的事件中(仅成功处理了对象的一个子集),BulkResponse 的 getStatus 方法必须返回 JAXRResponse.STATUS_WARNING。在这种情况下,JAXRException 实例所组成的 Collection 包含在 BulkResponse 实例中。对于妨碍请求中的某些对象成功处理的每个错误,JAXRException 都将提供相关的信息。

英文文档:

Contains the response of a method in the API that performs a bulk operation and returns a bulk response. Partial commits are allowed on a bulk operation.

In the event of a partial success where only a subset of objects were processed successfully, the getStatus method of the BulkResponse must return JAXRResponse.STATUS_WARNING. In this case, a Collection of JAXRException instances is included in the BulkResponse instance. The JAXRExceptions provide information on each error that prevented some objects in the request to not be processed successfully.

Author:
Farrukh S. Najmi
See Also:
QueryManager, LifeCycleManager

Field Summary
 
Fields inherited from interface javax.xml.registry.JAXRResponse
 
Method Summary
 Collection
 Collection
 boolean
 
Methods inherited from interface javax.xml.registry.JAXRResponse
 

Method Detail

public java.util.Collection<E> getCollection() throws JAXRException
获取作为批量操作的响应返回的对象所组成的 Collection。如果结果尚不可用,则调用者线程将阻塞于此。

功能级别:0
return RegistryObject 实例组成的 CollectionCollection 可以为空,但不能为 null。
ThrowsJAXRException: 如果 JAXR 提供者遇到内部错误
See also javax.xml.registry.infomodel.RegistryObject
英文文档:

getCollection

Collection getCollection()
                         throws JAXRException
Get the Collection of objects returned as a response of a bulk operation. Caller thread will block here if result is not yet available.

Capability Level: 0

Returns:
Collection of RegistryObject instances. The Collection may be empty but not null.
Throws:
JAXRException - If the JAXR provider encounters an internal error
See Also:
RegistryObject

public java.util.Collection<E> getExceptions() throws JAXRException
获取部分提交情况下 RegistryException 实例所组成的 Collection。如果结果尚不可用,则调用者线程将阻塞于此。

功能级别:0
return RegistryException 实例所组成的 Collection。如果结果可用且没有任何 RegistryException,则返回 null。
ThrowsJAXRException: 如果 JAXR 提供者遇到内部错误
See also javax.xml.registry.RegistryException
英文文档:

getExceptions

Collection getExceptions()
                         throws JAXRException
Get the Collection of RegistryException instances in case of partial commit. Caller thread will block here if result is not yet available.

Capability Level: 0

Returns:
Collection of RegistryException instances. Return null if result is available and there is no RegistryException.
Throws:
JAXRException - If the JAXR provider encounters an internal error
See Also:
RegistryException

public boolean isPartialResponse() throws JAXRException
确定响应是否由于结果集太大而变为部分响应。

功能级别:0
return 如果响应是部分响应,则返回 true;否则返回 false
ThrowsJAXRException: 如果 JAXR 提供者遇到内部错误
英文文档:

isPartialResponse

boolean isPartialResponse()
                          throws JAXRException
Determines whether the response is a partial response due to large result set.

Capability Level: 0

Returns:
true if the response is partial; false otherwise
Throws:
JAXRException - If the JAXR provider encounters an internal error


Submit a bug or feature

Copyright 2007 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.

一看就知道只有菜鸟才干这么无知的事啦。

PS : 未经我党受权你也可自由散发此文档。 如有任何错误请自行修正;若因此而造成任何损失请直接找人民主席,请勿与本人联系。谢谢!