本文整理汇总了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;未经允许,请勿转载。 |
请发表评论