Package system.net.http
Class HttpClient
- java.lang.Object
-
- org.mases.jcobridge.netreflection.NetObject
-
- system.net.http.HttpMessageInvoker
-
- system.net.http.HttpClient
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,IJCOBridgeReflected
public class HttpClient extends HttpMessageInvoker
The base .NET class managing System.Net.Http.HttpClient, System.Net.Http, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a..NET documentation at https://docs.microsoft.com/en-us/dotnet/api/System.Net.Http.HttpClient
Powered by JCOBridge: more info at https://www.jcobridge.com
- Author:
- MASES s.r.l https://masesgroup.com
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
assemblyFullName
Fully assembly qualified name: System.Net.Http, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3astatic java.lang.String
assemblyShortName
Assembly name: System.Net.Httpstatic java.lang.String
className
Qualified class name: System.Net.Http.HttpClientstatic org.mases.jcobridge.JCType
classType
The type managed from JCOBridge.
-
Constructor Summary
Constructors Constructor Description HttpClient()
HttpClient(java.lang.Object instance)
Internal constructor.HttpClient(HttpMessageHandler handler)
HttpClient(HttpMessageHandler handler, boolean disposeHandler)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
CancelPendingRequests()
static HttpClient
cast(IJCOBridgeReflected from)
Try to cast theIJCOBridgeReflected
instance intoHttpClient
, a cast assert is made to check if types are compatible.Uri
getBaseAddress()
static IWebProxy
getDefaultProxy()
HttpRequestHeaders
getDefaultRequestHeaders()
Version
getDefaultRequestVersion()
HttpVersionPolicy
getDefaultVersionPolicy()
java.lang.String
getJCOAssemblyName()
Returns the reflected Assembly namejava.lang.String
getJCOClassName()
Returns the reflected Class namejava.lang.Object
getJCOInstance()
Returns the instantiated classjava.lang.String
getJCOObjectName()
Returns the reflected Class name used to build the objectorg.mases.jcobridge.JCType
getJCOType()
Returns the instantiated class Typelong
getMaxResponseContentBufferSize()
TimeSpan
getTimeout()
HttpResponseMessage
Send(HttpRequestMessage request)
HttpResponseMessage
Send(HttpRequestMessage request, HttpCompletionOption completionOption)
HttpResponseMessage
Send(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationToken cancellationToken)
HttpResponseMessage
Send(HttpRequestMessage request, CancellationToken cancellationToken)
void
setBaseAddress(Uri BaseAddress)
static void
setDefaultProxy(IWebProxy DefaultProxy)
void
setDefaultRequestVersion(Version DefaultRequestVersion)
void
setDefaultVersionPolicy(HttpVersionPolicy DefaultVersionPolicy)
void
setJCOInstance(org.mases.jcobridge.JCObject instance)
void
setMaxResponseContentBufferSize(long MaxResponseContentBufferSize)
void
setTimeout(TimeSpan Timeout)
-
Methods inherited from class system.net.http.HttpMessageInvoker
close, Dispose
-
-
-
-
Field Detail
-
assemblyFullName
public static final java.lang.String assemblyFullName
Fully assembly qualified name: System.Net.Http, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a- See Also:
- Constant Field Values
-
assemblyShortName
public static final java.lang.String assemblyShortName
Assembly name: System.Net.Http- See Also:
- Constant Field Values
-
className
public static final java.lang.String className
Qualified class name: System.Net.Http.HttpClient- See Also:
- Constant Field Values
-
classType
public static org.mases.jcobridge.JCType classType
The type managed from JCOBridge. SeeJCType
-
-
Constructor Detail
-
HttpClient
public HttpClient(java.lang.Object instance) throws java.lang.Throwable
Internal constructor. Use with caution- Throws:
java.lang.Throwable
-
HttpClient
public HttpClient() throws java.lang.Throwable, PlatformNotSupportedException, IndexOutOfRangeException, OutOfMemoryException, InvalidOperationException, ArrayTypeMismatchException, ArgumentException, FormatException, ArgumentNullException, ArgumentOutOfRangeException, EventSourceException, ObjectDisposedException, CryptographicException
- Throws:
java.lang.Throwable
PlatformNotSupportedException
IndexOutOfRangeException
OutOfMemoryException
InvalidOperationException
ArrayTypeMismatchException
ArgumentException
FormatException
ArgumentNullException
ArgumentOutOfRangeException
EventSourceException
ObjectDisposedException
CryptographicException
-
HttpClient
public HttpClient(HttpMessageHandler handler, boolean disposeHandler) throws java.lang.Throwable, ArgumentException, NotSupportedException, InvalidOperationException, ArgumentOutOfRangeException, ArgumentNullException, PlatformNotSupportedException, IndexOutOfRangeException, OutOfMemoryException, EventSourceException
-
HttpClient
public HttpClient(HttpMessageHandler handler) throws java.lang.Throwable, NotSupportedException, ArgumentException, ArgumentNullException, OutOfMemoryException, PlatformNotSupportedException, EventSourceException
- Throws:
java.lang.Throwable
NotSupportedException
ArgumentException
ArgumentNullException
OutOfMemoryException
PlatformNotSupportedException
EventSourceException
-
-
Method Detail
-
getJCOAssemblyName
public java.lang.String getJCOAssemblyName()
Description copied from interface:IJCOBridgeReflected
Returns the reflected Assembly name- Specified by:
getJCOAssemblyName
in interfaceIJCOBridgeReflected
- Overrides:
getJCOAssemblyName
in classHttpMessageInvoker
- Returns:
- A
String
representing the Fullname of reflected Assembly
-
getJCOClassName
public java.lang.String getJCOClassName()
Description copied from interface:IJCOBridgeReflected
Returns the reflected Class name- Specified by:
getJCOClassName
in interfaceIJCOBridgeReflected
- Overrides:
getJCOClassName
in classHttpMessageInvoker
- Returns:
- A
String
representing the Fullname of reflected Class
-
getJCOObjectName
public java.lang.String getJCOObjectName()
Description copied from interface:IJCOBridgeReflected
Returns the reflected Class name used to build the object- Specified by:
getJCOObjectName
in interfaceIJCOBridgeReflected
- Overrides:
getJCOObjectName
in classHttpMessageInvoker
- Returns:
- A
String
representing the name used to allocated the object in CLR context
-
getJCOInstance
public java.lang.Object getJCOInstance()
Description copied from interface:IJCOBridgeReflected
Returns the instantiated class- Specified by:
getJCOInstance
in interfaceIJCOBridgeReflected
- Overrides:
getJCOInstance
in classHttpMessageInvoker
- Returns:
- An
Object
representing the CLR instance of the instantiated Class
-
setJCOInstance
public void setJCOInstance(org.mases.jcobridge.JCObject instance)
- Overrides:
setJCOInstance
in classHttpMessageInvoker
-
getJCOType
public org.mases.jcobridge.JCType getJCOType()
Description copied from interface:IJCOBridgeReflected
Returns the instantiated class Type- Specified by:
getJCOType
in interfaceIJCOBridgeReflected
- Overrides:
getJCOType
in classHttpMessageInvoker
- Returns:
- A
JCType
representing the CLR Type of the instantiated Class
-
cast
public static HttpClient cast(IJCOBridgeReflected from) throws java.lang.Throwable
Try to cast theIJCOBridgeReflected
instance intoHttpClient
, a cast assert is made to check if types are compatible.- Parameters:
from
-IJCOBridgeReflected
instance to be casted- Returns:
HttpClient
instance- Throws:
java.lang.Throwable
- in case of error during cast operation
-
Send
public HttpResponseMessage Send(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationToken cancellationToken) throws java.lang.Throwable, ArgumentException, NotSupportedException, InvalidOperationException, ArgumentOutOfRangeException, ArgumentNullException, ObjectDisposedException, IndexOutOfRangeException, OutOfMemoryException, PlatformNotSupportedException, CultureNotFoundException, UriFormatException, OverflowException, FormatException, TaskSchedulerException
- Throws:
java.lang.Throwable
ArgumentException
NotSupportedException
InvalidOperationException
ArgumentOutOfRangeException
ArgumentNullException
ObjectDisposedException
IndexOutOfRangeException
OutOfMemoryException
PlatformNotSupportedException
CultureNotFoundException
UriFormatException
OverflowException
FormatException
TaskSchedulerException
-
Send
public HttpResponseMessage Send(HttpRequestMessage request, HttpCompletionOption completionOption) throws java.lang.Throwable, NotSupportedException, ArgumentException, ArgumentNullException, ObjectDisposedException, InvalidOperationException, ArgumentOutOfRangeException, IndexOutOfRangeException, PlatformNotSupportedException, OutOfMemoryException, UnreachableException, OverflowException, FormatException
-
Send
public HttpResponseMessage Send(HttpRequestMessage request, CancellationToken cancellationToken) throws java.lang.Throwable, NotSupportedException, ArgumentException, ArgumentNullException, ObjectDisposedException, InvalidOperationException, ArgumentOutOfRangeException, IndexOutOfRangeException, PlatformNotSupportedException, OutOfMemoryException, UnreachableException, OverflowException, FormatException
- Overrides:
Send
in classHttpMessageInvoker
- Throws:
java.lang.Throwable
NotSupportedException
ArgumentException
ArgumentNullException
ObjectDisposedException
InvalidOperationException
ArgumentOutOfRangeException
IndexOutOfRangeException
PlatformNotSupportedException
OutOfMemoryException
UnreachableException
OverflowException
FormatException
-
Send
public HttpResponseMessage Send(HttpRequestMessage request) throws java.lang.Throwable, NotSupportedException, ArgumentException, ArgumentNullException, ObjectDisposedException, InvalidOperationException, ArgumentOutOfRangeException, IndexOutOfRangeException, PlatformNotSupportedException, OutOfMemoryException, UnreachableException, OverflowException, FormatException
-
CancelPendingRequests
public void CancelPendingRequests() throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, ArgumentNullException, AggregateException
-
getMaxResponseContentBufferSize
public long getMaxResponseContentBufferSize() throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
setMaxResponseContentBufferSize
public void setMaxResponseContentBufferSize(long MaxResponseContentBufferSize) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, ArgumentNullException, InvalidOperationException, PlatformNotSupportedException, ArrayTypeMismatchException, NotSupportedException, ObjectDisposedException, RankException, IndexOutOfRangeException, FormatException
-
getDefaultRequestHeaders
public HttpRequestHeaders getDefaultRequestHeaders() throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
getDefaultVersionPolicy
public HttpVersionPolicy getDefaultVersionPolicy() throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
setDefaultVersionPolicy
public void setDefaultVersionPolicy(HttpVersionPolicy DefaultVersionPolicy) throws java.lang.Throwable, ArgumentException, NotSupportedException, InvalidOperationException, ArgumentOutOfRangeException, ObjectDisposedException
- Throws:
java.lang.Throwable
ArgumentException
NotSupportedException
InvalidOperationException
ArgumentOutOfRangeException
ObjectDisposedException
-
getDefaultProxy
public static IWebProxy getDefaultProxy() throws java.lang.Throwable, MissingMethodException, TargetInvocationException, MissingMemberException, InvalidOperationException, ArgumentNullException, PlatformNotSupportedException, ArgumentException
-
setDefaultProxy
public static void setDefaultProxy(IWebProxy DefaultProxy) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, ArgumentNullException
-
getTimeout
public TimeSpan getTimeout() throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
setTimeout
public void setTimeout(TimeSpan Timeout) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, ArgumentNullException, InvalidOperationException, PlatformNotSupportedException, ArrayTypeMismatchException, NotSupportedException, ObjectDisposedException, RankException, IndexOutOfRangeException, FormatException
-
getBaseAddress
public Uri getBaseAddress() throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
setBaseAddress
public void setBaseAddress(Uri BaseAddress) throws java.lang.Throwable, ArgumentNullException, ArgumentException, PlatformNotSupportedException, InvalidOperationException, ArgumentOutOfRangeException, CultureNotFoundException, ObjectDisposedException, NotSupportedException, OutOfMemoryException, EventSourceException
-
getDefaultRequestVersion
public Version getDefaultRequestVersion() throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
setDefaultRequestVersion
public void setDefaultRequestVersion(Version DefaultRequestVersion) throws java.lang.Throwable, ArgumentException, NotSupportedException, InvalidOperationException, ArgumentOutOfRangeException, ObjectDisposedException
- Throws:
java.lang.Throwable
ArgumentException
NotSupportedException
InvalidOperationException
ArgumentOutOfRangeException
ObjectDisposedException
-
-