22 lines
776 B
Java
22 lines
776 B
Java
package org.openautonomousconnection.infonamelib.web;
|
|
|
|
import org.openautonomousconnection.infonamelib.OacSessionJar;
|
|
import org.openautonomousconnection.infonamelib.OacWebHttpURLConnection;
|
|
import org.openautonomousconnection.infonamelib.OacWebRequestBroker;
|
|
|
|
import java.io.IOException;
|
|
import java.net.URL;
|
|
import java.net.URLConnection;
|
|
import java.net.URLStreamHandler;
|
|
|
|
/**
|
|
* URLStreamHandler for the "web" protocol (loaded via java.protocol.handler.pkgs).
|
|
*/
|
|
public final class Handler extends URLStreamHandler {
|
|
private static final OacSessionJar SESSION_JAR = new OacSessionJar();
|
|
|
|
@Override
|
|
protected URLConnection openConnection(URL u) throws IOException {
|
|
return new OacWebHttpURLConnection(u, OacWebRequestBroker.get(), SESSION_JAR);
|
|
}
|
|
} |