org.apache.accumulo.core.client.security.tokens
Class PasswordToken

java.lang.Object
  extended by org.apache.accumulo.core.client.security.tokens.PasswordToken
All Implemented Interfaces:
Cloneable, Destroyable, AuthenticationToken, org.apache.hadoop.io.Writable

public class PasswordToken
extends Object
implements AuthenticationToken

Since:
1.5.0

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.apache.accumulo.core.client.security.tokens.AuthenticationToken
AuthenticationToken.Properties, AuthenticationToken.TokenProperty
 
Constructor Summary
PasswordToken()
          Constructor for use with Writable.
PasswordToken(byte[] password)
          Constructs a token from a copy of the password.
PasswordToken(ByteBuffer password)
          Constructs a token from a copy of the password.
PasswordToken(CharSequence password)
          Constructs a token from a copy of the password.
 
Method Summary
 PasswordToken clone()
           
 void destroy()
           
 boolean equals(Object obj)
           
 byte[] getPassword()
           
 Set<AuthenticationToken.TokenProperty> getProperties()
           
 int hashCode()
           
 void init(AuthenticationToken.Properties properties)
           
 boolean isDestroyed()
           
 void readFields(DataInput arg0)
           
 void write(DataOutput arg0)
           
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PasswordToken

public PasswordToken()
Constructor for use with Writable. Call readFields(DataInput).


PasswordToken

public PasswordToken(CharSequence password)
Constructs a token from a copy of the password. Destroying the argument after construction will not destroy the copy in this token, and destroying this token will only destroy the copy held inside this token, not the argument. Password tokens created with this constructor will store the password as UTF-8 bytes.


PasswordToken

public PasswordToken(byte[] password)
Constructs a token from a copy of the password. Destroying the argument after construction will not destroy the copy in this token, and destroying this token will only destroy the copy held inside this token, not the argument.


PasswordToken

public PasswordToken(ByteBuffer password)
Constructs a token from a copy of the password. Destroying the argument after construction will not destroy the copy in this token, and destroying this token will only destroy the copy held inside this token, not the argument.

Method Detail

getPassword

public byte[] getPassword()

readFields

public void readFields(DataInput arg0)
                throws IOException
Specified by:
readFields in interface org.apache.hadoop.io.Writable
Throws:
IOException

write

public void write(DataOutput arg0)
           throws IOException
Specified by:
write in interface org.apache.hadoop.io.Writable
Throws:
IOException

destroy

public void destroy()
             throws DestroyFailedException
Specified by:
destroy in interface Destroyable
Throws:
DestroyFailedException

isDestroyed

public boolean isDestroyed()
Specified by:
isDestroyed in interface Destroyable

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

clone

public PasswordToken clone()
Specified by:
clone in interface AuthenticationToken
Overrides:
clone in class Object

init

public void init(AuthenticationToken.Properties properties)
Specified by:
init in interface AuthenticationToken

getProperties

public Set<AuthenticationToken.TokenProperty> getProperties()
Specified by:
getProperties in interface AuthenticationToken


Copyright © 2013 Apache Accumulo Project. All Rights Reserved.