Package net.sf.joafip.store.service.proxy

Examples of net.sf.joafip.store.service.proxy.IProxyCallBackProxyDelegation


    node = ProxyTestListNode.newInstance(instanceFactory);
    assertTrue("must be a proxy", ProxyManager2.isProxyOrEnhanced(node));
    assertTrue("must be loaded", ProxyManager2.proxiedObjectIsLoaded(node));

    // check is attached to file persistence
    final IProxyCallBackProxyDelegation proxyCallBack;
    if (javaAgentTransformerInstalled()) {
      proxyCallBack = StaticProxyCallBack.getProxyCallBack(node);
    } else {
      assertTrue("must be instance of IProxyInternal",
          node instanceof IProxyInternal);
      proxyCallBack = ((IProxyInternal) node).getProxyCallBack$JOAFIP$();
    }

    final IObjectIOManagerForProxyObjectIO objectIoManager = proxyCallBack
        .getObjectIOManager$JOAFIP$();
    assertSame("bad file persistence association",
        objectIOManagerOfFilePersistence, objectIoManager);
    final ObjectAndPersistInfo objectAndPersistInfo = objectIOManagerOfFilePersistence
        .getObjectAndPersistInfoOfObject(node);
View Full Code Here


  }

  private boolean assertProxyCallBack(
      final IProxyCallBackToImplement proxyCallBack) {
    final Object localObject = getObject();
    final IProxyCallBackProxyDelegation proxyCallBackOflocalObject = ProxyManager2
        .getProxyCallBack(localObject);
    if (proxyCallBackOflocalObject == null) {
      if (localObject == null) {
        throw new AssertionError(
            "null have not proxy call back. expected "
                + (proxyCallBack == null ? "none"
                    : proxyCallBack.getClass()));
      } else {
        throw new AssertionError("no proxy call back for "
            + localObject.getClass().getName()
            + "@"
            + System.identityHashCode(localObject)
            + ". expected "
            + (proxyCallBack == null ? "none"
                : proxyCallBack.getClass()));
      }
    }
    final ObjectAndPersistInfo localObjectAndPersistInfo = proxyCallBackOflocalObject
        .getInstance$JOAFIP$();
    if (localObjectAndPersistInfo != this) {
      throw new AssertionError(
          "proxy call back must reference this\nthis creation");
    }
    if (proxyCallBackOflocalObject != proxyCallBack) { // NOPMD
      throw new AssertionError("proxy call back mismatch set to "
          + (proxyCallBack == null ? "none"
              : proxyCallBack.getClass())
          + " and current is "
          + (proxyCallBackOflocalObject == null ? "none"
              : proxyCallBackOflocalObject.getClass())
          + " for instance of " + localObject.getClass());
    }
    return true;
  }
View Full Code Here

TOP

Related Classes of net.sf.joafip.store.service.proxy.IProxyCallBackProxyDelegation

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.