当前位置: 首页>>代码示例>>Java>>正文


Java ObjectAdapterId类代码示例

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


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

示例1: getAcceptors

import com.sun.corba.se.spi.ior.ObjectAdapterId; //导入依赖的package包/类
public Collection getAcceptors(String objectAdapterManagerId,
                               ObjectAdapterId objectAdapterId)
{
    // REVISIT - need to filter based on arguments.

    // REVISIT - initialization will be moved to OA.
    // Lazy initialization of acceptors.
    Iterator iterator = acceptors.iterator();
    while (iterator.hasNext()) {
        Acceptor acceptor = (Acceptor) iterator.next();
        if (acceptor.initialize()) {
            if (acceptor.shouldRegisterAcceptEvent()) {
                orb.getTransportManager().getSelector(0)
                    .registerForEvent(acceptor.getEventHandler());
            }
        }
    }
    return acceptors;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:20,代码来源:CorbaTransportManagerImpl.java

示例2: equals

import com.sun.corba.se.spi.ior.ObjectAdapterId; //导入依赖的package包/类
public boolean equals( Object other )
{
    if (!(other instanceof ObjectAdapterId))
        return false ;

    ObjectAdapterId theOther = (ObjectAdapterId)other ;

    Iterator iter1 = iterator() ;
    Iterator iter2 = theOther.iterator() ;

    while (iter1.hasNext() && iter2.hasNext()) {
        String str1 = (String)(iter1.next()) ;
        String str2 = (String)(iter2.next()) ;

        if (!str1.equals( str2 ))
            return false ;
    }

    return iter1.hasNext() == iter2.hasNext() ;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:21,代码来源:ObjectAdapterIdBase.java

示例3: initializeTemplate

import com.sun.corba.se.spi.ior.ObjectAdapterId; //导入依赖的package包/类
final public void initializeTemplate( ObjectKeyTemplate oktemp,
    boolean notifyORB, Policies policies, String codebase,
    String objectAdapterManagerId, ObjectAdapterId objectAdapterId)
{
    adapterId = oktemp.getAdapterId() ;

    iortemp = IORFactories.makeIORTemplate(oktemp) ;

    // This calls acceptors which create profiles and may
    // add tagged components to those profiles.
    orb.getCorbaTransportManager().addToIORTemplate(
        iortemp, policies,
        codebase, objectAdapterManagerId, objectAdapterId);

    adapterTemplate = IORFactories.makeObjectReferenceTemplate( orb,
        iortemp ) ;
    currentFactory = adapterTemplate ;

    if (notifyORB) {
        PIHandler pih = orb.getPIHandler() ;
        if (pih != null)
            // This runs the IORInterceptors.
            pih.objectAdapterCreated( this ) ;
    }

    iortemp.makeImmutable() ;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:28,代码来源:ObjectAdapterBase.java

示例4: findObjectAdapter

import com.sun.corba.se.spi.ior.ObjectAdapterId; //导入依赖的package包/类
private ObjectAdapter findObjectAdapter(ObjectKeyTemplate oktemp)
{
    try {
        if (orb.subcontractDebugFlag) {
            dprint(".findObjectAdapter->");
        }

        RequestDispatcherRegistry scr = orb.getRequestDispatcherRegistry() ;
        int scid = oktemp.getSubcontractId() ;
        ObjectAdapterFactory oaf = scr.getObjectAdapterFactory(scid);
        if (oaf == null) {
            if (orb.subcontractDebugFlag) {
                dprint(".findObjectAdapter: failed to find ObjectAdapterFactory");
            }

            throw wrapper.noObjectAdapterFactory() ;
        }

        ObjectAdapterId oaid = oktemp.getObjectAdapterId() ;
        ObjectAdapter oa = oaf.find(oaid);

        if (oa == null) {
            if (orb.subcontractDebugFlag) {
                dprint(".findObjectAdapter: failed to find ObjectAdaptor");
            }

            throw wrapper.badAdapterId() ;
        }

        return oa ;
    } finally {
        if (orb.subcontractDebugFlag) {
            dprint(".findObjectAdapter<-");
        }
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:37,代码来源:CorbaServerRequestDispatcherImpl.java

示例5: find

import com.sun.corba.se.spi.ior.ObjectAdapterId; //导入依赖的package包/类
public ObjectAdapter find ( ObjectAdapterId oaid )
{
    if (oaid.equals( ObjectKeyTemplateBase.JIDL_OAID )  )
        // Return the dispatch-only TOA, which can dispatch
        // request for objects created by any TOA.
        return getTOA() ;
    else
        throw wrapper.badToaOaid() ;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:10,代码来源:TOAFactory.java

示例6: addToIORTemplate

import com.sun.corba.se.spi.ior.ObjectAdapterId; //导入依赖的package包/类
public void addToIORTemplate(IORTemplate iorTemplate,
                             Policies policies,
                             String codebase,
                             String objectAdapterManagerId,
                             ObjectAdapterId objectAdapterId)
{
    Iterator iterator =
        getAcceptors(objectAdapterManagerId, objectAdapterId).iterator();
    while (iterator.hasNext()) {
        CorbaAcceptor acceptor = (CorbaAcceptor) iterator.next();
        acceptor.addToIORTemplate(iorTemplate, policies, codebase);
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:14,代码来源:CorbaTransportManagerImpl.java

示例7: adapter_name

import com.sun.corba.se.spi.ior.ObjectAdapterId; //导入依赖的package包/类
synchronized public String[] adapter_name()
{
    checkAccess( MID_ADAPTER_NAME ) ;

    if (adapterName == null) {
        checkForNullTemplate() ;

        ObjectAdapterId oaid = oktemp.getObjectAdapterId() ;
        adapterName = oaid.getAdapterName() ;
    }

    return adapterName ;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:14,代码来源:ServerRequestInfoImpl.java

示例8: adapter_name

import com.sun.corba.se.spi.ior.ObjectAdapterId; //导入依赖的package包/类
public String[] adapter_name()
{
    ObjectAdapterId poaid =
        iorTemplate.getObjectKeyTemplate().getObjectAdapterId() ;

    return poaid.getAdapterName() ;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:8,代码来源:ObjectReferenceTemplateImpl.java

示例9: POAObjectKeyTemplate

import com.sun.corba.se.spi.ior.ObjectAdapterId; //导入依赖的package包/类
public POAObjectKeyTemplate( ORB orb, int scid, int serverid, String orbid,
    ObjectAdapterId objectAdapterId)
{
    super( orb, ObjectKeyFactoryImpl.JAVAMAGIC_NEWER, scid, serverid, orbid,
        objectAdapterId ) ;

    setORBVersion( ORBVersionFactory.getORBVersion() ) ;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:9,代码来源:POAObjectKeyTemplate.java

示例10: OldObjectKeyTemplateBase

import com.sun.corba.se.spi.ior.ObjectAdapterId; //导入依赖的package包/类
public OldObjectKeyTemplateBase( ORB orb, int magic, int scid, int serverid,
    String orbid, ObjectAdapterId oaid )
{
    super( orb, magic, scid, serverid, orbid, oaid ) ;

    // set version based on magic
    if (magic == ObjectKeyFactoryImpl.JAVAMAGIC_OLD)
        setORBVersion( ORBVersionFactory.getOLD() ) ;
    else if (magic == ObjectKeyFactoryImpl.JAVAMAGIC_NEW)
        setORBVersion( ORBVersionFactory.getNEW() ) ;
    else // any other magic should not be here
        throw wrapper.badMagic( new Integer( magic ) ) ;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:14,代码来源:OldObjectKeyTemplateBase.java

示例11: NewObjectKeyTemplateBase

import com.sun.corba.se.spi.ior.ObjectAdapterId; //导入依赖的package包/类
public NewObjectKeyTemplateBase( ORB orb, int magic, int scid, int serverid,
    String orbid, ObjectAdapterId oaid )
{
    super( orb, magic, scid, serverid, orbid, oaid ) ;
    // subclass must set the version, since we don't have the object key here.

    if (magic != ObjectKeyFactoryImpl.JAVAMAGIC_NEWER)
        throw wrapper.badMagic( new Integer( magic ) ) ;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:10,代码来源:NewObjectKeyTemplateBase.java

示例12: ObjectKeyTemplateBase

import com.sun.corba.se.spi.ior.ObjectAdapterId; //导入依赖的package包/类
public ObjectKeyTemplateBase( ORB orb, int magic, int scid, int serverid,
    String orbid, ObjectAdapterId oaid )
{
    this.orb = orb ;
    this.wrapper = IORSystemException.get( orb,
        CORBALogDomains.OA_IOR ) ;
    this.magic = magic ;
    this.scid = scid ;
    this.serverid = serverid ;
    this.orbid = orbid ;
    this.oaid = oaid ;

    adapterId = computeAdapterId() ;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:15,代码来源:ObjectKeyTemplateBase.java

示例13: getServant

import com.sun.corba.se.spi.ior.ObjectAdapterId; //导入依赖的package包/类
/** Return the servant for this IOR, if it is local AND if the OA that
 * implements this objref supports direct access to servants outside of an
 * invocation.
 * XXX revisit: do we want this at all?  If we do, it might move to the
 * ObjectKeyTemplate instead.
 */
public java.lang.Object getServant()
{
    if (!isLocal())
        return null ;

    RequestDispatcherRegistry scr = orb.getRequestDispatcherRegistry() ;
    ObjectAdapterFactory oaf = scr.getObjectAdapterFactory(
        oktemp.getSubcontractId() ) ;

    ObjectAdapterId oaid = oktemp.getObjectAdapterId() ;
    ObjectAdapter oa = null ;

    try {
        oa = oaf.find( oaid ) ;
    } catch (SystemException exc) {
        // Could not find the OA, so just return null.
        // This usually happens when POAs are being deleted,
        // and the POA always return null for getLocalServant anyway.
        wrapper.getLocalServantFailure( exc, oaid.toString() ) ;
        return null ;
    }

    byte[] boid = oid.getId() ;
    java.lang.Object servant = oa.getLocalServant( boid ) ;
    return servant ;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:33,代码来源:IIOPProfileImpl.java


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