Package com.kurento.tool.rom.client

Examples of com.kurento.tool.rom.client.RomClientObjectManager


  }

  @Test
  public void testRomClientObjectManager() {

    RomClientObjectManager manager = new RomClientObjectManager(null);
    new RemoteObject("xxx", null, null, manager);

    if (null == manager.getRemoteObject("xxx")) {
      Assert.fail("Reference should NOT be null");
    }

    try {
      @SuppressWarnings("unused")
      Object[] ignored = new Object[(int) Runtime.getRuntime()
          .maxMemory()];
    } catch (Throwable e) {
      // Ignore OME
    }

    if (null != manager.getRemoteObject("xxx")) {
      Assert.fail("Reference should be null");
    }
  }
View Full Code Here


  }

  @Test
  public void testRomClientObjectManager2() {

    RomClientObjectManager manager = new RomClientObjectManager(null);
    RemoteObject obj = new RemoteObject("xxx", null, null, manager);

    if (obj != manager.getRemoteObject("xxx")) {
      Assert.fail("Reference should be equals to inserted remote object");
    }

    obj = null;

    try {
      @SuppressWarnings("unused")
      Object[] ignored = new Object[(int) Runtime.getRuntime()
          .maxMemory()];
    } catch (Throwable e) {
      // Ignore OME
    }

    if (null != manager.getRemoteObject("xxx")) {
      Assert.fail("Reference should be null");
    }
  }
View Full Code Here

    Object remoteObject = manager.getObject(value);
    if (remoteObject == null) {

      if (manager instanceof RomClientObjectManager) {

        RomClientObjectManager clientManager = (RomClientObjectManager) manager;
        RemoteObject newRemoteObject = new RemoteObject(value,
            ((Class<?>) type).getSimpleName(),
            clientManager.getClient(), clientManager);
        clientManager.registerObject(value, newRemoteObject);
        return newRemoteObject;

      }

      throw new ProtocolException("Remote object with objectRef '"
View Full Code Here

TOP

Related Classes of com.kurento.tool.rom.client.RomClientObjectManager

Copyright © 2018 www.massapicom. 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.