1 /*******************************************************************************
2 * Copyright (c) 2012 Association for Decentralized Information Management
4 * All rights reserved. This program and the accompanying materials
5 * are made available under the terms of the Eclipse Public License v1.0
6 * which accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
10 * VTT Technical Research Centre of Finland - initial API and implementation
11 *******************************************************************************/
12 package org.simantics.maps.pojo;
14 import java.net.Proxy;
15 import java.net.ProxySelector;
17 import java.net.URISyntaxException;
18 import java.util.List;
20 import org.simantics.maps.IProxyUtil;
23 * @author Tuukka Lehtonen
25 public class AppletProxyUtil implements IProxyUtil {
28 * @return IProxyService of the platform or <code>null</code> if the
29 * service is not available.
31 public Proxy getProxyService(final String url) {
34 l = ProxySelector.getDefault().select(new URI(url));
35 } catch (URISyntaxException e) {
40 for(Proxy proxy : l) {
41 if(proxy.type() == Proxy.Type.HTTP && proxy.address() != null) {