Adds a service proxy to this harness. @param serviceName the name of the
service @param proxy the service proxy @return this harness
773702
public Gild with(final String serviceName, final ServiceProxy proxy) {
		proxies.put(serviceName, proxy);
		return this;
	}
358561
async def connect_service(bus_name, object_path, interface):
    """"""
    proxy = await proxy_new_for_bus(
        Gio.BusType.SYSTEM,
        Gio.DBusProxyFlags.DO_NOT_LOAD_PROPERTIES |
        Gio.DBusProxyFlags.DO_NOT_CONNECT_SIGNALS,
        info=None,
        name=bus_name,
        object_path=object_path,
        interface_name=interface,
    )
    return InterfaceProxy(proxy)
1270716
public Object getServiceFromProxy(TargetMetaDef targetMetaDef) {

    RemoteInvocationHandler handler = null;
    Object dynamicProxy = null;

    try {
      Debug.logVerbose("[JdonFramework] ---> create a new ProxyInstance", module);
      handler = new RemoteInvocationHandler(targetMetaDef);

      ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
      Class serviceClass = classLoader.loadClass(targetMetaDef.getClassName());

      dynamicProxy =
          Proxy.newProxyInstance(
          classLoader,
          new Class[] {serviceClass},
          handler);

    } catch (Exception ex) {
      ex.printStackTrace();
    }
    return dynamicProxy;

  }
614059
String getClassnameFromProxyname(String proxyname) {
		Pattern pattern = Pattern.compile("[@$]");
		Matcher matcher = pattern.matcher(proxyname);
		matcher.find();
		matcher.start();
		return proxyname.substring(0, matcher.start());
	}
73280
public Proxy setSocksUsername(String username) {
    verifyProxyTypeCompatibility(ProxyType.MANUAL);
    this.proxyType = ProxyType.MANUAL;
    this.socksUsername = username;
    return this;
  }
155504
public void getProxyInfos(Collection<ProxyInfo> result) {
        for (Map.Entry<String, DistributedObjectFuture> entry : proxies.entrySet()) {
            DistributedObjectFuture future = entry.getValue();
            if (future.isSetAndInitialized()) {
                String proxyName = entry.getKey();
                result.add(new ProxyInfo(serviceName, proxyName));
            }
        }
    }
840049
public Proxy setHttpProxy(String httpProxy) {
    verifyProxyTypeCompatibility(ProxyType.MANUAL);
    this.proxyType = ProxyType.MANUAL;
    this.httpProxy = httpProxy;
    return this;
  }
620405
private function addService($serviceName)
    {
        $this->addToDebug("Adding service: '$serviceName'");
        //create service
        $serviceTag = $this->addElement('wsdl:service', $this->definitions);
        $serviceTag->setAttribute('name', $serviceName);

            //port tag
            $portTag = $this->addElement('wsdl:port', $serviceTag);
        $portTag->setAttribute('name', $serviceName.'Port');
        $portTag->setAttribute('binding', 'tns:'.$serviceName.'Binding');

                //address tag
                $addressTag = $this->addElement('soap:address', $portTag);
        $addressTag->setAttribute('location', $this->url);

        //keep a reference
        $this->serviceTags[$serviceName] = $serviceTag;
        //and return
        return $serviceTag;
    }
778786
public static sslservice_sslciphersuite_binding[] get(nitro_service service, String servicename) throws Exception{
		sslservice_sslciphersuite_binding obj = new sslservice_sslciphersuite_binding();
		obj.set_servicename(servicename);
		sslservice_sslciphersuite_binding response[] = (sslservice_sslciphersuite_binding[]) obj.get_resources(service);
		return response;
	}
1242724
public static MethodInvokeProxy proxyByName(Object target,String methodName,Object ...args)
	{
		Method m=findMethodByName(target, methodName);
		if(m!=null)
		{
			return new MethodInvokeProxy(target, m, args);
		}
		return null;
	}
864539
protected boolean matchNonProxy( final Proxy proxy, final String hostname )
	{
		String host = hostname;

		if ( null == hostname )
			host = IGitHubConstants.HOST_DEFAULT; // IGitHubConstants.HOST_API;

		// code from org.apache.maven.plugins.site.AbstractDeployMojo#getProxyInfo
		final String nonProxyHosts = proxy.getNonProxyHosts();
		if ( null != nonProxyHosts )
		{
			final String[] nonProxies = nonProxyHosts.split( "(,)|(;)|(\\|)" );
			if ( null != nonProxies )
			{
				for ( final String nonProxyHost : nonProxies )
				{
					//if ( StringUtils.contains( nonProxyHost, "*" ) )
					if ( null != nonProxyHost && nonProxyHost.contains( "*" ) )
					{
						// Handle wildcard at the end, beginning or middle of the nonProxyHost
						final int pos = nonProxyHost.indexOf( '*' );
						String nonProxyHostPrefix = nonProxyHost.substring( 0, pos );
						String nonProxyHostSuffix = nonProxyHost.substring( pos + 1 );
						// prefix*
						if ( !StringUtils.isEmpty( nonProxyHostPrefix ) && host.startsWith( nonProxyHostPrefix )
							&& StringUtils.isEmpty( nonProxyHostSuffix ) )
						{
							return true;
						}
						// *suffix
						if ( StringUtils.isEmpty( nonProxyHostPrefix ) && !StringUtils.isEmpty( nonProxyHostSuffix )
							&& host.endsWith( nonProxyHostSuffix ) )
						{
							return true;
						}
						// prefix*suffix
						if ( !StringUtils.isEmpty( nonProxyHostPrefix ) && host.startsWith( nonProxyHostPrefix )
							&& !StringUtils.isEmpty( nonProxyHostSuffix ) && host.endsWith( nonProxyHostSuffix ) )
						{
							return true;
						}
					}
					else if ( host.equals( nonProxyHost ) )
					{
						return true;
					}
				}
			}
		}

		return false;
	}
155476
public static servicegroup_servicegroupmember_binding[] get(nitro_service service, String servicegroupname) throws Exception{
		servicegroup_servicegroupmember_binding obj = new servicegroup_servicegroupmember_binding();
		obj.set_servicegroupname(servicegroupname);
		servicegroup_servicegroupmember_binding response[] = (servicegroup_servicegroupmember_binding[]) obj.get_resources(service);
		return response;
	}
318453
protected Proxy getProxy(final Settings settings, final String serverId, final String host) {
		if (settings == null)
			return null;
		List<Proxy> proxies = settings.getProxies();
		if (proxies == null || proxies.isEmpty())
			return null;

		// search id match first
		if ( serverId != null && !serverId.isEmpty() ) {
			for (Proxy proxy : proxies) {
				if ( proxy.isActive() ) {
					final String proxyId = proxy.getId();
					if ( proxyId != null && !proxyId.isEmpty() ) {
						if ( proxyId.equalsIgnoreCase(serverId) ) {
							if ( ( "http".equalsIgnoreCase( proxy.getProtocol() ) || "https".equalsIgnoreCase( proxy.getProtocol() ) ) ) {
								if ( matchNonProxy( proxy, host ) )
									return null;
								else
									return proxy;
							}
						}
					}
				}
			}
		}

		// search active proxy
		for (Proxy proxy : proxies)
			if ( proxy.isActive() &&
					( "http".equalsIgnoreCase( proxy.getProtocol() ) || "https".equalsIgnoreCase( proxy.getProtocol() ) )
					)
			{
				if ( matchNonProxy( proxy, host ) )
					return null;
				else
					return proxy;
			}

		return null;
	}
1120291
public static servicegroup_binding get(nitro_service service, String servicegroupname) throws Exception{
		servicegroup_binding obj = new servicegroup_binding();
		obj.set_servicegroupname(servicegroupname);
		servicegroup_binding response = (servicegroup_binding) obj.get_resource(service);
		return response;
	}
748253
public static void applyProxy(Proxy use) {
    System.setProperty("java.net.useSystemProxies", "false");
    System.setProperty("http.proxyHost", use.getIp());
    System.setProperty("http.proxyPort", String.valueOf(use.getPort()));
    System.setProperty("https.proxyHost", use.getIp());
    System.setProperty("https.proxyPort", String.valueOf(use.getPort()));
  }
1102403
public Proxy setSslProxy(String sslProxy) {
    verifyProxyTypeCompatibility(ProxyType.MANUAL);
    this.proxyType = ProxyType.MANUAL;
    this.sslProxy = sslProxy;
    return this;
  }
1074044
protected Class<?>[] getHandlerInterfaces(final String serviceName) {
		if (remoteInterface != null) {
			return new Class<?>[]{remoteInterface};
		} else if (Proxy.isProxyClass(handler.getClass())) {
			return handler.getClass().getInterfaces();
		} else {
			return new Class<?>[]{handler.getClass()};
		}
	}