Class URISchemeRequest
java.lang.Object
org.javagi.base.ProxyInstance
org.gnome.gobject.TypeInstance
org.gnome.gobject.GObject
org.webkitgtk.URISchemeRequest
- All Implemented Interfaces:
Proxy
Represents a URI scheme request.
If you register a particular URI scheme in a WebKitWebContext,
using webkit_web_context_register_uri_scheme(), you have to provide
a WebKitURISchemeRequestCallback. After that, when a URI request
is made with that particular scheme, your callback will be
called. There you will be able to access properties such as the
scheme, the URI and path, and the WebKitWebView that initiated the
request, and also finish the request with
webkit_uri_scheme_request_finish().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classURISchemeRequest.Builder<B extends URISchemeRequest.Builder<B>>Inner class implementing a builder pattern to construct a GObject with properties.static classNested classes/interfaces inherited from class GObject
GObject.NotifyCallback, GObject.ObjectClass -
Constructor Summary
ConstructorsConstructorDescriptionCreate a new URISchemeRequest.URISchemeRequest(MemorySegment address) Create a URISchemeRequest instance for the provided memory address. -
Method Summary
Modifier and TypeMethodDescriptionprotected URISchemeRequestasParent()Return this instance as if it were its parent type.static URISchemeRequest.Builder<? extends URISchemeRequest.Builder> builder()AURISchemeRequest.Builderobject constructs aURISchemeRequestwith the specified properties.voidfinish(InputStream stream, long streamLength, @Nullable String contentType) Finish aWebKitURISchemeRequestby setting the contents of the request and its mime type.voidfinishError(GError error) Finish aWebKitURISchemeRequestwith aGError.voidfinishWithResponse(URISchemeResponse response) Finish aWebKitURISchemeRequestby returning aWebKitURISchemeResponseGet the request body.Get theSoupMessageHeadersof the request.Get the HTTP method of therequest.static MemoryLayoutThe memory layout of the native struct.getPath()Get the URI path ofrequest.Get the URI scheme ofrequest.static @Nullable TypegetType()Get the GType of the URISchemeRequest class.getUri()Get the URI ofrequest.Get theWebKitWebViewthat initiated the request.Methods inherited from class 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, getProperty, getProperty, getProperty, getQdata, getv, interfaceFindProperty, interfaceInstallProperty, interfaceListProperties, isFloating, 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, withPropertiesMethods inherited from class TypeInstance
callParent, callParent, cast, getPrivate, readGClass, writeGClassMethods inherited from class ProxyInstance
equals, handle, hashCode
-
Constructor Details
-
URISchemeRequest
Create a URISchemeRequest instance for the provided memory address.- Parameters:
address- the memory address of the native object
-
URISchemeRequest
public URISchemeRequest()Create a new URISchemeRequest.
-
-
Method Details
-
getType
Get the GType of the URISchemeRequest class.- Returns:
- the GType
-
getMemoryLayout
The memory layout of the native struct.- Returns:
- the memory layout
-
asParent
Return this instance as if it were its parent type. Comparable to the Javasuperkeyword, but ensures the parent typeclass is also used in native code. -
finish
Finish aWebKitURISchemeRequestby setting the contents of the request and its mime type.- Parameters:
stream- aGInputStreamto read the contents of the requeststreamLength- the length of the stream or -1 if not knowncontentType- the content type of the stream ornullif not known
-
finishError
Finish aWebKitURISchemeRequestwith aGError.- Parameters:
error- aGErrorthat will be passed to theWebKitWebView- Since:
- 2.2
-
finishWithResponse
Finish aWebKitURISchemeRequestby returning aWebKitURISchemeResponse- Parameters:
response- aWebKitURISchemeResponse- Since:
- 2.36
-
getHttpBody
Get the request body.- Returns:
- (nullable): the body of the
request. - Since:
- 2.40
-
getHttpHeaders
Get theSoupMessageHeadersof the request.- Returns:
- the
SoupMessageHeadersof therequest. - Since:
- 2.36
-
getHttpMethod
Get the HTTP method of therequest.- Returns:
- the HTTP method of the this URISchemeRequest
- Since:
- 2.36
-
getPath
-
getScheme
Get the URI scheme ofrequest.- Returns:
- the URI scheme of this URISchemeRequest
-
getUri
-
getWebView
Get theWebKitWebViewthat initiated the request.- Returns:
- the
WebKitWebViewthat initiatedrequest.
-
builder
AURISchemeRequest.Builderobject constructs aURISchemeRequestwith the specified properties. Use the variousset...()methods to set properties, and finish construction withURISchemeRequest.Builder.build().- Returns:
- the builder object
-