Package org.gnome.webkit.wpe
Class URIResponse
java.lang.Object
io.github.jwharm.javagi.base.ProxyInstance
org.gnome.gobject.TypeInstance
org.gnome.gobject.GObject
org.gnome.webkit.wpe.URIResponse
- All Implemented Interfaces:
Proxy
Represents an URI response.
A WebKitURIResponse
contains information such as the URI, the
status code, the content length, the mime type, the HTTP status or
the suggested filename.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
URIResponse.Builder<B extends URIResponse.Builder<B>>
Inner class implementing a builder pattern to construct a GObject with properties.static class
Nested classes/interfaces inherited from class org.gnome.gobject.GObject
GObject.NotifyCallback, GObject.ObjectClass
-
Constructor Summary
ConstructorDescriptionURIResponse
(MemorySegment address) Create a URIResponse proxy instance for the provided memory address. -
Method Summary
Modifier and TypeMethodDescriptionprotected URIResponse
asParent()
Returns this instance as if it were its parent type.static URIResponse.Builder
<? extends URIResponse.Builder> builder()
AURIResponse.Builder
object constructs aURIResponse
with the specified properties.long
Get the expected content length of theWebKitURIResponse
.Get the HTTP headers of aWebKitURIResponse
as aSoupMessageHeaders
.Gets the MIME type of the response.int
Get the status code of theWebKitURIResponse
.Get the suggested filename for this URIResponse.static Type
getType()
Get the GType of the URIResponse classgetUri()
Gets the URI which resulted in the response.Methods inherited from class org.gnome.gobject.GObject
addToggleRef, addWeakPointer, bindProperty, bindProperty, bindProperty, bindPropertyFull, bindPropertyFull, bindPropertyWithClosures, bindPropertyWithClosures, compatControl, connect, connect, connect, constructed, disconnect, dispatchPropertiesChanged, dispose, dupData, dupQdata, emit, emitNotify, finalize_, forceFloating, freezeNotify, get, getData, getMemoryLayout, getProperty, getProperty, getProperty, getQdata, getv, interfaceFindProperty, interfaceInstallProperty, interfaceListProperties, isFloating, newInstance, newInstance, newInstance, newInstance, newv, notify_, notify_, notifyByPspec, onNotify, ref, refSink, removeToggleRef, removeWeakPointer, replaceData, replaceQdata, runDispose, set, setData, setDataFull, setProperty, setProperty, setProperty, setQdata, setQdataFull, setv, stealData, stealQdata, takeRef, thawNotify, unref, watchClosure, weakRef, weakUnref, withProperties
Methods inherited from class org.gnome.gobject.TypeInstance
callParent, callParent, getPrivate, readGClass, writeGClass
Methods inherited from class io.github.jwharm.javagi.base.ProxyInstance
equals, handle, hashCode
-
Constructor Details
-
URIResponse
Create a URIResponse proxy instance for the provided memory address.- Parameters:
address
- the memory address of the native object
-
-
Method Details
-
getType
-
asParent
Returns this instance as if it were its parent type. This is mostly synonymous to the Javasuper
keyword, but will set the native typeclass function pointers to the parent type. When overriding a native virtual method in Java, "chaining up" withsuper.methodName()
doesn't work, because it invokes the overridden function pointer again. To chain up, callasParent().methodName()
. This will call the native function pointer of this virtual method in the typeclass of the parent type. -
getContentLength
public long getContentLength()Get the expected content length of theWebKitURIResponse
.It can be 0 if the server provided an incorrect or missing Content-Length.
- Returns:
- the expected content length of this URIResponse.
-
getHttpHeaders
Get the HTTP headers of aWebKitURIResponse
as aSoupMessageHeaders
.- Returns:
- a
SoupMessageHeaders
with the HTTP headers of this URIResponse ornull
if this URIResponse is not an HTTP response.
-
getMimeType
-
getStatusCode
public int getStatusCode()Get the status code of theWebKitURIResponse
.Get the status code of the
WebKitURIResponse
as returned by the server. It will normally be aSoupKnownStatusCode
, for exampleStatus.OK
, though the server can respond with any unsigned integer.- Returns:
- the status code of this URIResponse
-
getSuggestedFilename
Get the suggested filename for this URIResponse.Get the suggested filename for this URIResponse, as specified by the 'Content-Disposition' HTTP header, or
null
if it's not present.- Returns:
- the suggested filename or
null
if the 'Content-Disposition' HTTP header is not present.
-
getUri
Gets the URI which resulted in the response.- Returns:
- response URI, as a string.
-
builder
AURIResponse.Builder
object constructs aURIResponse
with the specified properties. Use the variousset...()
methods to set properties, and finish construction withURIResponse.Builder.build()
.
-