Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 /*     */ package org.jboss.aspects.remoting;
 /*     */ 
 /*     */ import java.util.ArrayList;
 /*     */ import java.util.List;
 /*     */ import org.jboss.aop.InstanceAdvised;
 /*     */ import org.jboss.aop.InstanceAdvisor;
 /*     */ import org.jboss.aop.advice.Interceptor;
 /*     */ import org.jboss.aop.metadata.SimpleMetaData;
 /*     */ import org.jboss.aop.proxy.ClassProxy;
/*     */ import org.jboss.aop.proxy.ProxyFactory;
/*     */ import org.jboss.aop.util.PayloadKey;
/*     */ import org.jboss.remoting.InvokerLocator;
/*     */ import org.jboss.util.id.GUID;
/*     */ 
/*     */ public class Remoting
/*     */ {
/*     */   public static ClassProxy createRemoteProxy(Object objectIdClass clazzString uri)
/*     */     throws Exception
/*     */   {
/*  53 */     return createRemoteProxy(objectIdclazznew InvokerLocator(uri));
/*     */   }
/*     */ 
/*     */   public static ClassProxy createRemoteProxy(Object objectIdClass clazzInvokerLocator locator)
/*     */     throws Exception
/*     */   {
/*  59 */     ClassProxy proxy = ClassProxyFactory.newInstance(clazz);
/*  60 */     makeRemotable(proxylocatorobjectId);
/*     */ 
/*  62 */     return proxy;
/*     */   }
/*     */ 
/*     */   public static org.jboss.aop.proxy.Proxy createRemoteProxy(Object objectIdClassLoader loaderClass[] ifacesInvokerLocator locator)
/*     */     throws Exception
/*     */   {
/*  78 */     GUID guid = new GUID();
/*  79 */     org.jboss.aop.proxy.Proxy proxy = ProxyFactory.createInterfaceProxy(guidloaderifaces);
/*  80 */     makeRemotable(proxylocatorobjectId);
/*  81 */     return proxy;
/*     */   }
/*     */ 
/*     */   public static org.jboss.aop.proxy.Proxy createRemoteProxy(Object objectIdClassLoader loaderClass[] ifacesInvokerLocator locatorList<InterceptorinterceptorsString subsystem)
/*     */     throws Exception
/*     */   {
/* 101 */     GUID guid = new GUID();
/* 102 */     org.jboss.aop.proxy.Proxy proxy = ProxyFactory.createInterfaceProxy(guidloaderifaces);
/* 103 */     makeRemotable(proxylocatorobjectIdinterceptorssubsystem);
/* 104 */     return proxy;
/*     */   }
/*     */ 
/*     */   public static Object createPojiProxy(Object oidClass[] interfacesString uri)
/*     */     throws Exception
/*     */   {
/* 117 */     InvokerLocator locator = new InvokerLocator(uri);
/* 118 */     Interceptor[] interceptors = { .. };
/* 119 */     PojiProxy proxy = new PojiProxy(oidlocatorinterceptors);
/* 120 */     return java.lang.reflect.Proxy.newProxyInstance(interfaces[0].getClassLoader(), interfacesproxy);
/*     */   }
/*     */ 
/*     */   public static Object createPojiProxy(Object oidClass[] interfacesString uriInterceptor[] interceptors)
/*     */     throws Exception
/*     */   {
/* 134 */     InvokerLocator locator = new InvokerLocator(uri);
/* 135 */     PojiProxy proxy = new PojiProxy(oidlocatorinterceptors);
/* 136 */     return java.lang.reflect.Proxy.newProxyInstance(interfaces[0].getClassLoader(), interfacesproxy);
/*     */   }
/*     */ 
/*     */   public static void makeRemotable(InstanceAdvised proxyInvokerLocator locatorObject objectId)
/*     */   {
/* 152 */     ArrayList interceptors = new ArrayList();
/* 153 */     interceptors.add(.);
/* 154 */     interceptors.add(.);
/* 155 */     interceptors.add(.);
/* 156 */     interceptors.add(.);
/* 157 */     interceptors.add(.);
/* 158 */     makeRemotable(proxylocatorobjectIdinterceptors"AOP");
/*     */   }
/*     */ 
/*     */   public static void makeRemotable(InstanceAdvised proxyInvokerLocator locatorObject objectIdList<InterceptorinterceptorsString subsystem)
/*     */   {
/* 173 */     InstanceAdvisor advisor = proxy._getInstanceAdvisor();
/* 174 */     for (Interceptor i : interceptors)
/* 175 */       advisor.insertInterceptor(i);
/* 176 */     advisor.getMetaData().addMetaData("REMOTING""INVOKER_LOCATOR"locator.);
/*     */ 
/* 180 */     advisor.getMetaData().addMetaData("REMOTING""SUBSYSTEM"subsystem.);
/*     */ 
/* 184 */     advisor.getMetaData().addMetaData("DISPATCHER""OID"objectId.);
/*     */   }
/*     */ }
/* Location:           /home/mnovotny/projects/EMBEDDED_JBOSS_BETA3_COMMUNITY/embedded/output/lib/embedded-jboss/lib/jboss-embedded-all.jar
 * Qualified Name:     org.jboss.aspects.remoting.Remoting
 * JD-Core Version:    0.6.0
 */
New to GrepCode? Check out our FAQ X