public static void createManyIdentities(IdentityBackend backend, int count) throws KrbException { int howMany = count > 0 ? count : 20; List<KrbIdentity> identities = createManyIdentities(howMany); for (KrbIdentity identity : identities) { backend.addIdentity(identity); } }
public static void createTheTestIdentity( IdentityBackend backend) throws KrbException { backend.addIdentity(createOneIdentity(TEST_PRINCIPAL)); }
@Override protected boolean removeEldestEntry(Map.Entry<String, KrbIdentity> eldest) { return size() > storageSize; } };
@Override public void release() throws KrbException { if (backend != null) { backend.stop(); } }
@Override public KrbIdentity getPrincipal(String principalName) throws KrbException { KrbIdentity identity = backend.getIdentity(principalName); return identity; }
private void prepareIdentities() throws KrbException { BackendTestUtil.createManyIdentities(backend, 100); BackendTestUtil.createTheTestIdentity(backend); }
protected void doStart() throws Exception { backend.start(); }
/** * Get the Backend Config. * @return The backend config */ protected BackendConfig getBackendConfig() { return (BackendConfig) getConfig(); }
public static KrbIdentity createOneIdentity() throws KrbException { return createOneIdentity(TEST_PRINCIPAL); }
@Override public void release() throws KrbException { if (backend != null) { backend.stop(); } }
public static void createManyIdentities(IdentityBackend backend, int count) throws KrbException { int howMany = count > 0 ? count : 20; List<KrbIdentity> identities = createManyIdentities(howMany); for (KrbIdentity identity : identities) { backend.addIdentity(identity); } }
public static void createTheTestIdentity( IdentityBackend backend) throws KrbException { backend.addIdentity(createOneIdentity(TEST_PRINCIPAL)); }
@Override public KrbIdentity getPrincipal(String principalName) throws KrbException { KrbIdentity identity = backend.getIdentity(principalName); return identity; }
protected void doStart() throws Exception { backend.start(); }
@Override protected boolean removeEldestEntry(Map.Entry<String, KrbIdentity> eldest) { return size() > storageSize; } };
/** * Get the Backend Config. * @return The backend config */ protected BackendConfig getBackendConfig() { return (BackendConfig) getConfig(); }
protected void doStop() throws Exception { backend.stop(); } }
protected void doStop() throws Exception { backend.stop(); } }
protected void doStop() throws Exception { backend.stop(); } }
protected void doStop() throws Exception { backend.stop(); } }