public final class DefaultUserCredentials extends Object implements UserCredentials
| Modifier and Type | Method and Description |
|---|---|
<T> T |
doAs(PrivilegedExceptionAction<T> action)
Execute the privileged action as a given user.
|
boolean |
isSet()
Check if the user credentials had been set.
|
void |
set(String name,
UserCredentials other)
Copy credentials from another existing user.
|
public void set(String name, UserCredentials other) throws IOException
set in interface UserCredentialsname - Name of the new user.other - Credentials of another user.RuntimeException - always throws.IOException - if unable to copy.public boolean isSet()
isSet in interface UserCredentialspublic <T> T doAs(PrivilegedExceptionAction<T> action) throws Exception
doAs in interface UserCredentialsT - action return type.action - an action to run.Exception - whatever the action can throw.Copyright © 2017 The Apache Software Foundation. All rights reserved.