X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Ffreenet%2Fwot%2FIdentityManager.java;h=6152c4bb40c4c00884289023d792c187d494e703;hb=e8b0e80a1fda90e908b26d4d138092239fab1ed5;hp=3c3c9f9221cc64e8e0c7276fe80cfb07a80a0df6;hpb=4970a2332d0295fa4e428e1f4ea54bd2d839e464;p=Sone.git diff --git a/src/main/java/net/pterodactylus/sone/freenet/wot/IdentityManager.java b/src/main/java/net/pterodactylus/sone/freenet/wot/IdentityManager.java index 3c3c9f9..6152c4b 100644 --- a/src/main/java/net/pterodactylus/sone/freenet/wot/IdentityManager.java +++ b/src/main/java/net/pterodactylus/sone/freenet/wot/IdentityManager.java @@ -59,21 +59,25 @@ public class IdentityManager extends AbstractService { private final WebOfTrustConnector webOfTrustConnector; /** The context to filter for. */ - private volatile String context; + private final String context; /** The currently known own identities. */ /* synchronize access on syncObject. */ - private Map currentOwnIdentities = new HashMap(); + private final Map currentOwnIdentities = new HashMap(); /** * Creates a new identity manager. * * @param webOfTrustConnector * The Web of Trust connector + * @param context + * The context to focus on (may be {@code null} to ignore + * contexts) */ - public IdentityManager(WebOfTrustConnector webOfTrustConnector) { + public IdentityManager(WebOfTrustConnector webOfTrustConnector, String context) { super("Sone Identity Manager", false); this.webOfTrustConnector = webOfTrustConnector; + this.context = context; } // @@ -105,16 +109,6 @@ public class IdentityManager extends AbstractService { // /** - * Sets the context to filter own identities and trusted identities for. - * - * @param context - * The context to filter for, or {@code null} to not filter - */ - public void setContext(String context) { - this.context = context; - } - - /** * Returns whether the Web of Trust plugin could be reached during the last * try. *