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

Java ContactInfoList类代码示例

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

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



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

示例1: isLocal

import com.sun.corba.se.pept.transport.ContactInfoList; //导入依赖的package包/类
/**
 * The <tt>isLocal</tt> method has the same semantics as the
 * ObjectImpl._is_local method, except that it can throw a RemoteException.
 * (no it doesn't but the spec says it should.)
 *
 * The <tt>_is_local()</tt> method is provided so that stubs may determine
 * if a particular object is implemented by a local servant and hence local
 * invocation APIs may be used.
 *
 * @param stub the stub to test.
 *
 * @return The <tt>_is_local()</tt> method returns true if
 * the servant incarnating the object is located in the same process as
 * the stub and they both share the same ORB instance.  The <tt>_is_local()</tt>
 * method returns false otherwise. The default behavior of <tt>_is_local()</tt> is
 * to return false.
 *
 * @throws RemoteException The Java to IDL specification does to
 * specify the conditions that cause a RemoteException to be thrown.
 */
public boolean isLocal(javax.rmi.CORBA.Stub stub) throws RemoteException
{
    boolean result = false ;

    try {
        org.omg.CORBA.portable.Delegate delegate = stub._get_delegate() ;
        if (delegate instanceof CorbaClientDelegate) {
            // For the Sun ORB
            CorbaClientDelegate cdel = (CorbaClientDelegate)delegate ;
            ContactInfoList cil = cdel.getContactInfoList() ;
            if (cil instanceof CorbaContactInfoList) {
                CorbaContactInfoList ccil = (CorbaContactInfoList)cil ;
                LocalClientRequestDispatcher lcs = ccil.getLocalClientRequestDispatcher() ;
                result = lcs.useLocalInvocation( null ) ;
            }
        } else {
            // For a non-Sun ORB
            result = delegate.is_local( stub ) ;
        }
    } catch (SystemException e) {
        throw javax.rmi.CORBA.Util.mapSystemException(e);
    }

    return result ;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:46,代码来源:Util.java


示例2: isLocal

import com.sun.corba.se.pept.transport.ContactInfoList; //导入依赖的package包/类
private boolean isLocal()
{
    boolean result = false ;
    Delegate delegate = StubAdapter.getDelegate( stub ) ;

    if (delegate instanceof CorbaClientDelegate) {
        CorbaClientDelegate cdel = (CorbaClientDelegate)delegate ;
        ContactInfoList cil = cdel.getContactInfoList() ;
        if (cil instanceof CorbaContactInfoList) {
            CorbaContactInfoList ccil = (CorbaContactInfoList)cil ;
            LocalClientRequestDispatcher lcrd =
                ccil.getLocalClientRequestDispatcher() ;
            result = lcrd.useLocalInvocation( null ) ;
        }
    }

    return result ;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:19,代码来源:StubInvocationHandlerImpl.java


示例3: isLocal

import com.sun.corba.se.pept.transport.ContactInfoList; //导入依赖的package包/类
/**
 * The {@code isLocal} method has the same semantics as the
 * ObjectImpl._is_local method, except that it can throw a RemoteException.
 * (no it doesn't but the spec says it should.)
 *
 * The {@code _is_local()} method is provided so that stubs may determine
 * if a particular object is implemented by a local servant and hence local
 * invocation APIs may be used.
 *
 * @param stub the stub to test.
 *
 * @return The {@code _is_local()} method returns true if
 * the servant incarnating the object is located in the same process as
 * the stub and they both share the same ORB instance.  The {@code _is_local()}
 * method returns false otherwise. The default behavior of {@code _is_local()} is
 * to return false.
 *
 * @throws RemoteException The Java to IDL specification does to
 * specify the conditions that cause a RemoteException to be thrown.
 */
public boolean isLocal(javax.rmi.CORBA.Stub stub) throws RemoteException
{
    boolean result = false ;

    try {
        org.omg.CORBA.portable.Delegate delegate = stub._get_delegate() ;
        if (delegate instanceof CorbaClientDelegate) {
            // For the Sun ORB
            CorbaClientDelegate cdel = (CorbaClientDelegate)delegate ;
            ContactInfoList cil = cdel.getContactInfoList() ;
            if (cil instanceof CorbaContactInfoList) {
                CorbaContactInfoList ccil = (CorbaContactInfoList)cil ;
                LocalClientRequestDispatcher lcs = ccil.getLocalClientRequestDispatcher() ;
                result = lcs.useLocalInvocation( null ) ;
            }
        } else {
            // For a non-Sun ORB
            result = delegate.is_local( stub ) ;
        }
    } catch (SystemException e) {
        throw javax.rmi.CORBA.Util.mapSystemException(e);
    }

    return result ;
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:46,代码来源:Util.java


示例4: getContactInfoList

import com.sun.corba.se.pept.transport.ContactInfoList; //导入依赖的package包/类
public ContactInfoList getContactInfoList()
{
    return contactInfoList;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:5,代码来源:CorbaClientDelegateImpl.java


示例5: getIOR

import com.sun.corba.se.pept.transport.ContactInfoList; //导入依赖的package包/类
/** This method obtains an IOR from a CORBA object reference.
* It will return null if obj is a local object, a null object,
* or an object implemented by a different ORB.  It will
* throw BAD_OPERATION if obj is an unconnected RMI-IIOP object.
* @return IOR the IOR that represents this objref.  This will
* never be null.
* @exception BAD_OPERATION (from oi._get_delegate) if obj is a
* normal objref, but does not have a delegate set.
* @exception BAD_PARAM if obj is a local object, or else was
* created by a foreign ORB.
*/
public static IOR getIOR( org.omg.CORBA.Object obj )
{
    if (obj == null)
        throw wrapper.nullObjectReference() ;

    IOR ior = null ;
    if (StubAdapter.isStub(obj)) {
        org.omg.CORBA.portable.Delegate del = StubAdapter.getDelegate(
            obj ) ;

        if (del instanceof CorbaClientDelegate) {
            CorbaClientDelegate cdel = (CorbaClientDelegate)del ;
            ContactInfoList cil = cdel.getContactInfoList() ;

            if (cil instanceof CorbaContactInfoList) {
                CorbaContactInfoList ccil = (CorbaContactInfoList)cil ;
                ior = ccil.getTargetIOR() ;
                if (ior == null)
                    throw wrapper.nullIor() ;

                return ior ;
            } else {
                // This is our code, but the ContactInfoList is not a
                // CorbaContactInfoList.  This should not happen, because
                // we are in the CORBA application of the DCSA framework.
                // This is a coding error, and thus an INTERNAL exception
                // should be thrown.
                // XXX needs minor code
                throw new INTERNAL() ;
            }
        }

        // obj is implemented by a foreign ORB, because the Delegate is not a
        // ClientDelegate.
        // XXX this case could be handled by marshalling and
        // unmarshalling.  However, object_to_string cannot be used
        // here, as it is implemented with getIOR.  Note that this
        // will require access to an ORB, so that we can create streams
        // as needed.  The ORB is available simply as io._orb().
        throw wrapper.objrefFromForeignOrb() ;
    } else
        throw wrapper.localObjectNotAllowed() ;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:55,代码来源:ORBUtility.java



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
Java RMContainerEventType类代码示例发布时间:2022-05-22
下一篇:
Java GetDiagnosticsRequestProto类代码示例发布时间: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