Package org.apache.geronimo.proxy

Examples of org.apache.geronimo.proxy.ProxyContainer


        ClassLoader cl = JaasLoginServiceMBean.class.getClassLoader();

        // Setup the client side container..
        RequestChannelInterceptor remoteInterceptor = new RequestChannelInterceptor(target, cl);
        ProxyContainer clientContainer = new ProxyContainer(remoteInterceptor);
        return (JaasLoginServiceMBean) clientContainer.createProxy(cl , new Class[]{JaasLoginServiceMBean.class});

    }
View Full Code Here


       
        ClassLoader cl = JaasLoginServiceMBean.class.getClassLoader();
       
        // Setup the client side container..
        RequestChannelInterceptor remoteInterceptor = new RequestChannelInterceptor(target, cl);
        ProxyContainer clientContainer = new ProxyContainer(remoteInterceptor);
        return (JaasLoginServiceMBean) clientContainer.createProxy(cl , new Class[]{JaasLoginServiceMBean.class});
       
    }
View Full Code Here

        ClassLoader cl = JaasLoginServiceMBean.class.getClassLoader();

        // Setup the client side container..
        RequestChannelInterceptor remoteInterceptor = new RequestChannelInterceptor(target, cl);
        ProxyContainer clientContainer = new ProxyContainer(remoteInterceptor);
        return (JaasLoginServiceMBean) clientContainer.createProxy(cl , new Class[]{JaasLoginServiceMBean.class});

    }
View Full Code Here

    private Object createProxy(Object target, boolean mockFromRemoteMV ) throws Exception {

        // Setup the server side contianer..
        ReflexiveInterceptor ri = new ReflexiveInterceptor(target);
        DeMarshalingInterceptor demarshaller = new DeMarshalingInterceptor(ri, target.getClass().getClassLoader());
        ProxyContainer serverContainer = new ProxyContainer(demarshaller);
        Long dmiid = InterceptorRegistry.instance.register(demarshaller);

        // Setup the client side container..
        RemoteTransportInterceptor transport = new RemoteTransportInterceptor(URISupport.setFragment(connectURI, ""+dmiid));
        IntraVMRoutingInterceptor localRouter = new IntraVMRoutingInterceptor(ri, dmiid, false);
        InterVMRoutingInterceptor remoteRouter = new InterVMRoutingInterceptor(transport, localRouter);
        if(mockFromRemoteMV) {
            remoteRouter.setTargetVMID("THIS CRAP WILL NOT MATCH THE LOCAL VM ID");
        }
        ProxyContainer clientContainer = new ProxyContainer(remoteRouter);

        return clientContainer.createProxy(target.getClass().getClassLoader(), target.getClass().getInterfaces());
    }
View Full Code Here

    private Object createProxy(Object target) throws Exception {
       
        // Setup the server side contianer..
        ReflexiveInterceptor ri = new ReflexiveInterceptor(target);
        DeMarshalingInterceptor demarshaller = new DeMarshalingInterceptor(ri, target.getClass().getClassLoader());
        ProxyContainer serverContainer = new ProxyContainer(demarshaller);

        // Configure the server side interceptors.
        Long dmiid = InterceptorRegistry.instance.register(demarshaller);
       
        // Setup the client side container..       
        IntraVMRoutingInterceptor localRouter = new IntraVMRoutingInterceptor(ri, dmiid, false);
        ProxyContainer clientContainer = new ProxyContainer(localRouter);
        return clientContainer.createProxy(target.getClass().getClassLoader(), target.getClass().getInterfaces());
    }
View Full Code Here

        LoginServiceMBean loginService = (LoginServiceMBean) MBeanProxyFactory.getProxy(LoginServiceMBean.class,
                kernel.getMBeanServer(),
                JMXUtil.getObjectName("geronimo.security:type=LoginService"));
        Interceptor firstInterceptor = new ReflexiveInterceptor(loginService);
        demarshaller = new DeMarshalingInterceptor(firstInterceptor, getClass().getClassLoader());
        serverContainer = new ProxyContainer(firstInterceptor);

        log.info("Started login service stub");
    }
View Full Code Here

        remoteInterceptor.setRemoteURI(target);

        Interceptor firstInterceptor = new MarshalingInterceptor(remoteInterceptor);
        firstInterceptor = new NotificationRemoterInterceptor(firstInterceptor);

        ProxyContainer clientContainer = new ProxyContainer(firstInterceptor);
        return (LoginServiceMBean) clientContainer.createProxy(LoginServiceMBean.class.getClassLoader(), new Class[]{LoginServiceMBean.class});
    }
View Full Code Here

            // Setup the server side contianer..
            eo = new ExportedObject();
            Interceptor ri = new ReflexiveInterceptor(object);
            DeMarshalingInterceptor demarshaller = new DeMarshalingInterceptor(ri, object.getClass().getClassLoader());
            Long dmiid = InterceptorRegistry.instance.register(demarshaller);
            eo.serverContainer = new ProxyContainer(demarshaller);

            // Build the RemoteRef for the object.
            eo.remoteRef = new RemoteRef();
            try {
View Full Code Here

            RemoteTransportInterceptor transport = new RemoteTransportInterceptor(ref.remoteURI);
            MarshalingInterceptor mashaller = new MarshalingInterceptor(transport);
            IdentityInterceptor identity = new IdentityInterceptor(mashaller, ref);

            ProxyContainer clientContainer = new ProxyContainer(identity);

            object = clientContainer.createProxy(Thread.currentThread().getContextClassLoader(), ref.interfaces);
            log.trace("Imported object: "+ref.remoteURI);
            importedObjects.put(ref, object);
        }
        return object;
    }
View Full Code Here

        // Setup the client side container..
        Interceptor firstInterceptor = new RemoteTransportInterceptor(target);
        firstInterceptor = new MarshalingInterceptor(firstInterceptor);
        firstInterceptor = new NotificationRemoterInterceptor(firstInterceptor);

        ProxyContainer clientContainer = new ProxyContainer(firstInterceptor);
        return (MBeanServer) clientContainer.createProxy(
            MBeanServer.class.getClassLoader(),
            new Class[] { MBeanServer.class });
    }
View Full Code Here

TOP

Related Classes of org.apache.geronimo.proxy.ProxyContainer

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.