~ubuntu-branches/ubuntu/lucid/openjdk-6/lucid-updates

« back to all changes in this revision

Viewing changes to plugin/icedteanp/java/sun/applet/PluginProxyInfoRequest.java

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2010-03-10 11:19:19 UTC
  • mfrom: (3.1.6 squeeze)
  • Revision ID: james.westby@ubuntu.com-20100310111919-o4i1uzfhj04xs0e7
Tags: 6b18~pre2-1
* Update IcedTea build infrastructure (20100310).
* Disable building the plugin the plugin on alpha (borked xulrunner
  packaging using binary indep packages).
* Use a two stage build on alpha.
* Add note about the reparenting WM workaround. Closes: #573026.
* Prefer Sazanami instead of Kochi for Japanese fonts (Hideki Yamane).
  Closes: #572511.
* openjdk-6-doc: Don't compress package-list files. Closes: #567899.

Show diffs side-by-side

added added

removed removed

Lines of Context:
48
48
    
49
49
    URI internal = null;
50
50
 
51
 
    public PluginProxyInfoRequest(String message, String returnString) {
52
 
        super(message, returnString);
 
51
    public PluginProxyInfoRequest(String message, Long reference) {
 
52
        super(message, reference);
53
53
    }
54
54
    
55
55
    public void parseReturn(String proxyInfo) {
61
61
        String[] messageComponents = proxyInfo.split(" ");
62
62
 
63
63
        try {
64
 
            internal = new URI(messageComponents[2], null, messageComponents[3], Integer.parseInt(messageComponents[4]), null, null, null);
 
64
            String protocol = messageComponents[4].equals("PROXY") ? "http" : "socks";
 
65
            String host = messageComponents[5].split(":")[0];
 
66
            int port = Integer.parseInt(messageComponents[5].split(":")[1]);
 
67
 
 
68
            internal = new URI(protocol, null, host, port, null, null, null);
65
69
        } catch (Exception e) {
66
 
            // do nothing
 
70
            e.printStackTrace();
67
71
        }
68
72
 
69
73
        setDone(true);
70
74
    }
71
75
 
72
 
    /**
73
 
     * Returns whether the given message is serviceable by this object
74
 
     * 
75
 
     * @param message The message to service
76
 
     * @return boolean indicating if message is serviceable
77
 
     */
78
 
    public boolean serviceable(String message) {
79
 
        return message.startsWith("plugin PluginProxyInfo");
80
 
    }
81
 
 
82
76
    public URI getObject() {
83
77
        return this.internal;
84
78
    }