|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.accumulo.core.client.security.tokens.AuthenticationToken.AuthenticationTokenSerializer
public static final class AuthenticationToken.AuthenticationTokenSerializer
A utility class to serialize/deserialize AuthenticationToken
objects.
Unfortunately, these methods are provided in an inner-class, to avoid breaking the interface API.
Constructor Summary | |
---|---|
AuthenticationToken.AuthenticationTokenSerializer()
|
Method Summary | ||
---|---|---|
static
|
deserialize(Class<T> tokenType,
byte[] tokenBytes)
A convenience method to create tokens from serialized bytes, created by serialize(AuthenticationToken) |
|
static AuthenticationToken |
deserialize(String tokenClassName,
byte[] tokenBytes)
An alternate version of deserialize(Class, byte[]) that accepts a token class name rather than a token class. |
|
static byte[] |
serialize(AuthenticationToken token)
A convenience method to serialize tokens. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AuthenticationToken.AuthenticationTokenSerializer()
Method Detail |
---|
public static <T extends AuthenticationToken> T deserialize(Class<T> tokenType, byte[] tokenBytes)
serialize(AuthenticationToken)
The specified tokenType will be instantiated, and used to deserialize the decoded bytes. The resulting object will then be returned to the caller.
tokenType
- the token class to use to deserialize the bytestokenBytes
- the token-specific serialized bytes
AuthenticationToken
instance of the type specified by tokenTypeserialize(AuthenticationToken)
public static AuthenticationToken deserialize(String tokenClassName, byte[] tokenBytes)
deserialize(Class, byte[])
that accepts a token class name rather than a token class.
tokenClassName
- the fully-qualified class name to be returnedserialize(AuthenticationToken)
public static byte[] serialize(AuthenticationToken token)
The provided AuthenticationToken
will be serialized to bytes by its own implementation and returned to the caller.
token
- the token to serialize
AuthenticationToken
deserialize(Class, byte[])
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |