Examples of IObjectId


Examples of org.jamesii.core.remote.hostcentral.IObjectId

    HostCentralIDFactory idFac = new HostCentralIDFactory();
    d = new Dummy();
    id = idFac.create(new ParameterBlock(d, HostCentralIDFactory.PARAM_OBJECT), SimSystem.getRegistry().createContext());
    assertTrue(null != id);

    IObjectId id2 =
        new BasicRemoteObjectId(id.getStringRep(), d.getClass().getName());

    assertEquals(id.getStringRep(), id2.getStringRep());
    assertTrue(id.equals(id2));
    assertNotSame(id, id2);

    // this is necessary as the hashmap relies on it
    assertEquals(id.hashCode(), id2.hashCode());

    lcc.registerObject(id, d);
    try {
      assertEquals(d, rcc.getObjectById(id2));
    } catch (RemoteException e) {
View Full Code Here

Examples of org.jamesii.core.remote.hostcentral.IObjectId

   */
  public void testIDcreation() {
    HostCentralIDFactory hcIDfac = new HostCentralIDFactory();
    Object o = new Object();
    ParameterBlock p = new ParameterBlock(o, HostCentralIDFactory.PARAM_OBJECT);
    IObjectId id = hcIDfac.create(p, SimSystem.getRegistry().createContext());
    IObjectId id2 =
        new BasicRemoteObjectId(id.getStringRep(), o.getClass().getName());

    // System.out.println(id.getStringRep());
    // System.out.println(id2.getStringRep());

    // for the same object we should always receive the same id
    assertTrue(id.equals(id2));
    assertEquals(id.hashCode(), id2.hashCode());
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.