public abstract class AbstractIdentityBackend extends Configured implements IdentityBackend
| Constructor and Description |
|---|
AbstractIdentityBackend() |
| Modifier and Type | Method and Description |
|---|---|
KrbIdentity |
addIdentity(KrbIdentity identity)
Add an identity, and return the newly created result.
|
void |
deleteIdentity(String principalName)
Delete the identity specified by principal name
|
protected abstract KrbIdentity |
doAddIdentity(KrbIdentity identity)
Add an identity, invoked by addIdentity, and return added identity.
|
protected abstract void |
doDeleteIdentity(String principalName)
Delete an identity, invoked by deleteIndentity.
|
protected abstract Iterable<String> |
doGetIdentities()
Perform the real work to get identities.
|
protected abstract KrbIdentity |
doGetIdentity(String principalName)
Add an identity, invoked by addIdentity.
|
protected AuthorizationData |
doGetIdentityAuthorizationData(KdcClientRequest kdcClientRequest,
EncTicketPart encTicketPart)
Get an identity's Authorization Data, invoked by getIdentityAuthorizationData.
|
protected void |
doInitialize()
Perform the real initialization work for the backend.
|
protected void |
doRelease()
Perform the real release work for the backend.
|
protected void |
doStart()
Perform the real start work for the backend.
|
protected void |
doStop()
Perform the real stop work for the backend.
|
protected abstract KrbIdentity |
doUpdateIdentity(KrbIdentity identity)
Update an identity, invoked by updateIdentity, and return updated identity.
|
protected BackendConfig |
getBackendConfig()
Get the Backend Config.
|
Iterable<String> |
getIdentities()
Get all of the identity principal names.
|
KrbIdentity |
getIdentity(String principalName)
Get the identity account specified by name.
|
AuthorizationData |
getIdentityAuthorizationData(KdcClientRequest kdcClientRequest,
EncTicketPart encTicketPart)
Get an identity's Authorization Data.
|
void |
initialize()
Init work for the backend can be done here.
|
void |
release()
Release the backend associated resources like connection.
|
void |
start()
Start the backend and return soon after the backend or the connection to
it is well prepared and ready for KDC to use.
|
BatchTrans |
startBatchTrans()
Start a transaction.
|
void |
stop()
Stop the backend.
|
boolean |
supportBatchTrans()
Query to know if xtrans is supported or not.
|
KrbIdentity |
updateIdentity(KrbIdentity identity)
Update an identity, and return the updated result.
|
getConfig, setConfigclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetConfig, setConfigprotected BackendConfig getBackendConfig()
public void initialize()
throws KrbException
initialize in interface IdentityBackendKrbException - epublic boolean supportBatchTrans()
supportBatchTrans in interface IdentityServicepublic BatchTrans startBatchTrans() throws KrbException
startBatchTrans in interface IdentityServiceKrbException - eprotected void doInitialize()
throws KrbException
KrbException - epublic void start()
start in interface IdentityBackendprotected void doStart()
public void stop()
throws KrbException
stop in interface IdentityBackendKrbException - eprotected void doStop()
throws KrbException
KrbException - epublic void release()
release in interface IdentityBackendprotected void doRelease()
public Iterable<String> getIdentities() throws KrbException
getIdentities in interface IdentityServiceKrbException - eprotected abstract Iterable<String> doGetIdentities() throws KrbException
KrbException - epublic KrbIdentity getIdentity(String principalName) throws KrbException
getIdentity in interface IdentityServiceprincipalName - The principal nameKrbException - eprotected abstract KrbIdentity doGetIdentity(String principalName) throws KrbException
principalName - The principal nameKrbException - epublic AuthorizationData getIdentityAuthorizationData(KdcClientRequest kdcClientRequest, EncTicketPart encTicketPart) throws KrbException
getIdentityAuthorizationData in interface IdentityServicekdcClientRequest - The KdcClientRequestencTicketPart - The EncTicketPart being built for the KrbIdentityKrbException - eprotected AuthorizationData doGetIdentityAuthorizationData(KdcClientRequest kdcClientRequest, EncTicketPart encTicketPart) throws KrbException
kdcClientRequest - The KdcClientRequestencTicketPart - The EncTicketPart being built for the KrbIdentityKrbException - epublic KrbIdentity addIdentity(KrbIdentity identity) throws KrbException
addIdentity in interface IdentityServiceidentity - The identityKrbException - eprotected abstract KrbIdentity doAddIdentity(KrbIdentity identity) throws KrbException
identity - The identity to be addedKrbException - epublic KrbIdentity updateIdentity(KrbIdentity identity) throws KrbException
updateIdentity in interface IdentityServiceidentity - The identityKrbException - eprotected abstract KrbIdentity doUpdateIdentity(KrbIdentity identity) throws KrbException
identity - The origin identityKrbException - epublic void deleteIdentity(String principalName) throws KrbException
deleteIdentity in interface IdentityServiceprincipalName - The principal nameKrbException - eprotected abstract void doDeleteIdentity(String principalName) throws KrbException
principalName - The principal nameKrbException - eCopyright © 2014–2017 The Apache Software Foundation. All rights reserved.