• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java DelegateInvocationHandlerImpl类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中com.sun.corba.se.spi.orbutil.proxy.DelegateInvocationHandlerImpl的典型用法代码示例。如果您正苦于以下问题:Java DelegateInvocationHandlerImpl类的具体用法?Java DelegateInvocationHandlerImpl怎么用?Java DelegateInvocationHandlerImpl使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



DelegateInvocationHandlerImpl类属于com.sun.corba.se.spi.orbutil.proxy包,在下文中一共展示了DelegateInvocationHandlerImpl类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: getInvocationHandler

import com.sun.corba.se.spi.orbutil.proxy.DelegateInvocationHandlerImpl; //导入依赖的package包/类
InvocationHandler getInvocationHandler( DynamicStub stub )
{
    // Create an invocation handler for the methods defined on DynamicStub,
    // which extends org.omg.CORBA.Object.  This handler delegates all
    // calls directly to a DynamicStubImpl, which extends
    // org.omg.CORBA.portable.ObjectImpl.
    final InvocationHandler dynamicStubHandler =
        DelegateInvocationHandlerImpl.create( stub ) ;

    // Create an invocation handler that handles any remote interface
    // methods.
    final InvocationHandler stubMethodHandler = new StubInvocationHandlerImpl(
        pm, classData, stub ) ;

    // Create a composite handler that handles the DynamicStub interface
    // as well as the remote interfaces.
    final CompositeInvocationHandler handler =
        new CustomCompositeInvocationHandlerImpl( stub ) ;

    AccessController.doPrivileged(new PrivilegedAction<Void>() {
        @Override
        public Void run() {
    handler.addInvocationHandler( DynamicStub.class,
        dynamicStubHandler ) ;
    handler.addInvocationHandler( org.omg.CORBA.Object.class,
        dynamicStubHandler ) ;
    handler.addInvocationHandler( Object.class,
        dynamicStubHandler ) ;
            return null;
        }
    });


    // If the method passed to invoke is not from DynamicStub or its superclasses,
    // it must be from an implemented interface, so we just handle
    // all of these with the stubMethodHandler.  This used to be
    // done be adding explicit entries for stubMethodHandler for
    // each remote interface, but that does not work correctly
    // for abstract interfaces, since the graph analysis ignores
    // abstract interfaces in order to compute the type ids
    // correctly (see PresentationManagerImpl.NodeImpl.getChildren).
    // Rather than produce more graph traversal code to handle this
    // problem, we simply use a default.
    // This also points to a possible optimization: just use explict
    // checks for the three special classes, rather than a general
    // table lookup that usually fails.
    handler.setDefaultHandler( stubMethodHandler ) ;

    return handler ;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:51,代码来源:InvocationHandlerFactoryImpl.java


示例2: getInvocationHandler

import com.sun.corba.se.spi.orbutil.proxy.DelegateInvocationHandlerImpl; //导入依赖的package包/类
InvocationHandler getInvocationHandler( DynamicStub stub )
{
    // Create an invocation handler for the methods defined on DynamicStub,
    // which extends org.omg.CORBA.Object.  This handler delegates all
    // calls directly to a DynamicStubImpl, which extends
    // org.omg.CORBA.portable.ObjectImpl.
    InvocationHandler dynamicStubHandler =
        DelegateInvocationHandlerImpl.create( stub ) ;

    // Create an invocation handler that handles any remote interface
    // methods.
    InvocationHandler stubMethodHandler = new StubInvocationHandlerImpl(
        pm, classData, stub ) ;

    // Create a composite handler that handles the DynamicStub interface
    // as well as the remote interfaces.
    final CompositeInvocationHandler handler =
        new CustomCompositeInvocationHandlerImpl( stub ) ;
    handler.addInvocationHandler( DynamicStub.class,
        dynamicStubHandler ) ;
    handler.addInvocationHandler( org.omg.CORBA.Object.class,
        dynamicStubHandler ) ;
    handler.addInvocationHandler( Object.class,
        dynamicStubHandler ) ;

    // If the method passed to invoke is not from DynamicStub or its superclasses,
    // it must be from an implemented interface, so we just handle
    // all of these with the stubMethodHandler.  This used to be
    // done be adding explicit entries for stubMethodHandler for
    // each remote interface, but that does not work correctly
    // for abstract interfaces, since the graph analysis ignores
    // abstract interfaces in order to compute the type ids
    // correctly (see PresentationManagerImpl.NodeImpl.getChildren).
    // Rather than produce more graph traversal code to handle this
    // problem, we simply use a default.
    // This also points to a possible optimization: just use explict
    // checks for the three special classes, rather than a general
    // table lookup that usually fails.
    handler.setDefaultHandler( stubMethodHandler ) ;

    return handler ;
}
 
开发者ID:aducode,项目名称:openjdk-source-code-learn,代码行数:43,代码来源:InvocationHandlerFactoryImpl.java



注:本文中的com.sun.corba.se.spi.orbutil.proxy.DelegateInvocationHandlerImpl类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java EventDispatcher类代码示例发布时间:2022-05-22
下一篇:
Java SSLSupport类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap