-
- All Superinterfaces:
-
RequestInfoOperations
- All Known Subinterfaces:
-
ClientRequestInfo
public interface ClientRequestInfoOperations extends RequestInfoOperations
请求信息,客户端请求拦截器可访问。
Shows the validity of each attribute or operation send_request send_poll receive_reply receive_exception receive_other Inherited from RequestInfo:ClientRequestInfo某些属性和操作在所有截取点都无效。 下表显示每个属性或操作的有效性。 如果它无效,尝试访问它将导致一个BAD_INV_ORDER被抛出与标准的次要代码14。request_id
yes yes yes yes yesoperation
yes yes yes yes yesarguments
yes1 no yes no noexceptions
yes no yes yes yescontexts
yes no yes yes yesoperation_context
yes no yes yes yesresult
no no yes no noresponse_expected
yes yes yes yes yessync_scope
yes no yes yes yesreply_status
no no yes yes yesforward_reference
no no no no yes2get_slot
yes yes yes yes yesget_request_service_context
yes no yes yes yesget_reply_service_context
no no yes yes yes ClientRequestInfo-specific:target
yes yes yes yes yeseffective_target
yes yes yes yes yeseffective_profile
yes yes yes yes yesreceived_exception
no no no yes noreceived_exception_id
no no no yes noget_effective_component
yes no yes yes yesget_effective_components
yes no yes yes yesget_request_policy
yes no yes yes yesadd_request_service_context
yes no no no no- 当
ClientRequestInfo传递给send_request,无论是在inout还是out中,每个参数都有一个条目。 但是只有in和inout参数才可用。 - 如果
reply_status属性不是LOCATION_FORWARD,访问此属性将抛出BAD_INV_ORDER标准的次要代码为14。
- 另请参见:
-
ClientRequestInterceptor
-
-
方法摘要
所有方法 接口方法 抽象方法 Modifier and Type 方法 描述 voidadd_request_service_context(ServiceContext service_context, boolean replace)允许拦截器向请求添加服务上下文。TaggedProfileeffective_profile()返回将用于发送请求的配置文件。Objecteffective_target()返回将调用操作的实际对象。TaggedComponentget_effective_component(int id)从为此请求选择的配置文件中返回具有给定ID的IOP.TaggedComponent。TaggedComponent[]get_effective_components(int id)从为该请求选择的配置文件中返回具有给定ID的所有标记组件的数组。Policyget_request_policy(int type)返回此操作生效的给定策略。Anyreceived_exception()返回任何包含要返回给客户端的异常。Stringreceived_exception_id()返回要返回给客户端的异常的存储库ID。Objecttarget()返回客户端调用以执行操作的对象。-
Methods inherited from interface org.omg.PortableInterceptor.RequestInfoOperations
arguments, contexts, exceptions, forward_reference, get_reply_service_context, get_request_service_context, get_slot, operation, operation_context, reply_status, request_id, response_expected, result, sync_scope
-
-
-
-
方法详细信息
-
target
Object target()
返回客户端调用以执行操作的对象。- 另请参见:
-
effective_target()
-
effective_target
Object effective_target()
返回将调用操作的实际对象。 如果reply_status为LOCATION_FORWARD,则在随后的请求中,effective_target将包含转发的IOR,而目标将保持不变。- 另请参见:
-
target()
-
effective_profile
TaggedProfile effective_profile()
返回将用于发送请求的配置文件。 如果此操作的对象发生了位置转发,并且该对象的配置文件相应地更改,则此配置文件将是位于配置文件。
-
received_exception
Any received_exception()
返回任何包含要返回给客户端的异常。如果异常是无法插入任何用户异常(例如,未知或绑定不提供
TypeCode),则该属性将包含系统异常UNKNOWN,标准次要代码为1。但是,该异常的存储库ID在received_exception_id属性中可用。- 另请参见:
-
received_exception_id()
-
received_exception_id
String received_exception_id()
返回要返回给客户端的异常的存储库ID。
-
get_effective_component
TaggedComponent get_effective_component(int id)
从为此请求选择的配置文件中返回具有给定ID的IOP.TaggedComponent。如果给定的组件ID有多个组件,则该操作将返回哪个组件未定义。 如果给定组件ID有多个组件,则应调用
get_effective_components。- 参数
-
id- 要返回的组件的组件ID。 - 结果
-
获得的
IOP.TaggedComponent具有给定的标识符。 - 异常
-
BAD_PARAM- 如果给定的组件ID没有组件,则抛出标准的次要代码28。 - 另请参见:
-
get_effective_components(int)
-
get_effective_components
TaggedComponent[] get_effective_components(int id)
从为该请求选择的配置文件中返回具有给定ID的所有标记组件的数组。- 参数
-
id- 要返回的组件的组件ID。 - 结果
-
一组
TaggedComponent对象,每个对象包含给定的标识符。 - 异常
-
BAD_PARAM- 抛出,标准的次要代码为28,如果给定的组件ID不存在组件。 - 另请参见:
-
get_effective_component(int)
-
get_request_policy
Policy get_request_policy(int type)
返回此操作生效的给定策略。- 参数
-
type- 指定要返回的策略的策略类型。 - 结果
-
以给定类型获得的
CORBA.Policy。 - 异常
-
INV_POLICY- 抛出,标准的次要代码为1,如果策略类型无效,因为此ORB不支持指定的类型,或者因为该类型的策略对象与此对象不关联 - 另请参见:
-
PortableInterceptorpackage comments for limitations / unimplemented features
-
add_request_service_context
void add_request_service_context(ServiceContext service_context, boolean replace)
允许拦截器向请求添加服务上下文。没有声明服务上下文的顺序。 他们可能会或不会按照添加的顺序出现。
- 参数
-
service_context- 要添加到请求中的IOP.ServiceContext。 -
replace- 表示当具有给定ID的服务上下文已存在时此操作的行为。 如果是虚假的,那么BAD_INV_ORDER一个标准的次要代码为25的BAD_INV_ORDER。 如果为true,则现有服务上下文将被新的服务上下文替换。
-
-