org.freedesktop.dbus.transport.jre.UnixBusAddress Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of dbus-java-transport-native-unixsocket Show documentation
Show all versions of dbus-java-transport-native-unixsocket Show documentation
dbus-java transport providing unixsocket support when using Java 16+.
package org.freedesktop.dbus.transport.jre;
import org.freedesktop.dbus.connections.BusAddress;
import org.freedesktop.dbus.connections.transports.IFileBasedBusAddress;
import org.freedesktop.dbus.utils.Util;
import java.nio.file.Path;
import java.nio.file.attribute.PosixFilePermission;
import java.util.Set;
public class UnixBusAddress extends BusAddress implements IFileBasedBusAddress {
public UnixBusAddress(BusAddress _obj) {
super(_obj);
}
public boolean hasPath() {
return hasParameter("path");
}
public String getPath() {
return getParameterValue("path");
}
@Override
public void updatePermissions(String _fileOwner, String _fileGroup, Set _fileUnixPermissions) {
Util.setFilePermissions(Path.of(getPath()), _fileOwner, _fileGroup, _fileUnixPermissions);
}
}