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


Java Object类代码示例

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


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

示例1: resolve_str

import org.omg.CORBA.Object; //导入依赖的package包/类
/**
 * This operation resolves the Stringified name into the object
 * reference.
 * @param sn Stringified Name of the object <p>
 * @exception org.omg.CosNaming.NamingContextPackage.NotFound
 * Indicates there is no object reference for the given name. <p>
 * @exception org.omg.CosNaming.NamingContextPackage.CannotProceed
 * Indicates that the given compound name is incorrect <p>
 * @exception org.omg.CosNaming.NamingContextExtPackage.InvalidName
 * Indicates the name does not identify a binding.<p>
 * @exception org.omg.CosNaming.NamingContextPackage.AlreadyBound
 * Indicates the name is already bound.<p>
 *
 */
public org.omg.CORBA.Object resolve_str(String sn)
    throws org.omg.CosNaming.NamingContextPackage.NotFound,
           org.omg.CosNaming.NamingContextPackage.CannotProceed,
           org.omg.CosNaming.NamingContextPackage.InvalidName
{
    org.omg.CORBA.Object theObject = null;
    // Name valid?
    if  ( (sn == null ) || (sn.length() == 0) )
    {
            throw new InvalidName();
    }
    NamingContextDataStore impl = (NamingContextDataStore)this;
    org.omg.CosNaming.NameComponent[] theNameComponents =
            insImpl.convertToNameComponent( sn );

    if( ( theNameComponents == null ) || (theNameComponents.length == 0 ) )
    {
            throw new InvalidName();
    }
    theObject = resolve( theNameComponents );
    return theObject;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:37,代码来源:NamingContextImpl.java

示例2: TransientNamingContext

import org.omg.CORBA.Object; //导入依赖的package包/类
/**
 * Constructs a new TransientNamingContext object.
 * @param orb an orb object.
 * @param initial the initial naming context.
 * @exception Exception a Java exception thrown of the base class cannot
 * initialize.
 */
public TransientNamingContext(com.sun.corba.se.spi.orb.ORB orb,
    org.omg.CORBA.Object initial,
    POA nsPOA )
    throws java.lang.Exception
{
    super(orb, nsPOA );
    wrapper = NamingSystemException.get( orb, CORBALogDomains.NAMING ) ;

    this.localRoot = initial;
    readLogger = orb.getLogger( CORBALogDomains.NAMING_READ);
    updateLogger = orb.getLogger( CORBALogDomains.NAMING_UPDATE);
    lifecycleLogger = orb.getLogger(
        CORBALogDomains.NAMING_LIFECYCLE);
    lifecycleLogger.fine( "Root TransientNamingContext LIFECYCLE.CREATED" );
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:23,代码来源:TransientNamingContext.java

示例3: Unbind

import org.omg.CORBA.Object; //导入依赖的package包/类
/**
 * Deletes the binding with the supplied name. It creates a
 * InternalBindingKey and uses it to remove the value associated
 * with the key. If nothing is found an exception is thrown, otherwise
 * the element is removed from the hash table.
 * @param n a NameComponent which is the name to unbind
 * @return the object reference bound to the name, or null if not found.
 * @exception org.omg.CORBA.SystemException One of a fixed set of CORBA
 * system exceptions.
 */
public final org.omg.CORBA.Object Unbind(NameComponent n)
    throws org.omg.CORBA.SystemException
{
    // Create a key and remove it from the hashtable
    InternalBindingKey key = new InternalBindingKey(n);
    InternalBindingValue value =
        (InternalBindingValue)this.theHashtable.remove(key);

    // Return what was found
    if (value == null) {
        if( updateLogger.isLoggable( Level.FINE ) ) {
            updateLogger.fine( LogKeywords.NAMING_UNBIND_FAILURE +
                " There was no binding with the name " + getName( n ) +
                " to Unbind " );
        }
        return null;
    } else {
        if( updateLogger.isLoggable( Level.FINE ) ) {
            updateLogger.fine( LogKeywords.NAMING_UNBIND_SUCCESS +
                " NameComponent:  " + getName( n ) );
        }
        return value.theObjectRef;
   }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:35,代码来源:TransientNamingContext.java

示例4: resolve_str

import org.omg.CORBA.Object; //导入依赖的package包/类
/**
 * This operation resolves the Stringified name into the object
 * reference.
 * @param sn Stringified Name of the object <p>
 * @exception org.omg.CosNaming.NamingContextPackage.NotFound
 * Indicates there is no object reference for the given name. <p>
 * @exception org.omg.CosNaming.NamingContextPackage.CannotProceed
 * Indicates that the given compound name is incorrect <p>
 * @exception org.omg.CosNaming.NamingContextExtPackage.InvalidName
 * Indicates the name does not identify a binding.<p>
 *
 */
public org.omg.CORBA.Object resolve_str(String sn)
    throws org.omg.CosNaming.NamingContextPackage.NotFound,
           org.omg.CosNaming.NamingContextPackage.CannotProceed,
           org.omg.CosNaming.NamingContextPackage.InvalidName
{
    org.omg.CORBA.Object theObject = null;
    // Name valid?
    if  ( (sn == null ) || (sn.length() == 0) )
    {
            throw new org.omg.CosNaming.NamingContextPackage.InvalidName();
    }
    org.omg.CosNaming.NameComponent[] theNameComponents =
            getINSImpl().convertToNameComponent( sn );
    if( ( theNameComponents == null ) || (theNameComponents.length == 0 ) )
    {
            throw new org.omg.CosNaming.NamingContextPackage.InvalidName();
    }
    theObject = resolve( theNameComponents );
    return theObject;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:33,代码来源:NamingContextImpl.java

示例5: write_Object

import org.omg.CORBA.Object; //导入依赖的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: effective_target

import org.omg.CORBA.Object; //导入依赖的package包/类
/**
 * The actual object on which the operation will be invoked.  If the
 * reply_status is LOCATION_FORWARD, then on subsequent requests,
 * effective_target will contain the forwarded IOR while target will
 * remain unchanged.
 */
public org.omg.CORBA.Object effective_target() {
    // access is currently valid for all states:
    //checkAccess( MID_EFFECTIVE_TARGET );

    // Note: This is not necessarily the same as locatedIOR.
    // Reason: See the way we handle COMM_FAILURES in
    // ClientRequestDispatcher.createRequest, v1.32

    if (cachedEffectiveTargetObject == null) {
        CorbaContactInfo corbaContactInfo = (CorbaContactInfo)
            messageMediator.getContactInfo();
        // REVISIT - get through chain like getLocatedIOR helper below.
        cachedEffectiveTargetObject =
            iorToObject(corbaContactInfo.getEffectiveTargetIOR());
    }
    return cachedEffectiveTargetObject;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:24,代码来源:ClientRequestInfoImpl.java

示例7: forward_reference

import org.omg.CORBA.Object; //导入依赖的package包/类
/**
 * See RequestInfoImpl for javadoc.
 */
public Object forward_reference (){
    checkAccess( MID_FORWARD_REFERENCE );
    // Check to make sure we are in LOCATION_FORWARD
    // state as per ptc/00-08-06, table 21-1
    // footnote 2.
    if( replyStatus != LOCATION_FORWARD.value ) {
        throw stdWrapper.invalidPiCall1() ;
    }

    // Do not cache this value since if an interceptor raises
    // forward request then the next interceptor in the
    // list should see the new value.
    IOR ior = getLocatedIOR();
    return iorToObject(ior);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:19,代码来源:ClientRequestInfoImpl.java

示例8: resolve_str

import org.omg.CORBA.Object; //导入依赖的package包/类
/**
 * This operation resolves the Stringified name into the object
 * reference.
 * @param sn Stringified Name of the object
 * @exception org.omg.CosNaming.NamingContextPackage.NotFound
 * Indicates there is no object reference for the given name.
 * @exception org.omg.CosNaming.NamingContextPackage.CannotProceed
 * Indicates that the given compound name is incorrect
 * @exception org.omg.CosNaming.NamingContextExtPackage.InvalidName
 * Indicates the name does not identify a binding.
 * @exception org.omg.CosNaming.NamingContextPackage.AlreadyBound
 * Indicates the name is already bound.
 *
 */
public org.omg.CORBA.Object resolve_str(String sn)
    throws org.omg.CosNaming.NamingContextPackage.NotFound,
           org.omg.CosNaming.NamingContextPackage.CannotProceed,
           org.omg.CosNaming.NamingContextPackage.InvalidName
{
    org.omg.CORBA.Object theObject = null;
    // Name valid?
    if  ( (sn == null ) || (sn.length() == 0) )
    {
            throw new InvalidName();
    }
    NamingContextDataStore impl = (NamingContextDataStore)this;
    org.omg.CosNaming.NameComponent[] theNameComponents =
            insImpl.convertToNameComponent( sn );

    if( ( theNameComponents == null ) || (theNameComponents.length == 0 ) )
    {
            throw new InvalidName();
    }
    theObject = resolve( theNameComponents );
    return theObject;
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:37,代码来源:NamingContextImpl.java

示例9: Bind

import org.omg.CORBA.Object; //导入依赖的package包/类
/**
 * Binds the object to the name component as the specified binding type.
 * It creates a InternalBindingKey object and a InternalBindingValue
 * object and inserts them in the hash table.
 * @param n A single org.omg.CosNaming::NameComponent under which the
 * object will be bound.
 * @param obj An object reference to be bound under the supplied name.
 * @param bt The type of the binding (i.e., as object or as context).
 * @exception org.omg.CORBA.SystemException One of a fixed set of CORBA
 * system exceptions.
 */
public final void Bind(NameComponent n, org.omg.CORBA.Object obj,
                       BindingType bt)
    throws org.omg.CORBA.SystemException
{
    // Create a key and a value
    InternalBindingKey key = new InternalBindingKey(n);
    NameComponent[] name = new NameComponent[1];
    name[0] = n;
    Binding b = new Binding(name,bt);
    InternalBindingValue value = new InternalBindingValue(b,null);
    value.theObjectRef = obj;
    // insert it
    InternalBindingValue oldValue =
        (InternalBindingValue)this.theHashtable.put(key,value);

    if (oldValue != null) {
        updateLogger.warning( LogKeywords.NAMING_BIND + "Name " +
            getName( n ) + " Was Already Bound" );
        throw wrapper.transNcBindAlreadyBound() ;
    }
    if( updateLogger.isLoggable( Level.FINE ) ) {
        updateLogger.fine( LogKeywords.NAMING_BIND_SUCCESS +
            "Name Component: " + n.id + "." + n.kind );
    }
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:37,代码来源:TransientNamingContext.java

示例10: resolve_str

import org.omg.CORBA.Object; //导入依赖的package包/类
/**
 * This operation resolves the Stringified name into the object
 * reference.
 * @param sn Stringified Name of the object
 * @exception org.omg.CosNaming.NamingContextPackage.NotFound
 * Indicates there is no object reference for the given name.
 * @exception org.omg.CosNaming.NamingContextPackage.CannotProceed
 * Indicates that the given compound name is incorrect
 * @exception org.omg.CosNaming.NamingContextExtPackage.InvalidName
 * Indicates the name does not identify a binding.
 */
public org.omg.CORBA.Object resolve_str(String sn)
    throws org.omg.CosNaming.NamingContextPackage.NotFound,
           org.omg.CosNaming.NamingContextPackage.CannotProceed,
           org.omg.CosNaming.NamingContextPackage.InvalidName
{
    org.omg.CORBA.Object theObject = null;
    // Name valid?
    if  ( (sn == null ) || (sn.length() == 0) )
    {
            throw new org.omg.CosNaming.NamingContextPackage.InvalidName();
    }
    org.omg.CosNaming.NameComponent[] theNameComponents =
            getINSImpl().convertToNameComponent( sn );
    if( ( theNameComponents == null ) || (theNameComponents.length == 0 ) )
    {
            throw new org.omg.CosNaming.NamingContextPackage.InvalidName();
    }
    theObject = resolve( theNameComponents );
    return theObject;
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:32,代码来源:NamingContextImpl.java

示例11: bindIntentsAndUnbindIntentsOnlyOnce

import org.omg.CORBA.Object; //导入依赖的package包/类
@Test public void bindIntentsAndUnbindIntentsOnlyOnce() {

    final AtomicInteger bindInvocations = new AtomicInteger(0);
    final AtomicInteger unbindInvocations = new AtomicInteger(0);

    MvpView view = new MvpView() {
    };

    MviBasePresenter<MvpView, Object> presenter = new MviBasePresenter<MvpView, Object>() {
      @Override protected void bindIntents() {
        bindInvocations.incrementAndGet();
      }

      @Override protected void unbindIntents() {
        super.unbindIntents();
        unbindInvocations.incrementAndGet();
      }
    };

    presenter.attachView(view);
    presenter.detachView(true);
    presenter.attachView(view);
    presenter.detachView(true);
    presenter.attachView(view);
    presenter.detachView(false);

    Assert.assertEquals(1, bindInvocations.get());
    Assert.assertEquals(1, unbindInvocations.get());
  }
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:30,代码来源:MviBasePresenterTest.java

示例12: resetOnViewDetachedPermanently

import org.omg.CORBA.Object; //导入依赖的package包/类
@Test
public void resetOnViewDetachedPermanently(){
  final AtomicInteger bindInvocations = new AtomicInteger(0);
  final AtomicInteger unbindInvocations = new AtomicInteger(0);

  MvpView view = new MvpView() {
  };

  MviBasePresenter<MvpView, Object> presenter = new MviBasePresenter<MvpView, Object>() {
    @Override protected void bindIntents() {
      bindInvocations.incrementAndGet();
    }

    @Override protected void unbindIntents() {
      super.unbindIntents();
      unbindInvocations.incrementAndGet();
    }
  };

  presenter.attachView(view);
  presenter.detachView(false);
  presenter.attachView(view);
  presenter.detachView(true);
  presenter.attachView(view);
  presenter.detachView(false);

  Assert.assertEquals(2, bindInvocations.get());
  Assert.assertEquals(2, unbindInvocations.get());
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:30,代码来源:MviBasePresenterTest.java

示例13: resetOnViewDetachedPermanently

import org.omg.CORBA.Object; //导入依赖的package包/类
@Test public void resetOnViewDetachedPermanently() {
  final AtomicInteger bindInvocations = new AtomicInteger(0);
  final AtomicInteger unbindInvocations = new AtomicInteger(0);

  MvpView view = new MvpView() {
  };

  MviBasePresenter<MvpView, Object> presenter = new MviBasePresenter<MvpView, Object>() {
    @Override protected void bindIntents() {
      bindInvocations.incrementAndGet();
    }

    @Override protected void unbindIntents() {
      super.unbindIntents();
      unbindInvocations.incrementAndGet();
    }
  };

  presenter.attachView(view);
  presenter.detachView(false);
  presenter.attachView(view);
  presenter.detachView(true);
  presenter.attachView(view);
  presenter.detachView(false);

  Assert.assertEquals(2, bindInvocations.get());
  Assert.assertEquals(2, unbindInvocations.get());
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:29,代码来源:MviBasePresenterTest.java

示例14: convertNull

import org.omg.CORBA.Object; //导入依赖的package包/类
@Test
public void convertNull() {
    assertNull("Should return null", converter.convert(null, null, null));
    assertNull("Should return null", converter.convert(Object.class, Object.class, null));
    assertNull("Should return null", converter.convert(String.class, String.class, null));
    assertNull("Should return null", converter.convert(TestEnum.class, TestEnum.class, null));
    assertNull("Should return null", converter.convert(Double.class, Double.class, null));

    assertNull("Should return null", converter.convert(null, null, "null"));
    assertNull("Should return null", converter.convert(Object.class, Object.class, "null"));
    assertNull("Should return null", converter.convert(String.class, String.class, "null"));
    assertNull("Should return null", converter.convert(TestEnum.class, TestEnum.class, "null"));
    assertNull("Should return null", converter.convert(Double.class, Double.class, "null"));
}
 
开发者ID:tools4j,项目名称:spockito,代码行数:15,代码来源:ValueConverterTest.java

示例15: convertClass

import org.omg.CORBA.Object; //导入依赖的package包/类
@Test
public void convertClass() {
    final Class<?>[] classes = new Class<?>[] {
            getClass(),
            Spockito.class,
            Object.class,
            String.class,
            TestEnum.class,
            TestEnum.CONST_A.getClass()
    };
    for (final Class<?> exp : classes) {
        assertEquals("Unexpected intValue", exp, converter.convert(Class.class, null, exp.getName()));
    }
}
 
开发者ID:tools4j,项目名称:spockito,代码行数:15,代码来源:ValueConverterTest.java


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