org.jscep.transport.UrlConnectionTransportFactory Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jscep Show documentation
Show all versions of jscep Show documentation
Java implementation of the Simple Certificate Enrollment Protocol
package org.jscep.transport;
import javax.net.ssl.SSLSocketFactory;
import java.net.URL;
public class UrlConnectionTransportFactory implements TransportFactory {
private SSLSocketFactory sslSocketFactory;
public UrlConnectionTransportFactory(){}
public UrlConnectionTransportFactory(SSLSocketFactory sslSocketFactory){
this.sslSocketFactory = sslSocketFactory;
}
@Override
public Transport forMethod(Method method, URL url) {
if (method == Method.GET) {
return new UrlConnectionGetTransport(url, sslSocketFactory);
} else {
return new UrlConnectionPostTransport(url, sslSocketFactory);
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy