All Downloads are FREE. Search and download functionalities are using the official Maven repository.

system.net.http.HttpClientHandler Maven / Gradle / Ivy

/*
 *  MIT License
 *
 *  Copyright (c) 2024 MASES s.r.l.
 *
 *  Permission is hereby granted, free of charge, to any person obtaining a copy
 *  of this software and associated documentation files (the "Software"), to deal
 *  in the Software without restriction, including without limitation the rights
 *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 *  copies of the Software, and to permit persons to whom the Software is
 *  furnished to do so, subject to the following conditions:
 *
 *  The above copyright notice and this permission notice shall be included in all
 *  copies or substantial portions of the Software.
 *
 *  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 *  SOFTWARE.
 */

/**************************************************************************************
 * 
 *      This code was generated from a template using JCOReflector v. 1.14.0.0
 * 
 *      Manual changes to this file may cause unexpected behavior in your application.
 *      Manual changes to this file will be overwritten if the code is regenerated.
 * 
 *************************************************************************************/

package system.net.http;

import org.mases.jcobridge.*;
import org.mases.jcobridge.netreflection.*;
import java.util.ArrayList;

// Import section
import system.net.http.HttpMessageHandler;
import system.net.CookieContainer;
import system.net.DecompressionMethods;
import system.net.http.ClientCertificateOption;
import system.net.ICredentials;
import system.net.ICredentialsImplementation;
import system.net.IWebProxy;
import system.net.IWebProxyImplementation;
import system.security.authentication.SslProtocols;
import system.security.cryptography.x509certificates.X509CertificateCollection;


/**
 * The base .NET class managing System.Net.Http.HttpClientHandler, System.Net.Http, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a.
 * 

* * .NET documentation at https://docs.microsoft.com/en-us/dotnet/api/System.Net.Http.HttpClientHandler *

* * Powered by JCOBridge: more info at https://www.jcobridge.com * * @author MASES s.r.l https://masesgroup.com * @version 1.14.0.0 */ public class HttpClientHandler extends HttpMessageHandler { /** * Fully assembly qualified name: System.Net.Http, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a */ public static final String assemblyFullName = "System.Net.Http, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"; /** * Assembly name: System.Net.Http */ public static final String assemblyShortName = "System.Net.Http"; /** * Qualified class name: System.Net.Http.HttpClientHandler */ public static final String className = "System.Net.Http.HttpClientHandler"; static JCOBridge bridge = JCOBridgeInstance.getInstance(assemblyFullName); /** * The type managed from JCOBridge. See {@link JCType} */ public static JCType classType = createType(); static JCEnum enumInstance = null; JCObject classInstance = null; static JCType createType() { try { String classToCreate = className + ", " + (JCOReflector.getUseFullAssemblyName() ? assemblyFullName : assemblyShortName); if (JCOReflector.getDebug()) JCOReflector.writeLog("Creating %s", classToCreate); JCType typeCreated = bridge.GetType(classToCreate); if (JCOReflector.getDebug()) JCOReflector.writeLog("Created: %s", (typeCreated != null) ? typeCreated.toString() : "Returned null value"); return typeCreated; } catch (JCException e) { JCOReflector.writeLog(e); return null; } } void addReference(String ref) throws Throwable { try { bridge.AddReference(ref); } catch (JCNativeException jcne) { throw translateException(jcne); } } /** * Internal constructor. Use with caution */ public HttpClientHandler(java.lang.Object instance) throws Throwable { super(instance); if (instance instanceof JCObject) { classInstance = (JCObject) instance; } else throw new Exception("Cannot manage object, it is not a JCObject"); } public String getJCOAssemblyName() { return assemblyFullName; } public String getJCOClassName() { return className; } public String getJCOObjectName() { return className + ", " + (JCOReflector.getUseFullAssemblyName() ? assemblyFullName : assemblyShortName); } public java.lang.Object getJCOInstance() { return classInstance; } public void setJCOInstance(JCObject instance) { classInstance = instance; super.setJCOInstance(classInstance); } public JCType getJCOType() { return classType; } /** * Try to cast the {@link IJCOBridgeReflected} instance into {@link HttpClientHandler}, a cast assert is made to check if types are compatible. * @param from {@link IJCOBridgeReflected} instance to be casted * @return {@link HttpClientHandler} instance * @throws java.lang.Throwable in case of error during cast operation */ public static HttpClientHandler cast(IJCOBridgeReflected from) throws Throwable { NetType.AssertCast(classType, from); return new HttpClientHandler(from.getJCOInstance()); } // Constructors section public HttpClientHandler() throws Throwable, system.IndexOutOfRangeException, system.ArgumentNullException, system.ArgumentOutOfRangeException, system.FormatException, system.diagnostics.tracing.EventSourceException, system.OutOfMemoryException, system.ArgumentException, system.NotImplementedException, system.resources.MissingManifestResourceException, system.ObjectDisposedException, system.InvalidOperationException, system.security.SecurityException, system.NotSupportedException, system.net.http.HttpRequestException, system.configuration.ConfigurationErrorsException, system.MulticastNotSupportedException, system.threading.WaitHandleCannotBeOpenedException, system.io.FileNotFoundException, system.io.DirectoryNotFoundException, system.UnauthorizedAccessException, system.io.IOException, system.io.PathTooLongException, system.io.DriveNotFoundException, system.OperationCanceledException, system.threading.AbandonedMutexException, system.threading.SemaphoreFullException, system.collections.generic.KeyNotFoundException { try { // add reference to assemblyName.dll file addReference(JCOReflector.getUseFullAssemblyName() ? assemblyFullName : assemblyShortName); setJCOInstance((JCObject)classType.NewObject()); } catch (JCNativeException jcne) { throw translateException(jcne); } } // Methods section // Properties section public boolean getAllowAutoRedirect() throws Throwable { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { return (boolean)classInstance.Get("AllowAutoRedirect"); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void setAllowAutoRedirect(boolean AllowAutoRedirect) throws Throwable, system.ObjectDisposedException, system.ArgumentNullException, system.ArgumentException, system.InvalidOperationException, system.MissingMethodException, system.reflection.TargetInvocationException, system.NotImplementedException, system.ArgumentOutOfRangeException, system.globalization.CultureNotFoundException, system.resources.MissingManifestResourceException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.Set("AllowAutoRedirect", AllowAutoRedirect); } catch (JCNativeException jcne) { throw translateException(jcne); } } public boolean getCheckCertificateRevocationList() throws Throwable, system.PlatformNotSupportedException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { return (boolean)classInstance.Get("CheckCertificateRevocationList"); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void setCheckCertificateRevocationList(boolean CheckCertificateRevocationList) throws Throwable, system.ObjectDisposedException, system.ArgumentNullException, system.ArgumentException, system.InvalidOperationException, system.MissingMethodException, system.reflection.TargetInvocationException, system.NotImplementedException, system.ArgumentOutOfRangeException, system.globalization.CultureNotFoundException, system.resources.MissingManifestResourceException, system.PlatformNotSupportedException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.Set("CheckCertificateRevocationList", CheckCertificateRevocationList); } catch (JCNativeException jcne) { throw translateException(jcne); } } public boolean getPreAuthenticate() throws Throwable { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { return (boolean)classInstance.Get("PreAuthenticate"); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void setPreAuthenticate(boolean PreAuthenticate) throws Throwable, system.ObjectDisposedException, system.ArgumentNullException, system.ArgumentException, system.InvalidOperationException, system.MissingMethodException, system.reflection.TargetInvocationException, system.NotImplementedException, system.ArgumentOutOfRangeException, system.globalization.CultureNotFoundException, system.resources.MissingManifestResourceException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.Set("PreAuthenticate", PreAuthenticate); } catch (JCNativeException jcne) { throw translateException(jcne); } } public boolean getSupportsAutomaticDecompression() throws Throwable { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { return (boolean)classInstance.Get("SupportsAutomaticDecompression"); } catch (JCNativeException jcne) { throw translateException(jcne); } } public boolean getSupportsProxy() throws Throwable { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { return (boolean)classInstance.Get("SupportsProxy"); } catch (JCNativeException jcne) { throw translateException(jcne); } } public boolean getSupportsRedirectConfiguration() throws Throwable { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { return (boolean)classInstance.Get("SupportsRedirectConfiguration"); } catch (JCNativeException jcne) { throw translateException(jcne); } } public boolean getUseCookies() throws Throwable { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { return (boolean)classInstance.Get("UseCookies"); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void setUseCookies(boolean UseCookies) throws Throwable, system.ObjectDisposedException, system.ArgumentNullException, system.ArgumentException, system.InvalidOperationException, system.MissingMethodException, system.reflection.TargetInvocationException, system.NotImplementedException, system.ArgumentOutOfRangeException, system.globalization.CultureNotFoundException, system.resources.MissingManifestResourceException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.Set("UseCookies", UseCookies); } catch (JCNativeException jcne) { throw translateException(jcne); } } public boolean getUseDefaultCredentials() throws Throwable { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { return (boolean)classInstance.Get("UseDefaultCredentials"); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void setUseDefaultCredentials(boolean UseDefaultCredentials) throws Throwable, system.ObjectDisposedException, system.ArgumentNullException, system.ArgumentException, system.InvalidOperationException, system.MissingMethodException, system.reflection.TargetInvocationException, system.NotImplementedException, system.ArgumentOutOfRangeException, system.globalization.CultureNotFoundException, system.resources.MissingManifestResourceException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.Set("UseDefaultCredentials", UseDefaultCredentials); } catch (JCNativeException jcne) { throw translateException(jcne); } } public boolean getUseProxy() throws Throwable { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { return (boolean)classInstance.Get("UseProxy"); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void setUseProxy(boolean UseProxy) throws Throwable, system.ObjectDisposedException, system.ArgumentNullException, system.ArgumentException, system.InvalidOperationException, system.MissingMethodException, system.reflection.TargetInvocationException, system.NotImplementedException, system.ArgumentOutOfRangeException, system.globalization.CultureNotFoundException, system.resources.MissingManifestResourceException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.Set("UseProxy", UseProxy); } catch (JCNativeException jcne) { throw translateException(jcne); } } public int getMaxAutomaticRedirections() throws Throwable { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { return (int)classInstance.Get("MaxAutomaticRedirections"); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void setMaxAutomaticRedirections(int MaxAutomaticRedirections) throws Throwable, system.ArgumentOutOfRangeException, system.ObjectDisposedException, system.ArgumentNullException, system.ArgumentException, system.InvalidOperationException, system.MissingMethodException, system.reflection.TargetInvocationException, system.NotImplementedException, system.globalization.CultureNotFoundException, system.resources.MissingManifestResourceException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.Set("MaxAutomaticRedirections", MaxAutomaticRedirections); } catch (JCNativeException jcne) { throw translateException(jcne); } } public int getMaxConnectionsPerServer() throws Throwable { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { return (int)classInstance.Get("MaxConnectionsPerServer"); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void setMaxConnectionsPerServer(int MaxConnectionsPerServer) throws Throwable, system.ArgumentNullException, system.ArgumentException, system.InvalidOperationException, system.MissingMethodException, system.reflection.TargetInvocationException, system.NotImplementedException, system.NotSupportedException, system.ArgumentOutOfRangeException, system.globalization.CultureNotFoundException, system.resources.MissingManifestResourceException, system.ObjectDisposedException, system.FormatException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.Set("MaxConnectionsPerServer", MaxConnectionsPerServer); } catch (JCNativeException jcne) { throw translateException(jcne); } } public int getMaxResponseHeadersLength() throws Throwable { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { return (int)classInstance.Get("MaxResponseHeadersLength"); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void setMaxResponseHeadersLength(int MaxResponseHeadersLength) throws Throwable, system.ArgumentOutOfRangeException, system.ObjectDisposedException, system.ArgumentNullException, system.ArgumentException, system.InvalidOperationException, system.MissingMethodException, system.reflection.TargetInvocationException, system.NotImplementedException, system.globalization.CultureNotFoundException, system.resources.MissingManifestResourceException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.Set("MaxResponseHeadersLength", MaxResponseHeadersLength); } catch (JCNativeException jcne) { throw translateException(jcne); } } public long getMaxRequestContentBufferSize() throws Throwable { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { return (long)classInstance.Get("MaxRequestContentBufferSize"); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void setMaxRequestContentBufferSize(long MaxRequestContentBufferSize) throws Throwable, system.ArgumentOutOfRangeException, system.ArgumentNullException, system.ArgumentException, system.InvalidOperationException, system.MissingMethodException, system.reflection.TargetInvocationException, system.NotImplementedException, system.NotSupportedException, system.globalization.CultureNotFoundException, system.resources.MissingManifestResourceException, system.ObjectDisposedException, system.FormatException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.Set("MaxRequestContentBufferSize", MaxRequestContentBufferSize); } catch (JCNativeException jcne) { throw translateException(jcne); } } public CookieContainer getCookieContainer() throws Throwable { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { JCObject val = (JCObject)classInstance.Get("CookieContainer"); return new CookieContainer(val); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void setCookieContainer(CookieContainer CookieContainer) throws Throwable, system.ArgumentNullException, system.ArgumentException, system.InvalidOperationException, system.MissingMethodException, system.reflection.TargetInvocationException, system.NotImplementedException, system.NotSupportedException, system.ArgumentOutOfRangeException, system.globalization.CultureNotFoundException, system.resources.MissingManifestResourceException, system.ObjectDisposedException, system.FormatException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.Set("CookieContainer", CookieContainer == null ? null : CookieContainer.getJCOInstance()); } catch (JCNativeException jcne) { throw translateException(jcne); } } public DecompressionMethods getAutomaticDecompression() throws Throwable { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { JCObject val = (JCObject)classInstance.Get("AutomaticDecompression"); return new DecompressionMethods(val); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void setAutomaticDecompression(DecompressionMethods AutomaticDecompression) throws Throwable, system.ObjectDisposedException, system.ArgumentNullException, system.ArgumentException, system.InvalidOperationException, system.MissingMethodException, system.reflection.TargetInvocationException, system.NotImplementedException, system.ArgumentOutOfRangeException, system.globalization.CultureNotFoundException, system.resources.MissingManifestResourceException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.Set("AutomaticDecompression", AutomaticDecompression == null ? null : AutomaticDecompression.getJCOInstance()); } catch (JCNativeException jcne) { throw translateException(jcne); } } public ClientCertificateOption getClientCertificateOptions() throws Throwable { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { JCObject val = (JCObject)classInstance.Get("ClientCertificateOptions"); return new ClientCertificateOption(val); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void setClientCertificateOptions(ClientCertificateOption ClientCertificateOptions) throws Throwable, system.ArgumentOutOfRangeException, system.ObjectDisposedException, system.ArgumentNullException, system.ArgumentException, system.InvalidOperationException, system.MissingMethodException, system.reflection.TargetInvocationException, system.NotImplementedException, system.globalization.CultureNotFoundException, system.resources.MissingManifestResourceException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.Set("ClientCertificateOptions", ClientCertificateOptions == null ? null : ClientCertificateOptions.getJCOInstance()); } catch (JCNativeException jcne) { throw translateException(jcne); } } public ICredentials getCredentials() throws Throwable { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { JCObject val = (JCObject)classInstance.Get("Credentials"); return new ICredentialsImplementation(val); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void setCredentials(ICredentials Credentials) throws Throwable, system.ObjectDisposedException, system.ArgumentNullException, system.ArgumentException, system.InvalidOperationException, system.MissingMethodException, system.reflection.TargetInvocationException, system.NotImplementedException, system.ArgumentOutOfRangeException, system.globalization.CultureNotFoundException, system.resources.MissingManifestResourceException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.Set("Credentials", Credentials == null ? null : Credentials.getJCOInstance()); } catch (JCNativeException jcne) { throw translateException(jcne); } } public ICredentials getDefaultProxyCredentials() throws Throwable { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { JCObject val = (JCObject)classInstance.Get("DefaultProxyCredentials"); return new ICredentialsImplementation(val); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void setDefaultProxyCredentials(ICredentials DefaultProxyCredentials) throws Throwable, system.ObjectDisposedException, system.ArgumentNullException, system.ArgumentException, system.InvalidOperationException, system.MissingMethodException, system.reflection.TargetInvocationException, system.NotImplementedException, system.ArgumentOutOfRangeException, system.globalization.CultureNotFoundException, system.resources.MissingManifestResourceException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.Set("DefaultProxyCredentials", DefaultProxyCredentials == null ? null : DefaultProxyCredentials.getJCOInstance()); } catch (JCNativeException jcne) { throw translateException(jcne); } } public IWebProxy getProxy() throws Throwable { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { JCObject val = (JCObject)classInstance.Get("Proxy"); return new IWebProxyImplementation(val); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void setProxy(IWebProxy Proxy) throws Throwable, system.ArgumentNullException, system.ArgumentException, system.InvalidOperationException, system.MissingMethodException, system.reflection.TargetInvocationException, system.NotImplementedException, system.NotSupportedException, system.ArgumentOutOfRangeException, system.globalization.CultureNotFoundException, system.resources.MissingManifestResourceException, system.ObjectDisposedException, system.FormatException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.Set("Proxy", Proxy == null ? null : Proxy.getJCOInstance()); } catch (JCNativeException jcne) { throw translateException(jcne); } } public SslProtocols getSslProtocols() throws Throwable, system.PlatformNotSupportedException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { JCObject val = (JCObject)classInstance.Get("SslProtocols"); return new SslProtocols(val); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void setSslProtocols(SslProtocols SslProtocols) throws Throwable, system.ObjectDisposedException, system.ArgumentNullException, system.ArgumentException, system.InvalidOperationException, system.MissingMethodException, system.reflection.TargetInvocationException, system.NotImplementedException, system.ArgumentOutOfRangeException, system.globalization.CultureNotFoundException, system.resources.MissingManifestResourceException, system.PlatformNotSupportedException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.Set("SslProtocols", SslProtocols == null ? null : SslProtocols.getJCOInstance()); } catch (JCNativeException jcne) { throw translateException(jcne); } } public X509CertificateCollection getClientCertificates() throws Throwable, system.ArgumentNullException, system.ArgumentException, system.InvalidOperationException, system.MissingMethodException, system.reflection.TargetInvocationException, system.NotImplementedException, system.NotSupportedException, system.ArgumentOutOfRangeException, system.globalization.CultureNotFoundException, system.resources.MissingManifestResourceException, system.ObjectDisposedException, system.FormatException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { JCObject val = (JCObject)classInstance.Get("ClientCertificates"); return new X509CertificateCollection(val); } catch (JCNativeException jcne) { throw translateException(jcne); } } // Instance Events section }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy