JavaTM 2 Platform
Standard Ed. 6

org.omg.PortableServer
类 _ServantLocatorStub

java.lang.Object
  继承者 org.omg.CORBA.portable.ObjectImpl
      继承者 org.omg.PortableServer._ServantLocatorStub
所有已实现的接口:
Serializable, Object, IDLEntity, ServantLocator, ServantLocatorOperations, ServantManager, ServantManagerOperations

public class _ServantLocatorStub
extends ObjectImpl
implements ServantLocator

POA 具有 NON_RETAIN 策略时将使用 ServantLocator 这种 servant 管理器。因为 POA 了解此 servant 管理器返回的 servant 只用于单个请求,所以它可以向 servant 管理器的操作提供额外的信息,从而一对该 servant 管理器的操作也许能共同执行某些不同于 ServantActivator 的操作。POA 使用 ServantLocator 接口时,对 preinvoke 返回的 servant 调用该操作后,POA 将立即对 servant 管理器调用 postinvoke,同时将 ObjectId 值和 Servant 值(及其他值)作为参数传递。servant 管理器可以使用这一功能来强制调停每个对关联 POA 的对象的请求。


字段摘要
static Class _opsClass
           
 
构造方法摘要
_ServantLocatorStub()
           
 
方法摘要
 String[] _ids()
          获得包含此 ObjectImpl 对象所支持的存储库标识符的字符串数组。
 void postinvoke(byte[] oid, POA adapter, String operation, Object the_cookie, Servant the_servant)
          servant 完成请求时都将调用此操作。
 Servant preinvoke(byte[] oid, POA adapter, String operation, CookieHolder the_cookie)
          此操作用来获取一个 servant,该 servant 将用来处理导致调用 preinvoke 的请求。
 
从类 org.omg.CORBA.portable.ObjectImpl 继承的方法
_create_request, _create_request, _duplicate, _get_delegate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _invoke, _is_a, _is_equivalent, _is_local, _non_existent, _orb, _release, _releaseReply, _request, _request, _servant_postinvoke, _servant_preinvoke, _set_delegate, _set_policy_override, equals, hashCode, toString
 
从类 java.lang.Object 继承的方法
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
从接口 org.omg.CORBA.Object 继承的方法
_create_request, _create_request, _duplicate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _is_a, _is_equivalent, _non_existent, _release, _request, _set_policy_override
 

字段详细信息

_opsClass

public static final Class _opsClass
构造方法详细信息

_ServantLocatorStub

public _ServantLocatorStub()
方法详细信息

preinvoke

public Servant preinvoke(byte[] oid,
                         POA adapter,
                         String operation,
                         CookieHolder the_cookie)
                  throws ForwardRequest
此操作用来获取一个 servant,该 servant 将用来处理导致调用 preinvoke 的请求。

指定者:
接口 ServantLocatorOperations 中的 preinvoke
参数:
oid - 关联所请求对象的对象 Id。
adapter - 将激活对象的 POA 的引用。
operation - 操作名称。
the_cookie - 一个不透明值,可由调用 postinvoke 期间使用的 servant 管理器设置。
返回:
用来处理传入请求的 Servant。
抛出:
ForwardRequest - 指示 ORB 负责将当前请求和后续请求传递给异常的向前引用 (forward_reference) 成员所表示的对象。

postinvoke

public void postinvoke(byte[] oid,
                       POA adapter,
                       String operation,
                       Object the_cookie,
                       Servant the_servant)
servant 完成请求时都将调用此操作。

指定者:
接口 ServantLocatorOperations 中的 postinvoke
参数:
oid - 关联所请求对象的对象 Id。
adapter - 已激活对象的 POA 的引用。
the_cookie - 一个包含 preinvoke 设置的数据的透明值。
the_servant - 对关联对象的 servant 的引用。

_ids

public String[] _ids()
从类 ObjectImpl 复制的描述
获得包含此 ObjectImpl 对象所支持的存储库标识符的字符串数组。例如,对于 sub,此方法返回所有关于该 stub 所支持的接口的信息。

指定者:
ObjectImpl 中的 _ids
返回:
ObjectImpl 实例支持的所有存储库标识符所组成的数组

JavaTM 2 Platform
Standard Ed. 6

提交错误或意见

版权所有 2008 Sun Microsystems, Inc. 保留所有权利。请遵守GNU General Public License, version 2 only