Package net.sf.cglib.proxy

Examples of net.sf.cglib.proxy.Callback


        return serializationMethodInvoker.callReadResolve(result);
    }

    private void readCallback(final HierarchicalStreamReader reader, final UnmarshallingContext context,
            final List<Callback> callbacksToEnhance, final List<Callback> callbacks) {
        final Callback callback = (Callback)context.convertAnother(null, mapper.realClass(reader.getNodeName()));
        callbacks.add(callback);
        if (callback == null) {
            callbacksToEnhance.add(NoOp.INSTANCE);
        } else {
            callbacksToEnhance.add(callback);
View Full Code Here


    boolean exposeProxy = this.advised.isExposeProxy();
    boolean isFrozen = this.advised.isFrozen();
    boolean isStatic = this.advised.getTargetSource().isStatic();

    // Choose an "aop" interceptor (used for AOP calls).
    Callback aopInterceptor = new DynamicAdvisedInterceptor(this.advised);

    // Choose a "straight to target" interceptor. (used for calls that are
    // unadvised but can return this). May be required to expose the proxy.
    Callback targetInterceptor = null;

    if (exposeProxy) {
      targetInterceptor = isStatic ?
          (Callback) new StaticUnadvisedExposedInterceptor(this.advised.getTargetSource().getTarget()) :
          (Callback) new DynamicUnadvisedExposedInterceptor(this.advised.getTargetSource());
    }
    else {
      targetInterceptor = isStatic ?
          (Callback) new StaticUnadvisedInterceptor(this.advised.getTargetSource().getTarget()) :
          (Callback) new DynamicUnadvisedInterceptor(this.advised.getTargetSource());
    }

    // Choose a "direct to target" dispatcher (used for
    // unadvised calls to static targets that cannot return this).
    Callback targetDispatcher = isStatic ?
        (Callback) new StaticDispatcher(this.advised.getTargetSource().getTarget()) : new SerializableNoOp();

    Callback[] mainCallbacks = new Callback[]{
      aopInterceptor, // for normal advice
      targetInterceptor, // invoke target without considering advice, if optimized
View Full Code Here

      if (proxy == other) {
        return Boolean.TRUE;
      }
      AdvisedSupport otherAdvised = null;
      if (other instanceof Factory) {
        Callback callback = ((Factory) other).getCallback(INVOKE_EQUALS);
        if (!(callback instanceof EqualsInterceptor)) {
          return Boolean.FALSE;
        }
        otherAdvised = ((EqualsInterceptor) callback).advised;
      }
View Full Code Here

    }

    private Service createServiceProxy(Class superClass, Bundle bundle, QName serviceName, URL wsdlLocation) throws NamingException {
        if (this.serviceConstructor == null) {
            // create method interceptors
            Callback callback = getPortMethodInterceptor();
            this.methodInterceptors = new Callback[] {NoOp.INSTANCE, callback};

            // create service class
            Enhancer enhancer = new Enhancer();
            enhancer.setClassLoader(new BundleClassLoader(bundle));
View Full Code Here

            } catch (ClassNotFoundException e) {
                throw (NamingException)new NamingException("Could not load service interface class " + serviceInterfaceClassName).initCause(e);
            }
               
            // create method interceptors
            Callback callback = new ServiceMethodInterceptor(seiPortNameToFactoryMap);
            this.methodInterceptors = new Callback[]{SerializableNoOp.INSTANCE, callback};
        
            // create service class
            Enhancer enhancer = new Enhancer();
            enhancer.setClassLoader(classLoader);
View Full Code Here

    boolean exposeProxy = this.advised.isExposeProxy();
    boolean isFrozen = this.advised.isFrozen();
    boolean isStatic = this.advised.getTargetSource().isStatic();

    // Choose an "aop" interceptor (used for AOP calls).
    Callback aopInterceptor = new DynamicAdvisedInterceptor(this.advised);

    // Choose a "straight to target" interceptor. (used for calls that are
    // unadvised but can return this). May be required to expose the proxy.
    Callback targetInterceptor;
    if (exposeProxy) {
      targetInterceptor = isStatic ?
          new StaticUnadvisedExposedInterceptor(this.advised.getTargetSource().getTarget()) :
          new DynamicUnadvisedExposedInterceptor(this.advised.getTargetSource());
    }
    else {
      targetInterceptor = isStatic ?
          new StaticUnadvisedInterceptor(this.advised.getTargetSource().getTarget()) :
          new DynamicUnadvisedInterceptor(this.advised.getTargetSource());
    }

    // Choose a "direct to target" dispatcher (used for
    // unadvised calls to static targets that cannot return this).
    Callback targetDispatcher = isStatic ?
        new StaticDispatcher(this.advised.getTargetSource().getTarget()) : new SerializableNoOp();

    Callback[] mainCallbacks = new Callback[]{
      aopInterceptor, // for normal advice
      targetInterceptor, // invoke target without considering advice, if optimized
View Full Code Here

      Object other = args[0];
      if (proxy == other) {
        return true;
      }
      if (other instanceof Factory) {
        Callback callback = ((Factory) other).getCallback(INVOKE_EQUALS);
        if (!(callback instanceof EqualsInterceptor)) {
          return false;
        }
        AdvisedSupport otherAdvised = ((EqualsInterceptor) callback).advised;
        return AopProxyUtils.equalsInProxy(this.advised, otherAdvised);
View Full Code Here

    boolean exposeProxy = this.advised.isExposeProxy();
    boolean isFrozen = this.advised.isFrozen();
    boolean isStatic = this.advised.getTargetSource().isStatic();

    // Choose an "aop" interceptor (used for AOP calls).
    Callback aopInterceptor = new DynamicAdvisedInterceptor(this.advised);

    // Choose a "straight to target" interceptor. (used for calls that are
    // unadvised but can return this). May be required to expose the proxy.
    Callback targetInterceptor = null;

    if (exposeProxy) {
      targetInterceptor = isStatic ?
          (Callback) new StaticUnadvisedExposedInterceptor(this.advised.getTargetSource().getTarget()) :
          (Callback) new DynamicUnadvisedExposedInterceptor(this.advised.getTargetSource());
    }
    else {
      targetInterceptor = isStatic ?
          (Callback) new StaticUnadvisedInterceptor(this.advised.getTargetSource().getTarget()) :
          (Callback) new DynamicUnadvisedInterceptor(this.advised.getTargetSource());
    }

    // Choose a "direct to target" dispatcher (used for
    // unadvised calls to static targets that cannot return this).
    Callback targetDispatcher = isStatic ?
        (Callback) new StaticDispatcher(this.advised.getTargetSource().getTarget()) : new SerializableNoOp();

    Callback[] mainCallbacks = new Callback[]{
      aopInterceptor, // for normal advice
      targetInterceptor, // invoke target without considering advice, if optimized
View Full Code Here

      if (proxy == other) {
        return Boolean.TRUE;
      }
      AdvisedSupport otherAdvised = null;
      if (other instanceof Factory) {
        Callback callback = ((Factory) other).getCallback(INVOKE_EQUALS);
        if (!(callback instanceof EqualsInterceptor)) {
          return Boolean.FALSE;
        }
        otherAdvised = ((EqualsInterceptor) callback).advised;
      }
View Full Code Here

    boolean exposeProxy = this.advised.isExposeProxy();
    boolean isFrozen = this.advised.isFrozen();
    boolean isStatic = this.advised.getTargetSource().isStatic();

    // Choose an "aop" interceptor (used for AOP calls).
    Callback aopInterceptor = new DynamicAdvisedInterceptor(this.advised);

    // Choose a "straight to target" interceptor. (used for calls that are
    // unadvised but can return this). May be required to expose the proxy.
    Callback targetInterceptor = null;

    if (exposeProxy) {
      targetInterceptor = isStatic ?
          (Callback) new StaticUnadvisedExposedInterceptor(this.advised.getTargetSource().getTarget()) :
          (Callback) new DynamicUnadvisedExposedInterceptor(this.advised.getTargetSource());
    }
    else {
      targetInterceptor = isStatic ?
          (Callback) new StaticUnadvisedInterceptor(this.advised.getTargetSource().getTarget()) :
          (Callback) new DynamicUnadvisedInterceptor(this.advised.getTargetSource());
    }

    // Choose a "direct to target" dispatcher (used for
    // unadvised calls to static targets that cannot return this).
    Callback targetDispatcher = isStatic ?
        (Callback) new StaticDispatcher(this.advised.getTargetSource().getTarget()) : new SerializableNoOp();

    Callback[] mainCallbacks = new Callback[]{
      aopInterceptor, // for normal advice
      targetInterceptor, // invoke target without considering advice, if optimized
View Full Code Here

TOP

Related Classes of net.sf.cglib.proxy.Callback

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.