jboss-sasl 1.0.0.Beta1

org.jboss.sasl.callback
Class TokenCallback

java.lang.Object
  extended by org.jboss.sasl.callback.TokenCallback
All Implemented Interfaces:
Callback

public final class TokenCallback
extends Object
implements Callback

A callback for a binary token.

Author:
David M. Lloyd

Constructor Summary
TokenCallback(String prompt, int length)
          Construct a new instance.
 
Method Summary
 String getPrompt()
          Get the prompt.
 byte[] getToken()
          Get the token.
 int getTokenLength()
          Get the expected token length.
 void setToken(byte[] token)
          Set the token.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TokenCallback

public TokenCallback(String prompt,
                     int length)
Construct a new instance.

Parameters:
prompt - the prompt
length - the expected length of the token, in bytes
Method Detail

getPrompt

public String getPrompt()
Get the prompt.

Returns:
the prompt

getTokenLength

public int getTokenLength()
Get the expected token length.

Returns:
the expected token length

getToken

public byte[] getToken()
Get the token.

Returns:
the token

setToken

public void setToken(byte[] token)
Set the token.

Parameters:
token - the token

jboss-sasl 1.0.0.Beta1

Copyright © 2011 JBoss, a division of Red Hat, Inc.. All Rights Reserved.