Package org.webkitgtk
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 org.gnome.gobject.GObject
GObject.NotifyCallback, GObject.ObjectClass -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new URISchemeRequest.URISchemeRequest(MemorySegment address) Create a URISchemeRequest proxy instance for the provided memory address. -
Method Summary
Modifier and TypeMethodDescriptionprotected URISchemeRequestasParent()Returns 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.getPath()Get the URI path ofrequest.Get the URI scheme ofrequest.static @Nullable TypegetType()Get the GType of the URISchemeRequest classgetUri()Get the URI ofrequest.Get theWebKitWebViewthat initiated the request.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, 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 org.gnome.gobject.TypeInstance
callParent, callParent, cast, getPrivate, readGClass, writeGClassMethods inherited from class org.javagi.base.ProxyInstance
equals, handle, hashCode
-
Constructor Details
-
URISchemeRequest
Create a URISchemeRequest proxy instance for the provided memory address.- Parameters:
address- the memory address of the native object
-
URISchemeRequest
public URISchemeRequest()Creates a new URISchemeRequest.
-
-
Method Details
-
getType
Get the GType of the URISchemeRequest class- Returns:
- the GType
-
asParent
Returns this instance as if it were its parent type. This is mostly synonymous to the Javasuperkeyword, 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. -
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
-