Top Inners Fields Methods
org.freedesktop.dbus.interfaces

public Interface DBus

extends DBusInterface
Known Direct Implementers
org.freedesktop.dbus.bin.DBusDaemon.DBusServer
Annotations
@SuppressWarnings:checkstyle:methodname
@DBusInterfaceName:org.freedesktop.DBus
Imports
org.freedesktop.dbus.annotations.DBusInterfaceName, org.freedesktop.dbus.errors.MatchRuleInvalid, org.freedesktop.dbus.exceptions.DBusException, org.freedesktop.dbus.messages.DBusSignal, org.freedesktop.dbus.types.UInt32, .Variant, java.util.Map

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
DBus.NameAcquired

Signal sent to a connection when it acquires a name.

public static class
DBus.NameLost

Signal sent to a connection when it loses a name.

public static class
DBus.NameOwnerChanged

Signal sent when the owner of a name changes

Field Summary

Modifier and TypeField and Description
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int

Method Summary

Modifier and TypeMethod and Description
public void
AddMatch(String
The Match rule as a string. Format Undocumented.
_matchrule
)

Add a match rule.

public Byte[]

Returns:

auditing data as returned by adt_export_session_data()
GetAdtAuditSessionData
(String
Unique or well-known bus name of the connection to query, such as :12.34 or com.example.tea
_busName
)

DBUS Specification: Returns auditing data used by Solaris ADT, in an unspecified binary format.

public Map<String, Variant<?>>

Returns:

Credentials
GetConnectionCredentials
(String
Unique or well-known bus name of the connection to query, such as :12.34 or com.example.tea
_busName
)

DBUS Specification: Returns as many credentials as possible for the process connected to the server.

public Byte[]

Returns:

some sort of string of bytes, not necessarily UTF-8, not including '\0'
GetConnectionSELinuxSecurityContext
(String
Unique or well-known bus name of the connection to query, such as :12.34 or com.example.tea
_busName
)

DBUS Specification: Returns the security context used by SELinux, in an unspecified format.

public UInt32

Returns:

The PID of the connection.
GetConnectionUnixProcessID
(String
The name of the connection
_connectionName
)

Returns the proccess ID associated with a connection.

public UInt32

Returns:

The Unix UID that it.
GetConnectionUnixUser
(String
The connection name.
_connectionName
)

Get the Unix UID that owns a connection name.

public String

Returns:

id Unique ID identifying the bus daemon
GetId
()

DBUS Specification: Gets the unique ID of the bus.

public String

Returns:

The connection which owns the name.
GetNameOwner
(String
The name to query.
_name
)

Get the connection unique name that owns the given name.

public String

Returns:

The unique name of this connection to the Bus.
Hello
()

Initial message to register ourselves on the Bus.

public String[]

Returns:

Array of strings where each string is a bus name
ListActivatableNames
()

Returns a list of all names that can be activated on the bus.

public String[]

Returns:

An array of all connected names.
ListNames
()

Lists all connected names on the Bus.

public String[]

Returns:

A list of unique connection IDs.
ListQueuedOwners
(String
The name to query
_name
)

List the connections currently queued for a name.

public boolean

Returns:

true if the name has an owner.
NameHasOwner
(String
The name to query.
_name
)

Determine if a name has an owner.

public UInt32

Returns:

DBUS_RELEASE_NAME_REPLY constants.
ReleaseName
(String
The name to release.
_name
)

Release a name on the bus.

public void
RemoveMatch(String
The Match rule as a string. Format Undocumented.
_matchrule
)

Remove a match rule.

public UInt32

Returns:

DBUS_REQUEST_NAME_REPLY constants.
RequestName
(String
The name to request.
_name
,
UInt32
DBUS_NAME flags.
_flags
)

Request a name on the bus.

public UInt32

Returns:

DBUS_START_REPLY constants.
StartServiceByName
(String
The service name to start.
_name
,
UInt32
Unused.
_flags
)

Start a service.

public void
UpdateActivationEnvironment(Map<String, String>[]
Environment to add or update
_environment
)

DBUS Specification: Normally, session bus activated services inherit the environment of the bus daemon.

Inherited from org.freedesktop.dbus.interfaces.DBusInterface:
getObjectPathisRemote

Field Detail

DBUS_NAME_FLAG_ALLOW_REPLACEMENTback to summary
public static final int DBUS_NAME_FLAG_ALLOW_REPLACEMENT
DBUS_NAME_FLAG_DO_NOT_QUEUEback to summary
public static final int DBUS_NAME_FLAG_DO_NOT_QUEUE
DBUS_NAME_FLAG_REPLACE_EXISTINGback to summary
public static final int DBUS_NAME_FLAG_REPLACE_EXISTING
DBUS_RELEASE_NAME_REPLY_NON_EXISTANTback to summary
public static final int DBUS_RELEASE_NAME_REPLY_NON_EXISTANT
DBUS_RELEASE_NAME_REPLY_NOT_OWNERback to summary
public static final int DBUS_RELEASE_NAME_REPLY_NOT_OWNER
DBUS_RELEASE_NAME_REPLY_RELEASEDback to summary
public static final int DBUS_RELEASE_NAME_REPLY_RELEASED
DBUS_REQUEST_NAME_REPLY_ALREADY_OWNERback to summary
public static final int DBUS_REQUEST_NAME_REPLY_ALREADY_OWNER
DBUS_REQUEST_NAME_REPLY_EXISTSback to summary
public static final int DBUS_REQUEST_NAME_REPLY_EXISTS
DBUS_REQUEST_NAME_REPLY_IN_QUEUEback to summary
public static final int DBUS_REQUEST_NAME_REPLY_IN_QUEUE
DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNERback to summary
public static final int DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER
DBUS_START_REPLY_ALREADY_RUNNINGback to summary
public static final int DBUS_START_REPLY_ALREADY_RUNNING
DBUS_START_REPLY_SUCCESSback to summary
public static final int DBUS_START_REPLY_SUCCESS

Method Detail

AddMatchback to summary
public void AddMatch(String _matchrule) throws MatchRuleInvalid

Add a match rule. Will cause you to receive messages that aren't directed to you which match this rule.

Parameters
_matchrule:String

The Match rule as a string. Format Undocumented.

GetAdtAuditSessionDataback to summary
public Byte[] GetAdtAuditSessionData(String _busName)

DBUS Specification:
Returns auditing data used by Solaris ADT, in an unspecified
binary format. If you know what this means, please contribute
documentation via the D-Bus bug tracking system.
This method is on the core DBus interface for historical reasons;
the same information should be made available via
the section called "org.freedesktop.DBus.GetConnectionCredentials"
in future.

Parameters
_busName:String

Unique or well-known bus name of the connection to query, such as :12.34 or com.example.tea

Returns:Byte[]

auditing data as returned by adt_export_session_data()

GetConnectionCredentialsback to summary
public Map<String, Variant<?>> GetConnectionCredentials(String _busName)

DBUS Specification:
Returns as many credentials as possible for the process connected to the server. If unable to determine certain credentials (for instance, because the process is not on the same machine as the bus daemon, or because this version of the bus daemon does not support a particular security framework), or if the values of those credentials cannot be represented as documented here, then those credentials are omitted.

Keys in the returned dictionary not containing "." are defined by this specification. Bus daemon implementors supporting credentials frameworks not mentioned in this document should either contribute patches to this specification, or use keys containing "." and starting with a reversed domain name.

Parameters
_busName:String

Unique or well-known bus name of the connection to query, such as :12.34 or com.example.tea

Returns:Map<String, Variant<?>>

Credentials

GetConnectionSELinuxSecurityContextback to summary
public Byte[] GetConnectionSELinuxSecurityContext(String _busName)

DBUS Specification:
Returns the security context used by SELinux, in an unspecified
format. If you know what this means, please contribute
documentation via the D-Bus bug tracking system.
This method is on the core DBus interface for historical reasons;
the same information should be made available via
the section called "org.freedesktop.DBus.GetConnectionCredentials”
in future.

Parameters
_busName:String

Unique or well-known bus name of the connection to query, such as :12.34 or com.example.tea

Returns:Byte[]

some sort of string of bytes, not necessarily UTF-8, not including '\0'

GetConnectionUnixProcessIDback to summary
public UInt32 GetConnectionUnixProcessID(String _connectionName)

Returns the proccess ID associated with a connection.

Parameters
_connectionName:String

The name of the connection

Returns:UInt32

The PID of the connection.

GetConnectionUnixUserback to summary
public UInt32 GetConnectionUnixUser(String _connectionName)

Get the Unix UID that owns a connection name.

Parameters
_connectionName:String

The connection name.

Returns:UInt32

The Unix UID that it.

GetIdback to summary
public String GetId()

DBUS Specification:
Gets the unique ID of the bus. The unique ID here is shared among all addresses the
bus daemon is listening on (TCP, UNIX domain socket, etc.) and its format is described in
the section called "UUIDs”.
Each address the bus is listening on also has its own unique
ID, as described in the section called "Server Addresses”. The per-bus and per-address IDs are not related.
There is also a per-machine ID, described in the section called "org.freedesktop.DBus.Peer” and returned by org.freedesktop.DBus.Peer.GetMachineId().
For a desktop session bus, the bus ID can be used as a way to uniquely identify a user's session.

Returns:String

id Unique ID identifying the bus daemon

GetNameOwnerback to summary
public String GetNameOwner(String _name)

Get the connection unique name that owns the given name.

Parameters
_name:String

The name to query.

Returns:String

The connection which owns the name.

Helloback to summary
public String Hello()

Initial message to register ourselves on the Bus.

Returns:String

The unique name of this connection to the Bus.

ListActivatableNamesback to summary
public String[] ListActivatableNames()

Returns a list of all names that can be activated on the bus.

Returns:String[]

Array of strings where each string is a bus name

ListNamesback to summary
public String[] ListNames()

Lists all connected names on the Bus.

Returns:String[]

An array of all connected names.

ListQueuedOwnersback to summary
public String[] ListQueuedOwners(String _name)

List the connections currently queued for a name.

Parameters
_name:String

The name to query

Returns:String[]

A list of unique connection IDs.

NameHasOwnerback to summary
public boolean NameHasOwner(String _name)

Determine if a name has an owner.

Parameters
_name:String

The name to query.

Returns:boolean

true if the name has an owner.

ReleaseNameback to summary
public UInt32 ReleaseName(String _name)

Release a name on the bus.

Parameters
_name:String

The name to release.

Returns:UInt32

DBUS_RELEASE_NAME_REPLY constants.

RemoveMatchback to summary
public void RemoveMatch(String _matchrule) throws MatchRuleInvalid

Remove a match rule. Will cause you to stop receiving messages that aren't directed to you which match this rule.

Parameters
_matchrule:String

The Match rule as a string. Format Undocumented.

RequestNameback to summary
public UInt32 RequestName(String _name, UInt32 _flags)

Request a name on the bus.

Parameters
_name:String

The name to request.

_flags:UInt32

DBUS_NAME flags.

Returns:UInt32

DBUS_REQUEST_NAME_REPLY constants.

StartServiceByNameback to summary
public UInt32 StartServiceByName(String _name, UInt32 _flags)

Start a service. If the given service is not provided by any application, it will be started according to the .service file for that service.

Parameters
_name:String

The service name to start.

_flags:UInt32

Unused.

Returns:UInt32

DBUS_START_REPLY constants.

UpdateActivationEnvironmentback to summary
public void UpdateActivationEnvironment(Map<String, String>[] _environment)

DBUS Specification:
Normally, session bus activated services inherit the environment of the bus daemon. This method adds to or modifies that environment when activating services. Some bus instances, such as the standard system bus, may disable access to this method for some or all callers. Note, both the environment variable names and values must be valid UTF-8. There's no way to update the activation environment with data that is invalid UTF-8.

Parameters
_environment:Map<String, String>[]

Environment to add or update

org.freedesktop.dbus.interfaces back to summary

public Class DBus.NameAcquired

extends DBusSignal
Class Inheritance
Annotations
@SuppressWarnings:checkstyle:visibilitymodifier

Signal sent to a connection when it acquires a name.

Field Summary

Modifier and TypeField and Description
public final String

Constructor Summary

AccessConstructor and Description
public
NameAcquired(String _path, String _name)

Method Summary

Modifier and TypeMethod and Description
public String
toString()

Overrides org.freedesktop.dbus.messages.Message.toString.

Formats the message in a human-readable format.

Inherited from org.freedesktop.dbus.messages.DBusSignal:
appendbodycreateReal

Field Detail

nameback to summary
public final String name

Constructor Detail

NameAcquiredback to summary
public NameAcquired(String _path, String _name) throws DBusException

Method Detail

toStringback to summary
public String toString()

Overrides org.freedesktop.dbus.messages.Message.toString.

Doc from org.freedesktop.dbus.messages.Message.toString.

Formats the message in a human-readable format.

Returns:String

Doc from java.lang.Object.toString.

a string representation of the object

Annotations
@Override
org.freedesktop.dbus.interfaces back to summary

public Class DBus.NameLost

extends DBusSignal
Class Inheritance
Annotations
@SuppressWarnings:checkstyle:visibilitymodifier

Signal sent to a connection when it loses a name.

Field Summary

Modifier and TypeField and Description
public final String

Constructor Summary

AccessConstructor and Description
public
NameLost(String _path, String _name)

Method Summary

Modifier and TypeMethod and Description
public String
toString()

Overrides org.freedesktop.dbus.messages.Message.toString.

Formats the message in a human-readable format.

Inherited from org.freedesktop.dbus.messages.DBusSignal:
appendbodycreateReal

Field Detail

nameback to summary
public final String name

Constructor Detail

NameLostback to summary
public NameLost(String _path, String _name) throws DBusException

Method Detail

toStringback to summary
public String toString()

Overrides org.freedesktop.dbus.messages.Message.toString.

Doc from org.freedesktop.dbus.messages.Message.toString.

Formats the message in a human-readable format.

Returns:String

Doc from java.lang.Object.toString.

a string representation of the object

Annotations
@Override
org.freedesktop.dbus.interfaces back to summary

public Class DBus.NameOwnerChanged

extends DBusSignal
Class Inheritance
Annotations
@SuppressWarnings:checkstyle:visibilitymodifier

Signal sent when the owner of a name changes

Field Summary

Modifier and TypeField and Description
public final String
public final String
public final String

Constructor Summary

AccessConstructor and Description
public
NameOwnerChanged(String _path, String _name, String _oldOwner, String _newOwner)

Method Summary

Modifier and TypeMethod and Description
public String
toString()

Overrides org.freedesktop.dbus.messages.Message.toString.

Formats the message in a human-readable format.

Inherited from org.freedesktop.dbus.messages.DBusSignal:
appendbodycreateReal

Field Detail

nameback to summary
public final String name
newOwnerback to summary
public final String newOwner
oldOwnerback to summary
public final String oldOwner

Constructor Detail

NameOwnerChangedback to summary
public NameOwnerChanged(String _path, String _name, String _oldOwner, String _newOwner) throws DBusException

Method Detail

toStringback to summary
public String toString()

Overrides org.freedesktop.dbus.messages.Message.toString.

Doc from org.freedesktop.dbus.messages.Message.toString.

Formats the message in a human-readable format.

Returns:String

Doc from java.lang.Object.toString.

a string representation of the object

Annotations
@Override