public interface ServerRequestInfoOperations extends RequestInfoOperations
在ServerRequestInfo一些属性和操作不适用於所有拦截点。下表显示了每个属性或操作的有效性。如果它是无效的,试图访问它会导致一个BAD_INV_ORDER抛出一个标准的小代码14。
| receive_request_ service_contexts |
receive_request | send_reply | send_exception | send_other | |
|---|---|---|---|---|---|
| Inherited from RequestInfo: | |||||
request_id |
yes | yes | yes | yes | yes |
operation |
yes | yes | yes | yes | yes |
arguments |
no | yes1 | yes | no2 | no2 |
exceptions |
no | yes | yes | yes | yes |
contexts |
no | yes | yes | yes | yes |
operation_context |
no | yes | yes | no | no |
result |
no | no | yes | no | no |
response_expected |
yes | yes | yes | yes | yes |
sync_scope |
yes | yes | yes | yes | yes |
| request_id | yes | yes | yes | yes | yes |
| operation | yes | yes | yes | yes | yes |
| arguments | no | yes1 | yes | no2 | no2 |
| exceptions | no | yes | yes | yes | yes |
| contexts | no | yes | yes | yes | yes |
| operation_context | no | yes | yes | no | no |
| result | no | no | yes | no | no |
| response_expected | yes | yes | yes | yes | yes |
| sync_scope | yes | yes | yes | yes | yes |
| reply_status | no | no | yes | yes | yes |
| forward_reference | no | no | no | no | yes2 |
| get_slot | yes | yes | yes | yes | yes |
| get_request_service_context | yes | no | yes | yes | yes |
| get_reply_service_context | no | no | yes | yes | yes |
| ServerRequestInfo-specific: | |||||
| sending_exception | no | no | no | yes | no |
| object_id | no | yes | yes | yes3 | yes3 |
| adapter_id | no | yes | yes | yes3 | yes3 |
| server_id | no | yes | yes | yes | yes |
| orb_id | no | yes | yes | yes | yes |
| adapter_name | no | yes | yes | yes | yes |
| target_most_derived_interface | no | yes | no4 | no4 | no4 |
| get_server_policy | yes | yes | yes | yes | yes |
| set_slot | yes | yes | yes | yes | yes |
| target_is_a | no | yes | no4 | no4 | no4 |
| add_reply_service_context | yes | yes | yes | yes | yes |
ServerRequestInfo传递给receive_request,有一个条目列表中的每个参数,是否,inout,或。但只有在和INOUT参数可。reply_status属性不LOCATION_FORWARD,访问该属性将BAD_INV_ORDER与标准的小代码14。NO_RESOURCES与标准的小代码1将不可抛。ServantLocator,然后ORB调用拦截点后打电话ServantLocator.postinvoke()ServerRequestInterceptor
| Modifier and Type | Method and Description |
|---|---|
byte[] |
adapter_id()
返回对象适配器的不透明标识符。
|
String[] |
adapter_name()
返回标识处理此请求的对象适配器实例的字符串的顺序。
|
void |
add_reply_service_context(ServiceContext service_context, boolean replace)
允许拦截器添加服务上下文的要求。
|
Policy |
get_server_policy(int type)
返回给定策略类型的此操作的策略。
|
byte[] |
object_id()
返回描述操作的调用对象的不透明
object_id。
|
String |
orb_id()
返回的ID,用于创建球体。
|
Any |
sending_exception()
返回一个包含要返回给客户端的异常的任何一个。
|
String |
server_id()
返回服务器ID,被指定在ORB::使用- orbserverid参数初始化。
|
void |
set_slot(int id, Any data)
允许一个拦截器在
PortableInterceptor.Current是在请求的范围设定一个槽。
|
boolean |
target_is_a(String id)
如果仆人是给定的存储库身份证,则为假,如果它不是。
|
String |
target_most_derived_interface()
返回仆人最衍生的接口的存储库标识。
|
arguments, contexts, exceptions, forward_reference, get_reply_service_context, get_request_service_context, get_slot, operation_context, operation, reply_status, request_id, response_expected, result, sync_scopeAny sending_exception()
如果异常是一个用户异常不能插入任何(例如,它是未知的或绑定不提供TypeCode),那么这个属性将一个含有与一个标准的小代码1系统异常UNKNOWN。
byte[] object_id()
object_id。
byte[] adapter_id()
String server_id()
String orb_id()
String[] adapter_name()
String target_most_derived_interface()
Policy get_server_policy(int type)
CORBA.Policy对象只能是政策的类型是通过
register_policy_factory注册。
type -
CORBA.PolicyType指定要返回的政策。
CORBA.Policy。
INV_POLICY -扔,一个标准的小代码2,如果一个给定类型的政策是不经注册
register_policy_factory。
ORBInitInfoOperations.register_policy_factory(int, org.omg.PortableInterceptor.PolicyFactory)
void set_slot(int id,
Any data)
throws InvalidSlot
PortableInterceptor.Current是在请求的范围设定一个槽。如果在那个位置已经存在的数据,它将被覆盖。
id -插槽的ID。
data -数据,在任何形式,存储在该插槽。
InvalidSlot -如果身份不确定所分配的时隙扔。
Current
boolean target_is_a(String id)
id -打电话的人想知道仆人这个库的ID。
void add_reply_service_context(ServiceContext service_context, boolean replace)
没有服务上下文的顺序的声明。他们可能或可能不会出现在他们被添加的顺序。
service_context -
IOP.ServiceContext添加回复。
replace -表示该操作行为在服务上下文已经存在与给定的ID。如果是错的,然后用标准的小码15
BAD_INV_ORDER抛出。如果是真的,那么现有的服务上下文将被新的服务上下文所取代。
BAD_INV_ORDER -扔,一个标准的小代码15,如果更换是错误的,与给定的ID服务上下文已经存在
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.