org.freedesktop.dbus
public class DirectConnection extends AbstractConnection
Signal Handlers and method calls from remote objects are run in their own threads, you MUST handle the concurrency issues.
Constructor Summary | |
---|---|
DirectConnection(String address)
Create a direct connection to another application. |
Method Summary | |
---|---|
protected <T extends DBusSignal> void | addSigHandler(DBusMatchRule rule, DBusSigHandler<T> handler) |
static String | createDynamicSession()
Creates a bus address for a randomly generated abstract unix socket. |
static String | createDynamicTCPSession()
Creates a bus address for a randomly generated tcp port. |
DBusInterface | getRemoteObject(String objectpath)
Return a reference to a remote object.
|
DBusInterface | getRemoteObject(String objectpath, Class<? extends DBusInterface> type)
Return a reference to a remote object.
|
protected <T extends DBusSignal> void | removeSigHandler(DBusMatchRule rule, DBusSigHandler<T> handler) |
Parameters: address The address to connect to. This is a standard D-Bus address, except that the additional parameter 'listen=true' should be added in the application which is creating the socket.
Returns: a random bus address.
Returns: a random bus address.
Parameters: objectpath The path on which the process is exporting the object.
Returns: A reference to a remote object.
Throws: ClassCastException If type is not a sub-type of DBusInterface DBusException If busname or objectpath are incorrectly formatted.
Parameters: objectpath The path on which the process is exporting the object. type The interface they are exporting it on. This type must have the same full class name and exposed method signatures as the interface the remote object is exporting.
Returns: A reference to a remote object.
Throws: ClassCastException If type is not a sub-type of DBusInterface DBusException If busname or objectpath are incorrectly formatted or type is not in a package.