Package system.net
Class WebRequest
- java.lang.Object
-
- org.mases.jcobridge.netreflection.NetObject
-
- system.MarshalByRefObject
-
- system.net.WebRequest
-
- All Implemented Interfaces:
IJCOBridgeReflected
,ISerializable
- Direct Known Subclasses:
FileWebRequest
,FtpWebRequest
,HttpWebRequest
,PackWebRequest
public class WebRequest extends MarshalByRefObject implements ISerializable
The base .NET class managing System.Net.WebRequest, System.Net.Requests, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a..NET documentation at https://docs.microsoft.com/en-us/dotnet/api/System.Net.WebRequest
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.Requests, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3astatic java.lang.String
assemblyShortName
Assembly name: System.Net.Requestsstatic java.lang.String
className
Qualified class name: System.Net.WebRequeststatic org.mases.jcobridge.JCType
classType
The type managed from JCOBridge.
-
Constructor Summary
Constructors Constructor Description WebRequest()
WebRequest(java.lang.Object instance)
Internal constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
Abort()
IAsyncResult
BeginGetRequestStream(AsyncCallback callback, NetObject state)
IAsyncResult
BeginGetResponse(AsyncCallback callback, NetObject state)
static WebRequest
cast(IJCOBridgeReflected from)
Try to cast theIJCOBridgeReflected
instance intoWebRequest
, a cast assert is made to check if types are compatible.static WebRequest
Create(java.lang.String requestUriString)
static WebRequest
Create(Uri requestUri)
static WebRequest
CreateDefault(Uri requestUri)
static HttpWebRequest
CreateHttp(java.lang.String requestUriString)
static HttpWebRequest
CreateHttp(Uri requestUri)
Stream
EndGetRequestStream(IAsyncResult asyncResult)
WebResponse
EndGetResponse(IAsyncResult asyncResult)
AuthenticationLevel
getAuthenticationLevel()
RequestCachePolicy
getCachePolicy()
java.lang.String
getConnectionGroupName()
long
getContentLength()
java.lang.String
getContentType()
ICredentials
getCredentials()
static RequestCachePolicy
getDefaultCachePolicy()
static IWebProxy
getDefaultWebProxy()
WebHeaderCollection
getHeaders()
TokenImpersonationLevel
getImpersonationLevel()
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 Typejava.lang.String
getMethod()
boolean
getPreAuthenticate()
IWebProxy
getProxy()
Stream
GetRequestStream()
Uri
getRequestUri()
WebResponse
GetResponse()
static IWebProxy
GetSystemWebProxy()
int
getTimeout()
boolean
getUseDefaultCredentials()
static boolean
RegisterPrefix(java.lang.String prefix, IWebRequestCreate creator)
void
setAuthenticationLevel(AuthenticationLevel AuthenticationLevel)
void
setCachePolicy(RequestCachePolicy CachePolicy)
void
setConnectionGroupName(java.lang.String ConnectionGroupName)
void
setContentLength(long ContentLength)
void
setContentType(java.lang.String ContentType)
void
setCredentials(ICredentials Credentials)
static void
setDefaultCachePolicy(RequestCachePolicy DefaultCachePolicy)
static void
setDefaultWebProxy(IWebProxy DefaultWebProxy)
void
setHeaders(WebHeaderCollection Headers)
void
setImpersonationLevel(TokenImpersonationLevel ImpersonationLevel)
void
setJCOInstance(org.mases.jcobridge.JCObject instance)
void
setMethod(java.lang.String Method)
void
setPreAuthenticate(boolean PreAuthenticate)
void
setProxy(IWebProxy Proxy)
void
setTimeout(int Timeout)
void
setUseDefaultCredentials(boolean UseDefaultCredentials)
-
Methods inherited from class system.MarshalByRefObject
GetLifetimeService, InitializeLifetimeService
-
Methods inherited from class org.mases.jcobridge.netreflection.NetObject
Equals, Equals, GetHashCode, GetType, hashCode, toString, ToString
-
Methods inherited from interface system.runtime.serialization.ISerializable
GetObjectData
-
-
-
-
Field Detail
-
assemblyFullName
public static final java.lang.String assemblyFullName
Fully assembly qualified name: System.Net.Requests, 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.Requests- See Also:
- Constant Field Values
-
className
public static final java.lang.String className
Qualified class name: System.Net.WebRequest- See Also:
- Constant Field Values
-
classType
public static org.mases.jcobridge.JCType classType
The type managed from JCOBridge. SeeJCType
-
-
Method Detail
-
getJCOAssemblyName
public java.lang.String getJCOAssemblyName()
Description copied from interface:IJCOBridgeReflected
Returns the reflected Assembly name- Specified by:
getJCOAssemblyName
in interfaceIJCOBridgeReflected
- Specified by:
getJCOAssemblyName
in interfaceISerializable
- Overrides:
getJCOAssemblyName
in classMarshalByRefObject
- 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
- Specified by:
getJCOClassName
in interfaceISerializable
- Overrides:
getJCOClassName
in classMarshalByRefObject
- 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
- Specified by:
getJCOObjectName
in interfaceISerializable
- Overrides:
getJCOObjectName
in classMarshalByRefObject
- 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
- Specified by:
getJCOInstance
in interfaceISerializable
- Overrides:
getJCOInstance
in classMarshalByRefObject
- Returns:
- An
Object
representing the CLR instance of the instantiated Class
-
setJCOInstance
public void setJCOInstance(org.mases.jcobridge.JCObject instance)
- Overrides:
setJCOInstance
in classMarshalByRefObject
-
getJCOType
public org.mases.jcobridge.JCType getJCOType()
Description copied from interface:IJCOBridgeReflected
Returns the instantiated class Type- Specified by:
getJCOType
in interfaceIJCOBridgeReflected
- Specified by:
getJCOType
in interfaceISerializable
- Overrides:
getJCOType
in classMarshalByRefObject
- Returns:
- A
JCType
representing the CLR Type of the instantiated Class
-
cast
public static WebRequest cast(IJCOBridgeReflected from) throws java.lang.Throwable
Try to cast theIJCOBridgeReflected
instance intoWebRequest
, a cast assert is made to check if types are compatible.- Parameters:
from
-IJCOBridgeReflected
instance to be casted- Returns:
WebRequest
instance- Throws:
java.lang.Throwable
- in case of error during cast operation
-
RegisterPrefix
public static boolean RegisterPrefix(java.lang.String prefix, IWebRequestCreate creator) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, ArgumentNullException, OutOfMemoryException, ExternalException, CultureNotFoundException, IndexOutOfRangeException, UnreachableException, UriFormatException
- Throws:
java.lang.Throwable
ArgumentException
ArgumentOutOfRangeException
PlatformNotSupportedException
NotSupportedException
ObjectDisposedException
InvalidOperationException
RankException
ArrayTypeMismatchException
ArgumentNullException
OutOfMemoryException
ExternalException
CultureNotFoundException
IndexOutOfRangeException
UnreachableException
UriFormatException
-
BeginGetRequestStream
public IAsyncResult BeginGetRequestStream(AsyncCallback callback, NetObject state) throws java.lang.Throwable, ArgumentNullException, ArgumentException, PlatformNotSupportedException, InvalidOperationException, ArgumentOutOfRangeException, CultureNotFoundException, ObjectDisposedException
-
BeginGetResponse
public IAsyncResult BeginGetResponse(AsyncCallback callback, NetObject state) throws java.lang.Throwable, ArgumentNullException, ArgumentException, PlatformNotSupportedException, InvalidOperationException, ArgumentOutOfRangeException, CultureNotFoundException, ObjectDisposedException
-
EndGetRequestStream
public Stream EndGetRequestStream(IAsyncResult asyncResult) throws java.lang.Throwable, ArgumentNullException, ArgumentException, PlatformNotSupportedException, InvalidOperationException, ArgumentOutOfRangeException, CultureNotFoundException, ObjectDisposedException
-
GetRequestStream
public Stream GetRequestStream() throws java.lang.Throwable, ArgumentNullException, ArgumentException, PlatformNotSupportedException, InvalidOperationException, ArgumentOutOfRangeException, CultureNotFoundException, ObjectDisposedException
-
CreateHttp
public static HttpWebRequest CreateHttp(java.lang.String requestUriString) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, ArgumentNullException, OutOfMemoryException, ExternalException, CultureNotFoundException, IndexOutOfRangeException, UnreachableException
- Throws:
java.lang.Throwable
ArgumentException
ArgumentOutOfRangeException
PlatformNotSupportedException
NotSupportedException
ObjectDisposedException
InvalidOperationException
RankException
ArrayTypeMismatchException
ArgumentNullException
OutOfMemoryException
ExternalException
CultureNotFoundException
IndexOutOfRangeException
UnreachableException
-
CreateHttp
public static HttpWebRequest CreateHttp(Uri requestUri) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, ArgumentNullException, IndexOutOfRangeException, UriFormatException, CultureNotFoundException, OutOfMemoryException, ExternalException
- Throws:
java.lang.Throwable
ArgumentException
ArgumentOutOfRangeException
PlatformNotSupportedException
NotSupportedException
ObjectDisposedException
InvalidOperationException
RankException
ArrayTypeMismatchException
ArgumentNullException
IndexOutOfRangeException
UriFormatException
CultureNotFoundException
OutOfMemoryException
ExternalException
-
GetSystemWebProxy
public static IWebProxy GetSystemWebProxy() throws java.lang.Throwable, MissingMemberException, InvalidOperationException, PlatformNotSupportedException, ArgumentException
- Throws:
java.lang.Throwable
MissingMemberException
InvalidOperationException
PlatformNotSupportedException
ArgumentException
-
Create
public static WebRequest Create(java.lang.String requestUriString) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, ArgumentNullException, OutOfMemoryException, ExternalException, CultureNotFoundException, IndexOutOfRangeException, UnreachableException, UriFormatException
- Throws:
java.lang.Throwable
ArgumentException
ArgumentOutOfRangeException
PlatformNotSupportedException
NotSupportedException
ObjectDisposedException
InvalidOperationException
RankException
ArrayTypeMismatchException
ArgumentNullException
OutOfMemoryException
ExternalException
CultureNotFoundException
IndexOutOfRangeException
UnreachableException
UriFormatException
-
Create
public static WebRequest Create(Uri requestUri) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, ArgumentNullException, IndexOutOfRangeException, UnreachableException, UriFormatException, OutOfMemoryException, CultureNotFoundException, ExternalException
- Throws:
java.lang.Throwable
ArgumentException
ArgumentOutOfRangeException
PlatformNotSupportedException
NotSupportedException
ObjectDisposedException
InvalidOperationException
RankException
ArrayTypeMismatchException
ArgumentNullException
IndexOutOfRangeException
UnreachableException
UriFormatException
OutOfMemoryException
CultureNotFoundException
ExternalException
-
CreateDefault
public static WebRequest CreateDefault(Uri requestUri) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, ArgumentNullException, IndexOutOfRangeException, UnreachableException, UriFormatException, OutOfMemoryException, CultureNotFoundException, ExternalException
- Throws:
java.lang.Throwable
ArgumentException
ArgumentOutOfRangeException
PlatformNotSupportedException
NotSupportedException
ObjectDisposedException
InvalidOperationException
RankException
ArrayTypeMismatchException
ArgumentNullException
IndexOutOfRangeException
UnreachableException
UriFormatException
OutOfMemoryException
CultureNotFoundException
ExternalException
-
EndGetResponse
public WebResponse EndGetResponse(IAsyncResult asyncResult) throws java.lang.Throwable, ArgumentNullException, ArgumentException, PlatformNotSupportedException, InvalidOperationException, ArgumentOutOfRangeException, CultureNotFoundException, ObjectDisposedException
-
GetResponse
public WebResponse GetResponse() throws java.lang.Throwable, ArgumentNullException, ArgumentException, PlatformNotSupportedException, InvalidOperationException, ArgumentOutOfRangeException, CultureNotFoundException, ObjectDisposedException
-
Abort
public void Abort() throws java.lang.Throwable, ArgumentNullException, ArgumentException, PlatformNotSupportedException, InvalidOperationException, ArgumentOutOfRangeException, CultureNotFoundException, ObjectDisposedException
-
getPreAuthenticate
public boolean getPreAuthenticate() throws java.lang.Throwable, ArgumentNullException, ArgumentException, PlatformNotSupportedException, InvalidOperationException, ArgumentOutOfRangeException, CultureNotFoundException, ObjectDisposedException
-
setPreAuthenticate
public void setPreAuthenticate(boolean PreAuthenticate) throws java.lang.Throwable, ArgumentNullException, ArgumentException, PlatformNotSupportedException, InvalidOperationException, ArgumentOutOfRangeException, CultureNotFoundException, ObjectDisposedException
-
getUseDefaultCredentials
public boolean getUseDefaultCredentials() throws java.lang.Throwable, ArgumentNullException, ArgumentException, PlatformNotSupportedException, InvalidOperationException, ArgumentOutOfRangeException, CultureNotFoundException, ObjectDisposedException
-
setUseDefaultCredentials
public void setUseDefaultCredentials(boolean UseDefaultCredentials) throws java.lang.Throwable, ArgumentNullException, ArgumentException, PlatformNotSupportedException, InvalidOperationException, ArgumentOutOfRangeException, CultureNotFoundException, ObjectDisposedException
-
getTimeout
public int getTimeout() throws java.lang.Throwable, ArgumentNullException, ArgumentException, PlatformNotSupportedException, InvalidOperationException, ArgumentOutOfRangeException, CultureNotFoundException, ObjectDisposedException
-
setTimeout
public void setTimeout(int Timeout) throws java.lang.Throwable, ArgumentNullException, ArgumentException, PlatformNotSupportedException, InvalidOperationException, ArgumentOutOfRangeException, CultureNotFoundException, ObjectDisposedException
-
getContentLength
public long getContentLength() throws java.lang.Throwable, ArgumentNullException, ArgumentException, PlatformNotSupportedException, InvalidOperationException, ArgumentOutOfRangeException, CultureNotFoundException, ObjectDisposedException
-
setContentLength
public void setContentLength(long ContentLength) throws java.lang.Throwable, ArgumentNullException, ArgumentException, PlatformNotSupportedException, InvalidOperationException, ArgumentOutOfRangeException, CultureNotFoundException, ObjectDisposedException
-
getCachePolicy
public RequestCachePolicy getCachePolicy() throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
setCachePolicy
public void setCachePolicy(RequestCachePolicy CachePolicy) throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
getDefaultCachePolicy
public static RequestCachePolicy getDefaultCachePolicy() throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
setDefaultCachePolicy
public static void setDefaultCachePolicy(RequestCachePolicy DefaultCachePolicy) throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
getCredentials
public ICredentials getCredentials() throws java.lang.Throwable, ArgumentNullException, ArgumentException, PlatformNotSupportedException, InvalidOperationException, ArgumentOutOfRangeException, CultureNotFoundException, ObjectDisposedException
-
setCredentials
public void setCredentials(ICredentials Credentials) throws java.lang.Throwable, ArgumentNullException, ArgumentException, PlatformNotSupportedException, InvalidOperationException, ArgumentOutOfRangeException, CultureNotFoundException, ObjectDisposedException
-
getDefaultWebProxy
public static IWebProxy getDefaultWebProxy() throws java.lang.Throwable, MissingMemberException, InvalidOperationException, ArgumentException, PlatformNotSupportedException
- Throws:
java.lang.Throwable
MissingMemberException
InvalidOperationException
ArgumentException
PlatformNotSupportedException
-
setDefaultWebProxy
public static void setDefaultWebProxy(IWebProxy DefaultWebProxy) throws java.lang.Throwable, ArgumentOutOfRangeException, ArgumentNullException, InvalidOperationException, PlatformNotSupportedException, ArrayTypeMismatchException, ArgumentException, NotSupportedException, ObjectDisposedException, RankException, IndexOutOfRangeException
-
getProxy
public IWebProxy getProxy() throws java.lang.Throwable, ArgumentNullException, ArgumentException, PlatformNotSupportedException, InvalidOperationException, ArgumentOutOfRangeException, CultureNotFoundException, ObjectDisposedException
-
setProxy
public void setProxy(IWebProxy Proxy) throws java.lang.Throwable, ArgumentNullException, ArgumentException, PlatformNotSupportedException, InvalidOperationException, ArgumentOutOfRangeException, CultureNotFoundException, ObjectDisposedException
-
getAuthenticationLevel
public AuthenticationLevel getAuthenticationLevel() throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
setAuthenticationLevel
public void setAuthenticationLevel(AuthenticationLevel AuthenticationLevel) throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
getHeaders
public WebHeaderCollection getHeaders() throws java.lang.Throwable, ArgumentNullException, ArgumentException, PlatformNotSupportedException, InvalidOperationException, ArgumentOutOfRangeException, CultureNotFoundException, ObjectDisposedException
-
setHeaders
public void setHeaders(WebHeaderCollection Headers) throws java.lang.Throwable, ArgumentNullException, ArgumentException, PlatformNotSupportedException, InvalidOperationException, ArgumentOutOfRangeException, CultureNotFoundException, ObjectDisposedException
-
getImpersonationLevel
public TokenImpersonationLevel getImpersonationLevel() throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
setImpersonationLevel
public void setImpersonationLevel(TokenImpersonationLevel ImpersonationLevel) throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
getConnectionGroupName
public java.lang.String getConnectionGroupName() throws java.lang.Throwable, ArgumentNullException, ArgumentException, PlatformNotSupportedException, InvalidOperationException, ArgumentOutOfRangeException, CultureNotFoundException, ObjectDisposedException
-
setConnectionGroupName
public void setConnectionGroupName(java.lang.String ConnectionGroupName) throws java.lang.Throwable, ArgumentNullException, ArgumentException, PlatformNotSupportedException, InvalidOperationException, ArgumentOutOfRangeException, CultureNotFoundException, ObjectDisposedException
-
getContentType
public java.lang.String getContentType() throws java.lang.Throwable, ArgumentNullException, ArgumentException, PlatformNotSupportedException, InvalidOperationException, ArgumentOutOfRangeException, CultureNotFoundException, ObjectDisposedException
-
setContentType
public void setContentType(java.lang.String ContentType) throws java.lang.Throwable, ArgumentNullException, ArgumentException, PlatformNotSupportedException, InvalidOperationException, ArgumentOutOfRangeException, CultureNotFoundException, ObjectDisposedException
-
getMethod
public java.lang.String getMethod() throws java.lang.Throwable, ArgumentNullException, ArgumentException, PlatformNotSupportedException, InvalidOperationException, ArgumentOutOfRangeException, CultureNotFoundException, ObjectDisposedException
-
setMethod
public void setMethod(java.lang.String Method) throws java.lang.Throwable, ArgumentNullException, ArgumentException, PlatformNotSupportedException, InvalidOperationException, ArgumentOutOfRangeException, CultureNotFoundException, ObjectDisposedException
-
getRequestUri
public Uri getRequestUri() throws java.lang.Throwable, ArgumentNullException, ArgumentException, PlatformNotSupportedException, InvalidOperationException, ArgumentOutOfRangeException, CultureNotFoundException, ObjectDisposedException
-
-