de.swiesend.secretservice.Session Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of secret-service Show documentation
Show all versions of secret-service Show documentation
A Java library for storing secrets in the gnome-keyring over the DBus.
Simply set and get passwords in a gnome linux system.
The newest version!
package de.swiesend.secretservice;
import org.freedesktop.dbus.DBusPath;
import de.swiesend.secretservice.handlers.Messaging;
public class Session extends Messaging implements de.swiesend.secretservice.interfaces.Session {
public Session(DBusPath path, Service service) {
super(service.getConnection(), null,
Static.Service.SECRETS, path.getPath(), Static.Interfaces.SESSION);
}
public Session(String session_id, Service service) {
super(service.getConnection(), null,
Static.Service.SECRETS, Static.ObjectPaths.session(session_id), Static.Interfaces.SESSION);
}
@Override
public void close() {
send("Close");
}
@Override
public boolean isRemote() {
return false;
}
@Override
public String getObjectPath() {
return super.getObjectPath();
}
}