Examples of RemoteProxy


Examples of org.codehaus.aspectwerkz.connectivity.RemoteProxy

        return "test 1";
    }

    public RemoteProxy getTest1() {
        Test2 test2 = (Test2) new Target();
        RemoteProxy proxy = RemoteProxy.createServerProxy(test2, "localhost", 7777);
        return proxy;
    }
View Full Code Here

Examples of org.codehaus.aspectwerkz.connectivity.RemoteProxy

     */
    private static void run() {
        // 1)
        // creates a new remote proxy for the TestImpl1 class which maps to an instance of this
        // class on the server
        RemoteProxy proxy1 = RemoteProxy.createClientProxy(
                new String[]{"examples.connectivity.Test1"},
                "examples.connectivity.Test1Impl",
                "localhost",
                6663
        );
        // retrieves the proxy the the TestImpl1 instance
        Test1 mixin1 = (Test1)proxy1.getInstance();

        // 2)
        // retrieve the proxy to a specific instance created on the server
        RemoteProxy proxy2 = mixin1.getTest1();
        // retrieves the proxy the the TestImpl2 instance
        Test2 mixin2 = (Test2)proxy2.getInstance();

        // 3)
        // invoke methods on the proxies (executed on the server)
        System.out.println("Mixin1 says: " + mixin1.test1());
        System.out.println("Mixin2 says: " + mixin2.test2());

        // 4)
        // close the proxies (close() must always be called)
        proxy1.close();
        proxy2.close();
    }
View Full Code Here

Examples of org.codehaus.aspectwerkz.connectivity.RemoteProxy

        return "test 1";
    }

    public RemoteProxy getTest1() {
        Test2 test2 = (Test2)new Target();
        RemoteProxy proxy = RemoteProxy.createServerProxy(test2, "localhost", 7777);
        return proxy;
    }
View Full Code Here

Examples of org.directwebremoting.annotations.RemoteProxy

    protected void registerBeanDefinition(BeanDefinitionHolder definitionHolder, BeanDefinitionRegistry registry)
    {
        try
        {
            Class<?> beanDefinitionClass = ClassUtils.forName(definitionHolder.getBeanDefinition().getBeanClassName(), getClass().getClassLoader());
            RemoteProxy proxy = beanDefinitionClass.getAnnotation(RemoteProxy.class);
            DataTransferObject converter = beanDefinitionClass.getAnnotation(DataTransferObject.class);
            GlobalFilter globalFilter = beanDefinitionClass.getAnnotation(GlobalFilter.class);
            if (proxy != null)
            {
                super.registerBeanDefinition(definitionHolder, registry);
                String javascript = proxy.name();
                if (!StringUtils.hasText(javascript))
                {
                    javascript = beanDefinitionClass.getSimpleName();
                }
                if (log.isInfoEnabled())
View Full Code Here

Examples of org.directwebremoting.annotations.RemoteProxy

            BeanDefinition springConfigurator = ConfigurationParser.registerConfigurationIfNecessary(beanDefinitionRegistry);
            BeanDefinitionHolder beanDefinitionHolder = new BeanDefinitionHolder(beanDefinitionRegistry.getBeanDefinition(beanName), beanName);
            Class<?> beanDefinitionClass = getBeanDefinitionClass(beanDefinitionHolder, beanDefinitionRegistry);
            if (beanDefinitionClass != null)
            {
                RemoteProxy remoteProxy = beanDefinitionClass.getAnnotation(RemoteProxy.class);
                if (remoteProxy != null)
                {
                    String javascript = remoteProxy.name();
                    if (!StringUtils.hasText(javascript))
                    {
                        javascript = beanDefinitionClass.getSimpleName();
                    }
                    if (log.isInfoEnabled())
View Full Code Here

Examples of org.openqa.grid.internal.RemoteProxy

                    public Void call() throws Exception {
                        Registry registry = HubHolder.hub.getRegistry();
                        if (registry != null) {
                            Iterator<RemoteProxy> it = registry.getAllProxies().iterator();
                            while (it.hasNext()) {
                                RemoteProxy proxy = it.next();
                                if (remoteUrl.equals(proxy.getRemoteHost().toString())) {
                                    registry.removeIfPresent(proxy);
                                }
                            }
                        }
                        return null;
View Full Code Here

Examples of org.openqa.grid.internal.RemoteProxy

    private final boolean isReserved;
    private final URL host;
    private final Map<String, String> capabilities;

    public SeleniumTestSlot(TestSlot testSlot) {
        RemoteProxy proxy = testSlot.getProxy();
        host = proxy.getRemoteHost();
        capabilities = toCapabilities(testSlot);
        isReserved = testSlot.getSession() != null;
    }
View Full Code Here

Examples of org.openqa.grid.internal.RemoteProxy

      res.put("msg", state + ILLEGAL_STATE);
      return res;
    }

    // set the new state.
    RemoteProxy proxy = getRegistry().getProxyById(id);

    if (proxy instanceof IOSMutableRemoteProxy) {
      ((IOSMutableRemoteProxy) proxy).setState(newState);
      res.put("success", true);
    } else {
      res.put("msg", INSTANCE_OF_MUTABLE_PROXY + proxy.getClass());
      return res;
    }

    return res;
  }
View Full Code Here

Examples of org.sonatype.nexus.client.core.subsystem.config.RemoteProxy

  private GlobalConfigurationResource configuration = new GlobalConfigurationResource();

  @Test
  public void noSettings() {
    final RemoteProxy underTest = createJerseyHttpProxy();
    final RemoteProxySettingsDTO settings = underTest.settings();

    assertThat(settings, is(notNullValue()));

    settings.setHttpProxySettings(new RemoteHttpProxySettingsDTO());
    settings.getHttpProxySettings().setProxyHostname("bar");

    settings.setHttpsProxySettings(new RemoteHttpProxySettingsDTO());
    settings.getHttpsProxySettings().setProxyHostname("car");

    settings.addNonProxyHost("foo");

    underTest.save();

    assertThat(configuration.getRemoteProxySettings(), is(notNullValue()));

    assertThat(configuration.getRemoteProxySettings().getHttpProxySettings(), is(notNullValue()));
    assertThat(configuration.getRemoteProxySettings().getHttpProxySettings().getProxyHostname(), is("bar"));
View Full Code Here

Examples of org.sonatype.nexus.client.core.subsystem.config.RemoteProxy

    configSettings.setHttpsProxySettings(new RemoteHttpProxySettingsDTO());
    configSettings.getHttpsProxySettings().setProxyHostname("bar");
    configSettings.addNonProxyHost("car1");
    configuration.setRemoteProxySettings(configSettings);

    final RemoteProxy underTest = createJerseyHttpProxy();
    final RemoteProxySettingsDTO settings = underTest.settings();

    assertThat(settings, is(notNullValue()));
    assertThat(settings.getHttpProxySettings(), is(notNullValue()));
    assertThat(settings.getHttpProxySettings().getProxyHostname(), is("foo"));
    assertThat(settings.getHttpsProxySettings(), is(notNullValue()));
    assertThat(settings.getHttpsProxySettings().getProxyHostname(), is("bar"));
    assertThat(settings.getNonProxyHosts(), hasItem("car1"));

    configSettings.getHttpProxySettings().setProxyHostname("foo1");
    configSettings.getHttpsProxySettings().setProxyHostname("bar1");
    configSettings.addNonProxyHost("car2");
    underTest.save();

    assertThat(configuration.getRemoteProxySettings(), is(notNullValue()));

    assertThat(configuration.getRemoteProxySettings().getHttpProxySettings(), is(notNullValue()));
    assertThat(configuration.getRemoteProxySettings().getHttpProxySettings().getProxyHostname(), is("foo1"));
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.