Package org.jboss.aop.proxy

Examples of org.jboss.aop.proxy.ClassProxy


         Dispatcher.singleton.registerTarget(objectId, obj);
      }
      else
      {
         clazz = obj.getClass();
         ClassProxy proxy = ClassProxyFactory.newInstance(obj.getClass());
         advisor = proxy._getInstanceAdvisor();
         advisor.insertInterceptor(new ForwardingInterceptor(obj));
         Dispatcher.singleton.registerTarget(objectId, proxy);
      }
      families = (Map) advisor.getMetaData().getMetaData(CLUSTERED_REMOTING, CLUSTER_FAMILIES);
      if (families != null)
      {
         target = (HATarget) families.get(proxyFamilyName);
         if (target == null)
         {
            target = new HATarget(partition, proxyFamilyName, locator, HATarget.ENABLE_INVOCATIONS);
            ClusteringTargetsRepository.initTarget(proxyFamilyName, target.getReplicantList());
            families.put(proxyFamilyName, target);
         }
      }
      else
      {
         families = new HashMap();
         target = new HATarget(partition, proxyFamilyName, locator, HATarget.ENABLE_INVOCATIONS);
         ClusteringTargetsRepository.initTarget(proxyFamilyName, target.getReplicantList());
         families.put(proxyFamilyName, target);
         advisor.insertInterceptor(0, new ReplicantsManagerInterceptor(families));
      }

      ClassProxy proxy = ClassProxyFactory.newInstance(clazz);
      InstanceAdvisor proxyAdvisor = proxy._getInstanceAdvisor();
      proxyAdvisor.insertInterceptor(IsLocalInterceptor.singleton);
      advisor.insertInterceptor(SecurityClientInterceptor.singleton);
      advisor.insertInterceptor(ClientTxPropagationInterceptor.singleton);
      proxyAdvisor.insertInterceptor(MergeMetaDataInterceptor.singleton);
      proxyAdvisor.insertInterceptor(ClusterChooserInterceptor.singleton);
View Full Code Here


   public static void unregisterClusteredObject(Object object)
   {
      try
      {
         ClassProxy proxy = (ClassProxy) object;
         InstanceAdvisor advisor = proxy._getInstanceAdvisor();

         String oid = (String) advisor.getMetaData().getMetaData(Dispatcher.DISPATCHER, Dispatcher.OID);
         InstanceAdvised registeredObject = (InstanceAdvised) Dispatcher.singleton.getRegistered(oid);
         if (registeredObject == null) throw new NotRegisteredException(oid.toString() + " is not registered");
         Dispatcher.singleton.unregisterTarget(oid);
View Full Code Here

    */
   @Override
   protected void registerWithAopDispatcher()
   {
      String registrationName = this.getObjectName().getCanonicalName();
      ClassProxy classProxy = new InvokableContextClassProxyHack(this);
     
      // So that Remoting layer can reference this container easily.
      Dispatcher.singleton.registerTarget(registrationName, classProxy);
     
      // Log
View Full Code Here

   {
      AsynchMixin mixin = new AsynchMixin();
      AsynchProxyInterceptor interceptor = new AsynchProxyInterceptor(mixin);
      Class[] mixInterfaces = {AsynchProvider.class};
      ProxyMixin[] mixins = {new ProxyMixin(mixin, mixInterfaces)};
      ClassProxy proxy = ClassProxyFactory.newInstance(clazz, mixins);
      proxy._getInstanceAdvisor().insertInterceptor(interceptor);
      Remoting.makeRemotable(proxy, locator, objectId);
      return proxy;
   }
View Full Code Here

    * Registers this Container with Remoting / AOP Dispatcher
    */
   protected void registerWithAopDispatcher()
   {
      String registrationName = this.getObjectName().getCanonicalName();
      ClassProxy classProxy = new InvokableContextClassProxyHack(this);
     
      // So that Remoting layer can reference this container easily.
      Dispatcher.singleton.registerTarget(registrationName, classProxy);
     
      // Log
View Full Code Here

    */
   @Override
   protected void registerWithAopDispatcher()
   {
      String registrationName = this.getObjectName().getCanonicalName();
      ClassProxy classProxy = new InvokableContextClassProxyHack(this);
     
      // So that Remoting layer can reference this container easily.
      Dispatcher.singleton.registerTarget(registrationName, classProxy);
     
      // Log
View Full Code Here

    * Registers this Container with Remoting / AOP Dispatcher
    */
   protected void registerWithAopDispatcher()
   {
      String registrationName = this.getObjectName().getCanonicalName();
      ClassProxy classProxy = new InvokableContextClassProxyHack(this);
     
      // So that Remoting layer can reference this container easily.
      Dispatcher.singleton.registerTarget(registrationName, classProxy);
     
      // Log
View Full Code Here

    * Registers this Container with Remoting / AOP Dispatcher
    */
   protected void registerWithAopDispatcher()
   {
      String registrationName = this.getObjectName().getCanonicalName();
      ClassProxy classProxy = new InvokableContextClassProxyHack(this);
     
      // So that Remoting layer can reference this container easily.
      Dispatcher.singleton.registerTarget(registrationName, classProxy);
     
      // Log
View Full Code Here

    * Registers this Container with Remoting / AOP Dispatcher
    */
   protected void registerWithAopDispatcher()
   {
      String registrationName = this.getObjectName().getCanonicalName();
      ClassProxy classProxy = new InvokableContextClassProxyHack(this);
     
      // So that Remoting layer can reference this container easily.
      Dispatcher.singleton.registerTarget(registrationName, classProxy);
     
      // Log
View Full Code Here

   }

   public static ClassProxy createRemoteProxy(Object objectId, Class clazz, InvokerLocator locator)
      throws Exception
   {
      ClassProxy proxy = ClassProxyFactory.newInstance(clazz);
      makeRemotable(proxy, locator, objectId);

      return proxy;
   }
View Full Code Here

TOP

Related Classes of org.jboss.aop.proxy.ClassProxy

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.