@DefaultImplementation(value=DefaultUserCredentials.class) public interface 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.
|
void set(String name, UserCredentials other) throws IOException
name
- name of the new user.other
- Credentials of another user.IOException
- if unable to copy.boolean isSet()
<T> T doAs(PrivilegedExceptionAction<T> action) throws Exception
T
- action return type.action
- an action to run.Exception
- whatever the action can throw.Copyright © 2017 The Apache Software Foundation. All rights reserved.