Examples of PojiProxy


Examples of org.jboss.aspects.remoting.PojiProxy

      {
         InvokerLocator locator = new InvokerLocator(remotingUrl);
         // Create a POJI Proxy to the Registrar
         Interceptor[] interceptors =
         {IsLocalProxyFactoryInterceptor.singleton, InvokeRemoteInterceptor.singleton};
         PojiProxy handler = new PojiProxy(proxyFactoryKey, locator, interceptors);
         // The proxy should me marked as implementing interface(s) of type ProxyFactory
         // and the other sub-interfaces of ProxyFactory (whichever applicable for this specific
         // proxyfactory). We need the specific sub-interfaces to ensure that the ObjectFactories
         // can invoke the APIs on the sub-interfaces
         Class<ProxyFactory>[] proxyFactoryInterfaces = this
View Full Code Here

Examples of org.jboss.aspects.remoting.PojiProxy

      else
      {
         final InvokerLocator locator = (InvokerLocator) invocation.getMetaData(InvokeRemoteInterceptor.REMOTING,
               InvokeRemoteInterceptor.INVOKER_LOCATOR);
         final Object oid = invocation.getMetaData().getMetaData(Dispatcher.DISPATCHER, Dispatcher.OID);
         final PojiProxy proxy = new PojiProxyHack(oid, locator, new Interceptor[]
         {});
         final AsyncEndpoint container = (AsyncEndpoint) Proxy.newProxyInstance(Thread.currentThread()
               .getContextClassLoader(), new Class<?>[]
         {AsyncEndpoint.class}, proxy);
         return new ResultUnwrappingExecutorService(ClientExecutorService.INSTANCE, container);
View Full Code Here

Examples of org.jboss.aspects.remoting.PojiProxy

  
   protected Object createPojiProxy(Object oid, Class<?>[] interfaces, String uri) throws Exception
   {
      InvokerLocator locator = new InvokerLocator(uri);
      Interceptor[] interceptors = {IsLocalProxyFactoryInterceptor.singleton, InvokeRemoteInterceptor.singleton};
      PojiProxy proxy = new PojiProxy(oid, locator, interceptors);
      return Proxy.newProxyInstance(interfaces[0].getClassLoader(), interfaces, proxy);

   }
View Full Code Here

Examples of org.jboss.aspects.remoting.PojiProxy

      else
      {
         final InvokerLocator locator = (InvokerLocator) invocation.getMetaData(InvokeRemoteInterceptor.REMOTING,
               InvokeRemoteInterceptor.INVOKER_LOCATOR);
         Object oid = invocation.getMetaData().getMetaData(Dispatcher.DISPATCHER, Dispatcher.OID);
         final PojiProxy proxy = new PojiProxy(oid, locator, new Interceptor[]{});
         final AsyncCancellableContext container = (AsyncCancellableContext) Proxy.newProxyInstance(Thread
               .currentThread().getContextClassLoader(), new Class<?>[]
         {AsyncCancellableContext.class}, proxy);
         return new ResultUnwrappingExecutorService(ClientExecutorService.INSTANCE, container);
      }
View Full Code Here

Examples of org.jboss.aspects.remoting.PojiProxy

      InvokerLocator locator = new InvokerLocator(url);

      // Create a POJI Proxy to the Registrar
      Interceptor[] interceptors =
      {IsLocalProxyFactoryInterceptor.singleton, InvokeRemoteInterceptor.singleton};
      PojiProxy handler = new PojiProxy(proxyFactoryRegistryKey, locator, interceptors);
      Class<?>[] interfaces = new Class<?>[]
      {this.getProxyFactoryClass()};

      return (ProxyFactory) Proxy.newProxyInstance(interfaces[0].getClassLoader(), interfaces, handler);
   }
View Full Code Here

Examples of org.jboss.aspects.remoting.PojiProxy

      /*
       * Create a Proxy
       */

      // Create a POJI Proxy to the Container
      PojiProxy handler = new InvokableContextStatefulRemoteProxyInvocationHack(containerName, containerGuid, locator,
            interceptors, sessionId);
      Class<?>[] interfaces = new Class<?>[]
      {InvokableContext.class};
      InvokableContext container = (InvokableContext) Proxy.newProxyInstance(InvokableContext.class.getClassLoader(),
            interfaces, handler);
View Full Code Here

Examples of org.jboss.aspects.remoting.PojiProxy

      {
         final InvokerLocator locator = (InvokerLocator) invocation.getMetaData(InvokeRemoteInterceptor.REMOTING,
               InvokeRemoteInterceptor.INVOKER_LOCATOR);
         Object oid = invocation.getMetaData().getMetaData(Dispatcher.DISPATCHER, Dispatcher.OID);
         log.info("OID: " + oid);
         final PojiProxy proxy = new PojiProxyHack(oid, locator, new Interceptor[]
         {});
         final AsyncEndpoint container = (AsyncEndpoint) Proxy.newProxyInstance(Thread.currentThread()
               .getContextClassLoader(), new Class<?>[]
         {AsyncEndpoint.class}, proxy);
         return new ResultUnwrappingExecutorService(ClientExecutorService.INSTANCE, container);
View Full Code Here

Examples of org.jboss.aspects.remoting.PojiProxy

      // Intentionally add a dummy NotToBeInvokedInterceptor to check whether the IsLocalProxyFactoryInterceptor
      // passes the call to the next interceptor. If it's passed then it indicates that the call was (incorrectly) considered
      // remote
      Interceptor[] interceptors =
      {IsLocalProxyFactoryInterceptor.singleton, new NotToBeInvokedInterceptor()};
      PojiProxy handler = new PojiProxy(KEY, null, interceptors);
      Class<?>[] interfaces = new Class<?>[]
      {Calculator.class};
      // create the proxy
      Calculator calculator = (Calculator) Proxy.newProxyInstance(interfaces[0].getClassLoader(), interfaces, handler);
      // register with dispatcher too, since the IsLocalProxyFactoryInterceptor
View Full Code Here

Examples of org.jboss.aspects.remoting.PojiProxy

       */

      // Create a POJI Proxy to the Container
      String containerName = this.getContainerName();
      assert containerName != null && containerName.trim().length() > 0 : "Container Name must be set";
      PojiProxy handler = new InvokableContextClusteredProxyInvocationHandler(this.getContainerName(), this
            .getContainerGuid(), locator, interceptors, (Serializable) this.getTarget(), this.getFamilyWrapper(), this
            .getLoadBalancePolicy(), this.getPartitionName(), true);
      Class<?>[] interfaces = new Class<?>[]
      {InvokableContext.class};
      InvokableContext container = (InvokableContext) Proxy.newProxyInstance(InvokableContext.class.getClassLoader(),
View Full Code Here

Examples of org.jboss.aspects.remoting.PojiProxy

       */

      // Create a POJI Proxy to the Container
      String containerName = this.getContainerName();
      assert containerName != null && containerName.trim().length() > 0 : "Container Name must be set";
      PojiProxy handler = new InvokableContextClusteredProxyInvocationHandler(this.getContainerName(),
            this.getContainerGuid(), locator, interceptors, null, this.getFamilyWrapper(),
            this.getLoadBalancePolicy(), this.getPartitionName(), false);
      Class<?>[] interfaces = new Class<?>[]
      {InvokableContext.class};
      InvokableContext container = (InvokableContext) Proxy.newProxyInstance(InvokableContext.class.getClassLoader(),
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.