All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.java.truecommons.key.spec.unknown.UnknownKeyManager Maven / Gradle / Ivy

The newest version!
/*
 * Copyright (C) 2005-2015 Schlichtherle IT Services.
 * All rights reserved. Use is subject to license terms.
 */
package net.java.truecommons.key.spec.unknown;

import java.net.URI;
import javax.annotation.concurrent.ThreadSafe;
import net.java.truecommons.key.spec.AbstractKeyManager;
import net.java.truecommons.key.spec.KeyManager;
import net.java.truecommons.key.spec.KeyProvider;

/**
 * This key manager fails to resolve any keys.
 *
 * @since  TrueCommons 2.2
 * @author Christian Schlichtherle
 */
@ThreadSafe
public final class UnknownKeyManager extends AbstractKeyManager {

    /** The singleton instance of this class. */
    public static final KeyManager SINGLETON = new UnknownKeyManager();

    private UnknownKeyManager() { }

    @Override
    public KeyProvider provider(URI uri) {
        return UnknownKeyProvider.SINGLETON;
    }

    @Override
    public void release(URI uri) { }

    @Override
    public void link(URI originUri, URI targetUri) { }

    @Override
    public void unlink(URI uri) { }
}