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

Java ORBUtility类代码示例

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

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



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

示例1: updateClientRequestDispatcherForward

import com.sun.corba.se.impl.orbutil.ORBUtility; //导入依赖的package包/类
/**
 * Update the client delegate in the event of a ForwardRequest, given the
 * information in the passed-in info object.
 */
private void updateClientRequestDispatcherForward(
    ClientRequestInfoImpl info )
{
    ForwardRequest forwardRequest = info.getForwardRequestException();

    // ForwardRequest may be null if the forwarded IOR is set internal
    // to the ClientRequestDispatcher rather than explicitly through Portable
    // Interceptors.  In this case, we need not update the client
    // delegate ForwardRequest object.
    if( forwardRequest != null ) {
        org.omg.CORBA.Object object = forwardRequest.forward;

        // Convert the forward object into an IOR:
        IOR ior = ORBUtility.getIOR( object ) ;
        info.setLocatedIOR( ior );
    }
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:22,代码来源:InterceptorInvoker.java


示例2: getIORFromString

import com.sun.corba.se.impl.orbutil.ORBUtility; //导入依赖的package包/类
/** This static method takes a Stringified IOR and converts it into IOR object.
  * It is the caller's responsibility to only pass strings that start with "IOR:".
  */
private org.omg.CORBA.Object getIORFromString( String str )
{
    // Length must be even for str to be valid
    if ( (str.length() & 1) == 1 )
        throw wrapper.badStringifiedIorLen() ;

    byte[] buf = new byte[(str.length() - ORBConstants.STRINGIFY_PREFIX.length()) / NIBBLES_PER_BYTE];
    for (int i=ORBConstants.STRINGIFY_PREFIX.length(), j=0; i < str.length(); i +=NIBBLES_PER_BYTE, j++) {
         buf[j] = (byte)((ORBUtility.hexOf(str.charAt(i)) << UN_SHIFT) & 0xF0);
         buf[j] |= (byte)(ORBUtility.hexOf(str.charAt(i+1)) & 0x0F);
    }
    EncapsInputStream s = EncapsInputStreamFactory.newEncapsInputStream(orb, buf, buf.length,
            orb.getORBData().getGIOPVersion());
    s.consumeEndian();
    return s.read_Object() ;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:20,代码来源:INSURLOperationImpl.java


示例3: deactivate_object

import com.sun.corba.se.impl.orbutil.ORBUtility; //导入依赖的package包/类
/**
 * <code>deactivate_object</code>
 * <b>3.3.8.16</b>
 */
public void deactivate_object(byte[] id)
    throws ObjectNotActive, WrongPolicy
{
    try {
        lock() ;

        if (debug) {
            ORBUtility.dprint( this,
                "Calling deactivate_object on poa " + this +
                " (id=" + id + ")" ) ;
        }

        mediator.deactivateObject( id ) ;
    } finally {
        if (debug) {
            ORBUtility.dprint( this,
                "Exiting deactivate_object on poa " + this ) ;
        }

        unlock() ;
    }
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:27,代码来源:POAImpl.java


示例4: create_reference

import com.sun.corba.se.impl.orbutil.ORBUtility; //导入依赖的package包/类
/**
 * <code>create_reference</code>
 * <b>3.3.8.17</b>
 */
public org.omg.CORBA.Object create_reference(String repId)
    throws WrongPolicy
{
    try {
        lock() ;

        if (debug) {
            ORBUtility.dprint( this, "Calling create_reference(repId=" +
                repId + ") on poa " + this ) ;
        }

        return makeObject( repId, mediator.newSystemId()) ;
    } finally {
        unlock() ;
    }
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:21,代码来源:POAImpl.java


示例5: write_Object

import com.sun.corba.se.impl.orbutil.ORBUtility; //导入依赖的package包/类
public void write_Object(org.omg.CORBA.Object ref)
{
    if (ref == null) {
        IOR nullIOR = IORFactories.makeIOR( orb ) ;
        nullIOR.write(parent);
        return;
    }

    // IDL to Java formal 01-06-06 1.21.4.2
    if (ref instanceof org.omg.CORBA.LocalObject)
        throw wrapper.writeLocalObject(CompletionStatus.COMPLETED_MAYBE);

    IOR ior = ORBUtility.connectAndGetIOR( orb, ref ) ;
    ior.write(parent);
    return;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:17,代码来源:CDROutputStream_1_0.java


示例6: write_wchar

import com.sun.corba.se.impl.orbutil.ORBUtility; //导入依赖的package包/类
public void write_wchar(char x)
{
    // Don't allow transmission of wchar/wstring data with
    // foreign ORBs since it's against the spec.
    if (ORBUtility.isForeignORB(orb)) {
        throw wrapper.wcharDataInGiop10(CompletionStatus.COMPLETED_MAYBE);
    }

    // If it's one of our legacy ORBs, do what they did:
    alignAndReserve(2, 2);

    if (littleEndian) {
        writeLittleEndianWchar(x);
    } else {
        writeBigEndianWchar(x);
    }
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:18,代码来源:CDROutputStream_1_0.java


示例7: BootstrapResolverImpl

import com.sun.corba.se.impl.orbutil.ORBUtility; //导入依赖的package包/类
public BootstrapResolverImpl(ORB orb, String host, int port) {
    wrapper = ORBUtilSystemException.get( orb,
        CORBALogDomains.ORB_RESOLVER ) ;

    // Create a new IOR with the magic of INIT
    byte[] initialKey = "INIT".getBytes() ;
    ObjectKey okey = orb.getObjectKeyFactory().create(initialKey) ;

    IIOPAddress addr = IIOPFactories.makeIIOPAddress( orb, host, port ) ;
    IIOPProfileTemplate ptemp = IIOPFactories.makeIIOPProfileTemplate(
        orb, GIOPVersion.V1_0, addr);

    IORTemplate iortemp = IORFactories.makeIORTemplate( okey.getTemplate() ) ;
    iortemp.add( ptemp ) ;

    IOR initialIOR = iortemp.makeIOR( (com.sun.corba.se.spi.orb.ORB)orb,
        "", okey.getId() ) ;

    bootstrapDelegate = ORBUtility.makeClientDelegate( initialIOR ) ;
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:21,代码来源:BootstrapResolverImpl.java


示例8: doIt

import com.sun.corba.se.impl.orbutil.ORBUtility; //导入依赖的package包/类
public void doIt( FSM fsm, Input in, boolean debug )
{
    // This method is present only for debugging.
    // innerDoIt does the actual transition.

    if (debug)
        ORBUtility.dprint( this, "doIt enter: currentState = " +
            fsm.getState() + " in = " + in ) ;

    try {
        innerDoIt( fsm, in, debug ) ;
    } finally {
        if (debug)
            ORBUtility.dprint( this, "doIt exit" ) ;
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:17,代码来源:StateEngineImpl.java


示例9: etherealizeAll

import com.sun.corba.se.impl.orbutil.ORBUtility; //导入依赖的package包/类
void etherealizeAll()
{
    try {
        lock() ;

        if (debug) {
            ORBUtility.dprint( this,
                "Calling etheralizeAll on poa " + this ) ;
        }

        mediator.etherealizeAll() ;
    } finally {
        if (debug) {
            ORBUtility.dprint( this,
                "Exiting etheralizeAll on poa " + this ) ;
        }

        unlock() ;
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:21,代码来源:POAImpl.java


示例10: the_activator

import com.sun.corba.se.impl.orbutil.ORBUtility; //导入依赖的package包/类
/**
 * <code>the_activator</code>
 * <b>Section 3.3.8.9</b>
 */
public void the_activator(AdapterActivator activator)
{
    try {
        lock() ;

        if (debug) {
            ORBUtility.dprint( this, "Calling the_activator on poa " +
                this + " activator=" + activator ) ;
        }

        this.activator = activator;
    } finally {
        unlock() ;
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:20,代码来源:POAImpl.java


示例11: releaseAll

import com.sun.corba.se.impl.orbutil.ORBUtility; //导入依赖的package包/类
synchronized int releaseAll()
{
    try {
        if (debug)
            ORBUtility.dprintTrace( this, "releaseAll enter: " +
                " holder_=" + ORBUtility.getThreadName(holder_) +
                " counter_=" + counter_ ) ;

        Thread thr = Thread.currentThread();
        if (thr != holder_)
            throw new INTERNAL(
                "Attempt to releaseAll Mutex by thread not holding the Mutex" ) ;

        int result = counter_ ;
        counter_ = 0 ;
        holder_ = null ;
        notify() ;
        return result ;
    } finally {
        if (debug)
            ORBUtility.dprintTrace( this, "releaseAll exit: " +
                " holder_=" + ORBUtility.getThreadName(holder_) +
                " counter_=" + counter_ ) ;
    }
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:26,代码来源:ReentrantMutex.java


示例12: servant_to_reference

import com.sun.corba.se.impl.orbutil.ORBUtility; //导入依赖的package包/类
/**
 * <code>servant_to_reference</code>
 * <b>3.3.8.20</b>
 */
public org.omg.CORBA.Object servant_to_reference(Servant servant)
    throws ServantNotActive, WrongPolicy
{
    try {
        lock() ;

        if (debug) {
            ORBUtility.dprint( this,
                "Calling servant_to_reference(servant=" +
                servant + ") on poa " + this ) ;
        }

        byte[] oid = mediator.servantToId(servant);
        String repId = servant._all_interfaces( this, oid )[0] ;
        return create_reference_with_id(oid, repId);
    } finally {
        unlock() ;
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:24,代码来源:POAImpl.java


示例13: reference_to_servant

import com.sun.corba.se.impl.orbutil.ORBUtility; //导入依赖的package包/类
/**
 * <code>reference_to_servant</code>
 * <b>3.3.8.21</b>
 */
public Servant reference_to_servant(org.omg.CORBA.Object reference)
    throws ObjectNotActive, WrongPolicy, WrongAdapter
{
    try {
        lock() ;

        if (debug) {
            ORBUtility.dprint( this,
                "Calling reference_to_servant(reference=" +
                reference + ") on poa " + this ) ;
        }

        if ( state >= STATE_DESTROYING ) {
            throw lifecycleWrapper().adapterDestroyed() ;
        }

        // reference_to_id should throw WrongAdapter
        // if the objref was not created by this POA
        byte [] id = internalReferenceToId(reference);

        return mediator.idToServant( id ) ;
    } finally {
        unlock() ;
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:30,代码来源:POAImpl.java


示例14: id_to_reference

import com.sun.corba.se.impl.orbutil.ORBUtility; //导入依赖的package包/类
/**
 * <code>id_to_reference</code>
 * <b>3.3.8.24</b>
 */
public org.omg.CORBA.Object id_to_reference(byte[] id)
    throws ObjectNotActive, WrongPolicy

{
    try {
        lock() ;

        if (debug) {
            ORBUtility.dprint( this, "Calling id_to_reference(id=" +
                id + ") on poa " + this ) ;
        }

        if( state >= STATE_DESTROYING ) {
            throw lifecycleWrapper().adapterDestroyed() ;
        }

        Servant s = mediator.idToServant( id ) ;
        String repId = s._all_interfaces( this, id )[0] ;
        return makeObject(repId, id );
    } finally {
        unlock() ;
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:28,代码来源:POAImpl.java


示例15: exit

import com.sun.corba.se.impl.orbutil.ORBUtility; //导入依赖的package包/类
public void exit()
{
    try {
        lock() ;

        if (debug) {
            ORBUtility.dprint( this, "Calling exit on poa " + this ) ;
        }

        invocationCount--;

        if ((invocationCount == 0) && (state == STATE_DESTROYING)) {
            invokeCV.broadcast();
        }
    } finally {
        if (debug) {
            ORBUtility.dprint( this, "Exiting exit on poa " + this ) ;
        }

        unlock() ;
    }

    manager.exit();
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:25,代码来源:POAImpl.java


示例16: waitUntilRunning

import com.sun.corba.se.impl.orbutil.ORBUtility; //导入依赖的package包/类
private boolean waitUntilRunning()
{
    if (debug) {
        ORBUtility.dprint( this,
            "Calling waitUntilRunning on poa " + this ) ;
    }

    while (state < STATE_RUN) {
        try {
            adapterActivatorCV.await() ;
        } catch (InterruptedException exc) {
            // NO-OP
        }
    }

    if (debug) {
        ORBUtility.dprint( this,
            "Exiting waitUntilRunning on poa " + this ) ;
    }

    // Note that a POA could be destroyed while in STATE_INIT due to a
    // failure in the AdapterActivator upcall.
    return (state == STATE_RUN) ;
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:25,代码来源:POAImpl.java


示例17: exit

import com.sun.corba.se.impl.orbutil.ORBUtility; //导入依赖的package包/类
synchronized void exit()
{
    try {
        if (debug) {
            ORBUtility.dprint( this,
                "Calling exit for POAManagerImpl " + this ) ;
        }

        nInvocations--;

        if ( nInvocations == 0 ) {
            // This notifies any threads that were in the
            // wait_for_completion loop in hold/discard/deactivate().
            notifyWaiters();
        }
    } finally {
        if (debug) {
            ORBUtility.dprint( this,
                "Exiting exit for POAManagerImpl " + this ) ;
        }
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:23,代码来源:POAManagerImpl.java


示例18: lookupServant

import com.sun.corba.se.impl.orbutil.ORBUtility; //导入依赖的package包/类
public synchronized java.lang.Object lookupServant(byte transientKey[])
{
    int index = ORBUtility.bytesToInt(transientKey,0);
    int counter = ORBUtility.bytesToInt(transientKey,4);

    if (orb.transientObjectManagerDebugFlag)
        dprint( "lookupServant called with index=" + index + ", counter=" + counter ) ;

    if (elementArray[index].counter == counter &&
        elementArray[index].valid ) {
        if (orb.transientObjectManagerDebugFlag)
            dprint( "\tcounter is valid" ) ;
        return elementArray[index].servant;
    }

    // servant not found
    if (orb.transientObjectManagerDebugFlag)
        dprint( "\tcounter is invalid" ) ;
    return null;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:21,代码来源:TransientObjectManager.java


示例19: doIt

import com.sun.corba.se.impl.orbutil.ORBUtility; //导入依赖的package包/类
public void doIt( POAImpl thePoa, boolean wait )
{
    if (debug) {
        ORBUtility.dprint( this,
            "Calling DestroyThread.doIt(thePOA=" + thePoa +
            " wait=" + wait + " etherealize=" + etherealize ) ;
    }

    this.thePoa = thePoa ;
    this.wait = wait ;

    if (wait) {
        run() ;
    } else {
        // Catch exceptions since setDaemon can cause a
        // security exception to be thrown under netscape
        // in the Applet mode
        try { setDaemon(true); } catch (Exception e) {}
        start() ;
    }
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:22,代码来源:POAImpl.java


示例20: set_servant_manager

import com.sun.corba.se.impl.orbutil.ORBUtility; //导入依赖的package包/类
/**
 * <code>set_servant_manager</code>
 * <b>Section 3.3.8.10</b>
 */
public void set_servant_manager(ServantManager servantManager)
    throws WrongPolicy
{
    try {
        lock() ;

        if (debug) {
            ORBUtility.dprint( this, "Calling set_servant_manager on poa " +
                this + " servantManager=" + servantManager ) ;
        }

        mediator.setServantManager( servantManager ) ;
    } finally {
        unlock() ;
    }
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:21,代码来源:POAImpl.java



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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