Package org.gnome.soup
Class ServerMessage.Builder<B extends ServerMessage.Builder<B>>
java.lang.Object
io.github.jwharm.javagi.gobject.Builder<B>
org.gnome.gobject.GObject.Builder<B>
org.gnome.soup.ServerMessage.Builder<B>
- Type Parameters:
B
- the type of the Builder that is returned
- All Implemented Interfaces:
BuilderInterface
- Enclosing class:
ServerMessage
public static class ServerMessage.Builder<B extends ServerMessage.Builder<B>>
extends GObject.Builder<B>
Inner class implementing a builder pattern to construct a GObject with
properties.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Finish building theServerMessage
object.Emitted during themsg
's connection TLS handshake after client TLS certificate has been received.Emitted when themsg
's socket is connected and the TLS handshake completed.Emitted when themsg
's socket is disconnected.onFinished
(ServerMessage.FinishedCallback handler) Emitted when all HTTP processing is finished for a message.onGotBody
(ServerMessage.GotBodyCallback handler) Emitted after receiving the complete request body.onGotChunk
(ServerMessage.GotChunkCallback handler) Emitted after receiving a chunk of a message body.Emitted after receiving the Request-Line and request headers.Emitted immediately after writing the complete response body for a message.Emitted immediately after writing a portion of the message body to the network.Emitted immediately after writing a body chunk for a message.Emitted immediately after writing the response headers for a message.Emitted immediately after writing a 1xx (Informational) response.Methods inherited from class org.gnome.gobject.GObject.Builder
onNotify
Methods inherited from class io.github.jwharm.javagi.gobject.Builder
addBuilderProperty, connect, connect, connectSignals, getArena, getNames, getValues
-
Constructor Details
-
Builder
protected Builder()Default constructor for aBuilder
object.
-
-
Method Details
-
build
Finish building theServerMessage
object. This will callGObject.withProperties(org.gnome.glib.Type, java.lang.String[], org.gnome.gobject.Value[])
to create a new GObject instance, which is then cast toServerMessage
.- Overrides:
build
in classGObject.Builder<B extends ServerMessage.Builder<B>>
- Returns:
- a new instance of
ServerMessage
with the properties that were set in the Builder object. - Throws:
UnsupportedPlatformException
- when run on an unsupported platform
-
onAcceptCertificate
Emitted during themsg
's connection TLS handshake after client TLS certificate has been received. You can returntrue
to accepttlsCertificate
despitetlsErrors
.- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-
onConnected
Emitted when themsg
's socket is connected and the TLS handshake completed.- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-
onDisconnected
Emitted when themsg
's socket is disconnected.- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-
onFinished
Emitted when all HTTP processing is finished for a message. (AfterServerMessage::wrote-body
).- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-
onGotBody
Emitted after receiving the complete request body.- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-
onGotChunk
Emitted after receiving a chunk of a message body.Note that "chunk" in this context means any subpiece of the body, not necessarily the specific HTTP 1.1 chunks sent by the other side.
- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-
onGotHeaders
Emitted after receiving the Request-Line and request headers.- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-
onWroteBody
Emitted immediately after writing the complete response body for a message.- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-
onWroteBodyData
Emitted immediately after writing a portion of the message body to the network.- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-
onWroteChunk
Emitted immediately after writing a body chunk for a message.Note that this signal is not parallel to
ServerMessage::got-chunk
; it is emitted only when a complete chunk (added withMessageBody.append(byte[])
orMessageBody.appendBytes(org.gnome.glib.Bytes)
has been written. To get more useful continuous progress information, useServerMessage::wrote-body-data
.- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-
onWroteHeaders
Emitted immediately after writing the response headers for a message.- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-
onWroteInformational
Emitted immediately after writing a 1xx (Informational) response.- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-