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


Java Stub类代码示例

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


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

示例1: getOrb

import javax.rmi.CORBA.Stub; //导入依赖的package包/类
@Override
public Object getOrb(Object stub) {
    try {
        return ((Stub)stub)._orb();
    } catch (org.omg.CORBA.BAD_OPERATION x) {
        throw new UnsupportedOperationException(x);
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:9,代码来源:IIOPProxyImpl.java

示例2: exportObject

import javax.rmi.CORBA.Stub; //导入依赖的package包/类
/**
 * Find or create a tie for this target and mark it as being used by the given
 * object.
 */
public void exportObject(Remote obj)
  throws RemoteException
{
  if (obj instanceof Stub)
    Util.registerTarget(StubDelegateImpl.getTieFromStub((Stub) obj), obj);
  else if (obj instanceof Tie)
    {
      Tie t = (Tie) obj;
      Util.registerTarget(t, null);
    }
}
 
开发者ID:vilie,项目名称:javify,代码行数:16,代码来源:PortableRemoteObjectDelegateImpl.java

示例3: equals

import javax.rmi.CORBA.Stub; //导入依赖的package包/类
/**
 * Compare two stubs for equality.
 */
public boolean equals(Stub self, java.lang.Object obj)
{
  if (obj instanceof ObjectImpl)
    {
      ObjectImpl other = (ObjectImpl) obj;
      Delegate d1 = other._get_delegate();
      Delegate d2 = self._get_delegate();
      if (d1 == null || d2 == null)
        return d1 == d2;
      else
        return d1.equals(d2);
    }
  else return false;
}
 
开发者ID:vilie,项目名称:javify,代码行数:18,代码来源:StubDelegateImpl.java

示例4: toString

import javax.rmi.CORBA.Stub; //导入依赖的package包/类
/**
 * Returns the IOR reference of the connected ORB.
 *
 * @see ORB#object_to_string(org.omg.CORBA.Object);
 */
public String toString(Stub self)
{
  try
    {
      return self._orb().object_to_string(self);
    }
  catch (Exception ex)
    {
      return null;
    }
}
 
开发者ID:vilie,项目名称:javify,代码行数:17,代码来源:StubDelegateImpl.java

示例5: readObject

import javax.rmi.CORBA.Stub; //导入依赖的package包/类
/**
 * Read as CORBA object when the ORB is known. The ORB must be set under the
 * previous call of Stub.connect. The Stub is automatically registered with
 * this ORB.
 */
public void readObject(Stub self, ObjectInputStream input, ORB orb)
  throws IOException, ClassNotFoundException
{
  byte[] b = (byte[]) input.readObject();
  BufferredCdrInput in = new BufferredCdrInput(b);

  if (orb != null)
    in.setOrb(orb);

  ObjectImpl r = (ObjectImpl) in.read_Object();

  self._set_delegate(r._get_delegate());
}
 
开发者ID:vilie,项目名称:javify,代码行数:19,代码来源:StubDelegateImpl.java

示例6: writeObject

import javax.rmi.CORBA.Stub; //导入依赖的package包/类
/**
 * Write as CORBA object. The ORB must be either set under the previous call
 * of Stub.connect or it is taken from the org.omg.CORBA.portable.Delegate.
 * The Stub is automatically registered with this ORB (if not already done).
 */
public void writeObject(Stub self, ObjectOutputStream output, ORB orb)
  throws IOException
{
  BufferedCdrOutput out = new BufferedCdrOutput();
  out.setOrb(orb == null ? self._orb() : orb);
  out.write_Object(self);

  output.writeObject(out.buffer.toByteArray());
}
 
开发者ID:vilie,项目名称:javify,代码行数:15,代码来源:StubDelegateImpl.java

示例7: isLocal

import javax.rmi.CORBA.Stub; //导入依赖的package包/类
/**
 * Checks if the given stub is local.
 *
 * @param stub a stub to check.
 * @return true if the stub is local, false otherwise.
 */
public boolean isLocal(Stub stub)
  throws RemoteException
{
  try
    {
      return stub._is_local();
    }
  catch (SystemException e)
    {
      RemoteException rex = new RemoteException();
      rex.initCause(e);
      throw rex;
    }
}
 
开发者ID:vilie,项目名称:javify,代码行数:21,代码来源:UtilDelegateImpl.java

示例8: toString

import javax.rmi.CORBA.Stub; //导入依赖的package包/类
/**
 * Returns the IOR reference of the connected ORB.
 * 
 * @see ORB#object_to_string(org.omg.CORBA.Object);
 */
public String toString(Stub self)
{
  try
    {
      return self._orb().object_to_string(self);
    }
  catch (Exception ex)
    {
      return null;
    }
}
 
开发者ID:nmldiegues,项目名称:jvm-stm,代码行数:17,代码来源:StubDelegateImpl.java

示例9: isLocal

import javax.rmi.CORBA.Stub; //导入依赖的package包/类
/**
 * Checks if the given stub is local.
 * 
 * @param stub a stub to check.
 * @return true if the stub is local, false otherwise.
 */
public boolean isLocal(Stub stub)
  throws RemoteException
{
  try
    {
      return stub._is_local();
    }
  catch (SystemException e)
    {
      RemoteException rex = new RemoteException();
      rex.initCause(e);
      throw rex;
    }
}
 
开发者ID:nmldiegues,项目名称:jvm-stm,代码行数:21,代码来源:UtilDelegateImpl.java

示例10: connect

import javax.rmi.CORBA.Stub; //导入依赖的package包/类
public static Object connect(final Object obj) throws IOException {
    if (obj instanceof Stub) {
        final Stub stub = (Stub) obj;
        final ORB orb = getORB();
        stub.connect(orb);
    }
    return obj;
}
 
开发者ID:apache,项目名称:tomee,代码行数:9,代码来源:Corbas.java

示例11: isStub

import javax.rmi.CORBA.Stub; //导入依赖的package包/类
@Override
public boolean isStub(Object obj) {
    return (obj instanceof Stub);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:5,代码来源:IIOPProxyImpl.java

示例12: getDelegate

import javax.rmi.CORBA.Stub; //导入依赖的package包/类
@Override
public Object getDelegate(Object stub) {
    return ((Stub)stub)._get_delegate();
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:5,代码来源:IIOPProxyImpl.java

示例13: setDelegate

import javax.rmi.CORBA.Stub; //导入依赖的package包/类
@Override
public void setDelegate(Object stub, Object delegate) {
    ((Stub)stub)._set_delegate((Delegate)delegate);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:5,代码来源:IIOPProxyImpl.java

示例14: connect

import javax.rmi.CORBA.Stub; //导入依赖的package包/类
@Override
public void connect(Object stub, Object orb)
    throws RemoteException
{
    ((Stub)stub).connect((ORB)orb);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:7,代码来源:IIOPProxyImpl.java


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