|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.hadoop.security.token.Token<T>
public class Token<T extends TokenIdentifier>
The client-side form of the token.
Nested Class Summary | |
---|---|
static class |
Token.TrivialRenewer
A trivial renewer for token kinds that aren't managed. |
Field Summary | |
---|---|
static org.apache.commons.logging.Log |
LOG
|
Constructor Summary | |
---|---|
Token()
Default constructor |
|
Token(byte[] identifier,
byte[] password,
Text kind,
Text service)
Construct a token from the components. |
|
Token(Token<T> other)
Clone a token. |
|
Token(T id,
SecretManager<T> mgr)
Construct a token given a token identifier and a secret manager for the type of the token identifier. |
Method Summary | |
---|---|
void |
cancel(Configuration conf)
Cancel this delegation token |
void |
decodeFromUrlString(String newValue)
Decode the given url safe string into this token. |
String |
encodeToUrlString()
Encode this token as a url safe string |
boolean |
equals(Object right)
|
byte[] |
getIdentifier()
Get the token identifier |
Text |
getKind()
Get the token kind |
byte[] |
getPassword()
Get the token password/secret |
Text |
getService()
Get the service on which the token is supposed to be used |
int |
hashCode()
|
boolean |
isManaged()
Is this token managed so that it can be renewed or cancelled? |
void |
readFields(DataInput in)
Deserialize the fields of this object from in . |
long |
renew(Configuration conf)
Renew this delegation token |
void |
setKind(Text newKind)
Set the token kind. |
void |
setService(Text newService)
Set the service on which the token is supposed to be used |
String |
toString()
|
void |
write(DataOutput out)
Serialize the fields of this object to out . |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final org.apache.commons.logging.Log LOG
Constructor Detail |
---|
public Token(T id, SecretManager<T> mgr)
id
- the token identifiermgr
- the secret managerpublic Token(byte[] identifier, byte[] password, Text kind, Text service)
identifier
- the token identifierpassword
- the token's passwordkind
- the kind of tokenservice
- the service for this tokenpublic Token()
public Token(Token<T> other)
other
- the token to cloneMethod Detail |
---|
public byte[] getIdentifier()
public byte[] getPassword()
public Text getKind()
@InterfaceAudience.Private public void setKind(Text newKind)
newKind
- public Text getService()
public void setService(Text newService)
newService
- the service namepublic void readFields(DataInput in) throws IOException
in
.
For efficiency, implementations should attempt to re-use storage in the existing object where possible.
readFields
in interface Writable
in
- DataInput
to deseriablize this object from.
IOException
public void write(DataOutput out) throws IOException
out
.
write
in interface Writable
out
- DataOuput
to serialize this object into.
IOException
public String encodeToUrlString() throws IOException
IOException
public void decodeFromUrlString(String newValue) throws IOException
newValue
- the encoded string
IOException
public boolean equals(Object right)
equals
in class Object
public int hashCode()
hashCode
in class Object
public String toString()
toString
in class Object
public boolean isManaged() throws IOException
IOException
public long renew(Configuration conf) throws IOException, InterruptedException
IOException
InterruptedException
public void cancel(Configuration conf) throws IOException, InterruptedException
IOException
InterruptedException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |