|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.hadoop.security.token.Token<T>
public class Token<T extends TokenIdentifier>
The client-side form of the token.
| Constructor Summary | |
|---|---|
Token()
Default constructor |
|
Token(byte[] identifier,
byte[] password,
Text kind,
Text service)
Construct a token from the components. |
|
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 |
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()
|
void |
readFields(DataInput in)
Deserialize the fields of this object from in. |
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 |
| Constructor Detail |
|---|
public Token(T id,
SecretManager<T> mgr)
id - the token identifiermgr - the secret manager
public 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()
| Method Detail |
|---|
public byte[] getIdentifier()
public byte[] getPassword()
public Text getKind()
public Text getService()
public void setService(Text newService)
newService - the service name
public 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 Writablein - DataInput to deseriablize this object from.
IOException
public void write(DataOutput out)
throws IOException
out.
write in interface Writableout - DataOuput to serialize this object into.
IOException
public String encodeToUrlString()
throws IOException
IOException
public void decodeFromUrlString(String newValue)
throws IOException
newValue - the encoded string
IOExceptionpublic boolean equals(Object right)
equals in class Objectpublic int hashCode()
hashCode in class Objectpublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||