Interface IRemoteObjectGetter
- All Known Implementing Classes:
DBusConnection
Interface which contains all methods to retrieve any object from DBus.
- Since:
- 5.1.1 - 2024-11-16
-
Method Summary
Modifier and TypeMethodDescriptiongetDBusOwnerName(String _busName) Returns name of the current owning dbus session.getPeerRemoteObject(String _busname, String _objectpath) Return a reference to a remote object.default <I extends DBusInterface>
IgetPeerRemoteObject(String _busname, String _objectpath, Class<I> _type) default <I extends DBusInterface>
IgetPeerRemoteObject(String _busname, String _objectpath, Class<I> _type, boolean _autostart) Return a reference to a remote object.default <I extends DBusInterface>
IgetPeerRemoteObject(String _busname, DBusPath _objectpath, Class<I> _type) default <I extends DBusInterface>
IgetPeerRemoteObject(String _busname, DBusPath _objectpath, Class<I> _type, boolean _autostart) getRemoteObject(String _busname, String _objectpath) Return a reference to a remote object.default <I extends DBusInterface>
IgetRemoteObject(String _busname, String _objectpath, Class<I> _type) Return a reference to a remote object.<I extends DBusInterface>
IgetRemoteObject(String _busname, String _objectpath, Class<I> _type, boolean _autostart) Return a reference to a remote object.default DBusInterfacegetRemoteObject(String _busname, DBusPath _objectpath) default <I extends DBusInterface>
IgetRemoteObject(String _busname, DBusPath _objectpath, Class<I> _type) default <I extends DBusInterface>
IgetRemoteObject(String _busname, DBusPath _objectpath, Class<I> _type, boolean _autostart)
-
Method Details
-
getPeerRemoteObject
default <I extends DBusInterface> I getPeerRemoteObject(String _busname, String _objectpath, Class<I> _type) throws DBusException - Throws:
DBusException
-
getPeerRemoteObject
default <I extends DBusInterface> I getPeerRemoteObject(String _busname, DBusPath _objectpath, Class<I> _type) throws DBusException - Throws:
DBusException
-
getPeerRemoteObject
DBusInterface getPeerRemoteObject(String _busname, String _objectpath) throws InvalidBusNameException, DBusException Return a reference to a remote object. This method will resolve the well known name (if given) to a unique bus name when you call it. This means that if a well known name is released by one process and acquired by another calls to objects gained from this method will continue to operate on the original process. This method will use bus introspection to determine the interfaces on a remote object and so may block and may fail. The resulting proxy object will, however, be castable to any interface it implements. It will also autostart the process if applicable. Also note that the resulting proxy may fail to execute the correct method with overloaded methods and that complex types may fail in interesting ways. Basically, if something odd happens, try specifying the interface explicitly.- Parameters:
_busname- The bus name to connect to. Usually a well known bus name in dot-notation (such as "org.freedesktop.local") or may be a DBus address such as ":1-16"._objectpath- The path on which the process is exporting the object.$- Returns:
- A reference to a remote object.
- Throws:
MissingInterfaceImplementationException- If type is not a sub-type of DBusInterfaceInvalidObjectPathException- When object path is invalidClassOutsideOfPackageException- When given type class has not packageDBusException- on any other errorsInvalidBusNameException
-
getRemoteObject
DBusInterface getRemoteObject(String _busname, String _objectpath) throws DBusException, InvalidBusNameException, InvalidObjectPathException Return a reference to a remote object. This method will always refer to the well known name (if given) rather than resolving it to a unique bus name. In particular this means that if a process providing the well known name disappears and is taken over by another process proxy objects gained by this method will make calls on the new proccess. This method will use bus introspection to determine the interfaces on a remote object and so may block and may fail. The resulting proxy object will, however, be castable to any interface it implements. It will also autostart the process if applicable. Also note that the resulting proxy may fail to execute the correct method with overloaded methods and that complex types may fail in interesting ways. Basically, if something odd happens, try specifying the interface explicitly.- Parameters:
_busname- The bus name to connect to. Usually a well known bus name name in dot-notation (such as "org.freedesktop.local") or may be a DBus address such as ":1-16"._objectpath- The path on which the process is exporting the object.- Returns:
- A reference to a remote object.
- Throws:
MissingInterfaceImplementationException- If type is not a sub-type of DBusInterfaceDBusException- If remote object cannot be retrievedInvalidBusNameException- If busname is incorrectly formattedInvalidObjectPathException- If objectpath is incorrectly formatted
-
getRemoteObject
default DBusInterface getRemoteObject(String _busname, DBusPath _objectpath) throws DBusException, InvalidBusNameException, InvalidObjectPathException - Throws:
DBusExceptionInvalidBusNameExceptionInvalidObjectPathException- See Also:
-
getPeerRemoteObject
default <I extends DBusInterface> I getPeerRemoteObject(String _busname, String _objectpath, Class<I> _type, boolean _autostart) throws DBusException Return a reference to a remote object. This method will resolve the well known name (if given) to a unique bus name when you call it. This means that if a well known name is released by one process and acquired by another calls to objects gained from this method will continue to operate on the original process.- Type Parameters:
I- class extendingDBusInterface- Parameters:
_busname- The bus name to connect to. Usually a well known bus name in dot-notation (such as "org.freedesktop.local") or may be a DBus address such as ":1-16"._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._autostart- Disable/Enable auto-starting of services in response to calls on this object. Default is enabled; when calling a method with auto-start enabled, if the destination is a well-known name and is not owned the bus will attempt to start a process to take the name. When disabled an error is returned immediately.- Returns:
- A reference to a remote object.
- Throws:
MissingInterfaceImplementationException- If type is not a sub-type of DBusInterfaceInvalidObjectPathException- When object path is invalidClassOutsideOfPackageException- When given type class has not packageDBusException- on any other errors
-
getPeerRemoteObject
default <I extends DBusInterface> I getPeerRemoteObject(String _busname, DBusPath _objectpath, Class<I> _type, boolean _autostart) throws DBusException - Throws:
DBusException- See Also:
-
getRemoteObject
default <I extends DBusInterface> I getRemoteObject(String _busname, String _objectpath, Class<I> _type) throws DBusException Return a reference to a remote object. This method will always refer to the well known name (if given) rather than resolving it to a unique bus name. In particular this means that if a process providing the well known name disappears and is taken over by another process proxy objects gained by this method will make calls on the new proccess.- Type Parameters:
I- class extendingDBusInterface- Parameters:
_busname- The bus name to connect to. Usually a well known bus name name in dot-notation (such as "org.freedesktop.local") or may be a DBus address such as ":1-16"._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:
MissingInterfaceImplementationException- If type is not a sub-type of DBusInterfaceInvalidObjectPathException- When object path is invalidClassOutsideOfPackageException- When given type class has not packageDBusException- on any other errors
-
getRemoteObject
default <I extends DBusInterface> I getRemoteObject(String _busname, DBusPath _objectpath, Class<I> _type) throws DBusException - Throws:
DBusException- See Also:
-
getRemoteObject
<I extends DBusInterface> I getRemoteObject(String _busname, String _objectpath, Class<I> _type, boolean _autostart) throws DBusException Return a reference to a remote object. This method will always refer to the well known name (if given) rather than resolving it to a unique bus name. In particular this means that if a process providing the well known name disappears and is taken over by another process proxy objects gained by this method will make calls on the new process.- Type Parameters:
I- class extendingDBusInterface- Parameters:
_busname- The bus name to connect to. Usually a well known bus name name in dot-notation (such as "org.freedesktop.local") or may be a DBus address such as ":1-16"._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._autostart- Disable/Enable auto-starting of services in response to calls on this object. Default is enabled; when calling a method with auto-start enabled, if the destination is a well-known name and is not owned the bus will attempt to start a process to take the name. When disabled an error is returned immediately.- Returns:
- A reference to a remote object.
- Throws:
MissingInterfaceImplementationException- If type is not a sub-type of DBusInterfaceInvalidObjectPathException- When object path is invalidClassOutsideOfPackageException- When given type class has not packageDBusException- on any other errors
-
getRemoteObject
default <I extends DBusInterface> I getRemoteObject(String _busname, DBusPath _objectpath, Class<I> _type, boolean _autostart) throws DBusException - Throws:
DBusException- See Also:
-
getDBusOwnerName
-