Package ch.bailu.gtk.gio
Class NetworkService
java.lang.Object
ch.bailu.gtk.type.Type
ch.bailu.gtk.type.Pointer
ch.bailu.gtk.gobject.Object
ch.bailu.gtk.gio.NetworkService
- All Implemented Interfaces:
PointerInterface
Like #GNetworkAddress does with hostnames, #GNetworkService
provides an easy way to resolve a SRV record, and then attempt to
connect to one of the hosts that implements that service, handling
service priority/weighting, multiple IP addresses, and multiple
address families.
See #GSrvTarget for more information about SRV records, and see
#GSocketConnectable for an example of using the connectable
interface.
provides an easy way to resolve a SRV record, and then attempt to
connect to one of the hosts that implements that service, handling
service priority/weighting, multiple IP addresses, and multiple
address families.
See #GSrvTarget for more information about SRV records, and see
#GSocketConnectable for an example of using the connectable
interface.
-
Nested Class Summary
Nested classes/interfaces inherited from class ch.bailu.gtk.gobject.Object
Object.OnBindingTransformFunc, Object.OnDestroyNotify, Object.OnDuplicateFunc, Object.OnNotify, Object.OnToggleNotify, Object.OnWeakNotify
-
Field Summary
Fields inherited from class ch.bailu.gtk.gobject.Object
SIGNAL_ON_NOTIFY
-
Constructor Summary
ConstructorDescriptionNetworkService
(PointerContainer pointer) NetworkService
(Str service, Str protocol, Str domain) Creates a new #GNetworkService representing the given @service,
@protocol, and @domain.NetworkService
(String service, String protocol, String domain) Creates a new #GNetworkService representing the given @service,
@protocol, and @domain. -
Method Summary
Modifier and TypeMethodDescriptionImplements interfaceSocketConnectable
.static ClassHandler
Gets the domain that @srv serves.static int
static long
static TypeSystem.TypeSize
Gets @srv's protocol name (eg, "tcp").Gets the URI scheme used to resolve proxies.Gets @srv's service name (eg, "ldap").static long
static TypeSystem.TypeSize
void
Set's the URI scheme used to resolve proxies.void
Set's the URI scheme used to resolve proxies.Methods inherited from class ch.bailu.gtk.gobject.Object
addToggleRef, bindProperty, bindProperty, bindPropertyFull, bindPropertyFull, bindPropertyWithClosures, bindPropertyWithClosures, compatControl, connect, connect, disconnect, disconnect, dupData, dupData, dupQdata, forceFloating, freezeNotify, get, get, getData, getData, getProperty, getProperty, getQdata, interfaceFindProperty, interfaceInstallProperty, isFloating, notify, notify, notifyByPspec, onNotify, ref, refSink, removeToggleRef, replaceData, replaceData, replaceQdata, runDispose, set, set, setData, setData, setDataFull, setDataFull, setProperty, setProperty, setQdata, setQdataFull, stealData, stealData, stealQdata, takeRef, thawNotify, unref, watchClosure, weakRef, weakUnref
Methods inherited from class ch.bailu.gtk.type.Pointer
asCPointer, cast, connectSignal, disconnectSignals, disconnectSignals, equals, hashCode, throwIfNull, throwNullPointerException, toString, unregisterCallbacks, unregisterCallbacks
Methods inherited from class ch.bailu.gtk.type.Type
asCPointer, asCPointer, asCPointerNotNull, asJnaPointer, asJnaPointer, asPointer, asPointer, cast, cast, throwIfNull
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface ch.bailu.gtk.type.PointerInterface
asCPointerNotNull, asJnaPointer, asPointer, isNotNull, isNull
-
Constructor Details
-
NetworkService
-
NetworkService
Creates a new #GNetworkService representing the given @service,
@protocol, and @domain. This will initially be unresolved; use the
#GSocketConnectable interface to resolve it.- Parameters:
service
- the service type to look up (eg, "ldap")protocol
- the networking protocol to use for @service (eg, "tcp")domain
- the DNS domain to look up the service in
-
NetworkService
Creates a new #GNetworkService representing the given @service,
@protocol, and @domain. This will initially be unresolved; use the
#GSocketConnectable interface to resolve it.- Parameters:
service
- the service type to look up (eg, "ldap")protocol
- the networking protocol to use for @service (eg, "tcp")domain
- the DNS domain to look up the service in
-
-
Method Details
-
getClassHandler
-
getDomain
Gets the domain that @srv serves. This might be either UTF-8 or
ASCII-encoded, depending on what @srv was created with.- Returns:
- @srv's domain name
-
getProtocol
Gets @srv's protocol name (eg, "tcp").- Returns:
- @srv's protocol name
-
getScheme
Gets the URI scheme used to resolve proxies. By default, the service name
is used as scheme.- Returns:
- @srv's scheme name
-
getService
Gets @srv's service name (eg, "ldap").- Returns:
- @srv's service name
-
setScheme
Set's the URI scheme used to resolve proxies. By default, the service name
is used as scheme.- Parameters:
scheme
- a URI scheme
-
setScheme
Set's the URI scheme used to resolve proxies. By default, the service name
is used as scheme.- Parameters:
scheme
- a URI scheme
-
asSocketConnectable
Implements interfaceSocketConnectable
. Call this to get access to interface functions.- Returns:
SocketConnectable
-
getTypeID
public static long getTypeID() -
getParentTypeID
public static long getParentTypeID() -
getTypeSize
-
getParentTypeSize
-
getInstanceSize
public static int getInstanceSize()
-