Examples of createProxy()


Examples of com.caucho.remote.client.ProtocolProxyFactory.createProxy()

          = (ProtocolProxyFactory) factoryClass.newInstance();

          proxyFactory.setProxyType(ann);
          proxyFactory.setAnnotated(annotated);

          Object proxy = proxyFactory.createProxy((Class<?>) annotated.getBaseType());

          AnnotatedTypeImpl<?> annotatedType
          = new AnnotatedTypeImpl((AnnotatedType) annotated);

          annotatedType.addAnnotation(EnhancedLiteral.ANNOTATION);
View Full Code Here

Examples of com.rabbitmq.tools.jsonrpc.JsonRpcClient.createProxy()

            cfconn.setUri(uri);
            Connection conn = cfconn.newConnection();
            Channel ch = conn.createChannel();
            JsonRpcClient client = new JsonRpcClient(ch, "", "Hello", RPC_TIMEOUT_ONE_SECOND);
            HelloJsonService service =
                (HelloJsonService) client.createProxy(HelloJsonService.class);

            System.out.println(service.greeting(request));

            java.util.List<Integer> numbers = new java.util.ArrayList<Integer>();
            numbers.add(1);
View Full Code Here

Examples of com.thoughtworks.proxy.ProxyFactory.createProxy()

*/
public class ProxyFactoryExample {

    public static void packageOverviewExample1() {
        ProxyFactory factory = new StandardProxyFactory();
        List proxy = (List)factory.createProxy(new Class[]{List.class}, new SimpleInvoker(new ArrayList()));
        proxy.add("Hello World");
        System.out.println("Size of list: " + proxy.size());
        System.out.println("First element of list: " + proxy.get(0));
    }

View Full Code Here

Examples of com.thoughtworks.proxy.factory.StandardProxyFactory.createProxy()

*/
public class ProxyFactoryExample {

    public static void packageOverviewExample1() {
        ProxyFactory factory = new StandardProxyFactory();
        List proxy = (List)factory.createProxy(new Class[]{List.class}, new SimpleInvoker(new ArrayList()));
        proxy.add("Hello World");
        System.out.println("Size of list: " + proxy.size());
        System.out.println("First element of list: " + proxy.get(0));
    }

View Full Code Here

Examples of eu.mosaic_cloud.tools.callbacks.implementations.basic.BasicCallbackReactor.createProxy()

    final BasicChannel channel = BasicChannel.create (pipe.source (), pipe.sink (), coder, reactor, threading, exceptions);
    final BasicComponent component = BasicComponent.create (reactor, exceptions);
    Assert.assertTrue (channel.initialize (BasicComponentTest.defaultPollTimeout));
    Assert.assertTrue (component.initialize (BasicComponentTest.defaultPollTimeout));
    final ComponentController componentController = component.getController ();
    final ComponentCallbacks componentCallbacksProxy = reactor.createProxy (ComponentCallbacks.class);
    Assert.assertTrue (componentController.bind (componentCallbacksProxy, channel.getController ()).await (BasicComponentTest.defaultPollTimeout));
    final QueueingComponentCallbacks componentCallbacks = QueueingComponentCallbacks.create (componentController, exceptions);
    final CallbackIsolate componentCallbacksIsolate = reactor.createIsolate ();
    Assert.assertTrue (reactor.assignHandler (componentCallbacksProxy, componentCallbacks, componentCallbacksIsolate).await (BasicComponentTest.defaultPollTimeout));
    final ComponentIdentifier peer = ComponentIdentifier.resolve (Strings.repeat ("00", 20));
View Full Code Here

Examples of net.anotheria.moskito.core.dynamic.MoskitoInvokationProxy.createProxy()

        "SimpleService",
        "service",
        "test-sub-system",
        SimpleService.class
        );
    SimpleService monitoredInstance = (SimpleService)proxy.createProxy();

    for (int i=0; i<10; i++){
      monitoredInstance.doSomethingMethod();
    }
View Full Code Here

Examples of org.apache.aries.proxy.ProxyManager.createProxy()

    // classes so it needs to be
    // wrapping the service provider bundle. The class is actually defined
    // on this adapter.

    try {
      return proxyManager.createProxy(serviceProviderBundle, clazz, ih);
    } catch (UnableToProxyException e) {
      throw new IllegalArgumentException(e);
    } catch (RuntimeException e) {
      throw new IllegalArgumentException("Unable to create proxy for " + pair.ref, e);
    }
View Full Code Here

Examples of org.apache.axiom.testutils.InvocationCounter.createProxy()

        }
        InputStream in = new ExceptionInputStream(new ByteArrayInputStream(xml.toString().getBytes("ASCII")));
       
        XMLStreamReader originalReader = StAXUtils.createXMLStreamReader(in);
        InvocationCounter invocationCounter = new InvocationCounter();
        XMLStreamReader reader = (XMLStreamReader)invocationCounter.createProxy(originalReader);
       
        OMXMLParserWrapper builder = OMXMLBuilderFactory.createStAXOMBuilder(metaFactory.getOMFactory(), reader);
       
        try {
            while (true) {
View Full Code Here

Examples of org.apache.geronimo.kernel.proxy.ProxyFactory.createProxy()

        assertTrue(test instanceof MockChildInterface2);
        assertFalse(test instanceof Comparable);

        ProxyFactory proxyFactory;
        proxyFactory = mgr.createProxyFactory(new Class[]{MockEndpoint.class, MockParentInterface2.class, MockChildInterface2.class}, myCl);
        test = proxyFactory.createProxy(gbean.getAbstractName());
        assertTrue(test instanceof MockEndpoint);
        assertTrue(test instanceof MockParentInterface1);
        assertTrue(test instanceof MockParentInterface2);
        assertTrue(test instanceof MockChildInterface1);
        assertTrue(test instanceof MockChildInterface2);
View Full Code Here

Examples of org.apache.geronimo.kernel.proxy.ProxyFactory.createProxy()

        assertTrue(test instanceof MockChildInterface1);
        assertTrue(test instanceof MockChildInterface2);
        assertFalse(test instanceof Comparable);

        proxyFactory = mgr.createProxyFactory(new Class[]{MockEndpoint.class, MockParentInterface1.class, MockChildInterface1.class}, myCl);
        test = proxyFactory.createProxy(gbean.getAbstractName());
        assertTrue(test instanceof MockEndpoint);
        assertTrue(test instanceof MockParentInterface1);
        assertFalse(test instanceof MockParentInterface2);
        assertTrue(test instanceof MockChildInterface1);
        assertFalse(test instanceof MockChildInterface2);
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.