KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > security > auth > callback > ByteArrayCallback


1 /*
2  * JBoss, the OpenSource WebOS
3  *
4  * Distributable under LGPL license.
5  * See terms of license at gnu.org.
6  */

7 package org.jboss.security.auth.callback;
8
9 import javax.security.auth.callback.Callback JavaDoc;
10
11 /** An implementation of Callback that obtains a binary parameter as a byte[].
12  Interpretation of the array is up to the LoginModule.
13
14 @author Scott.Stark@jboss.org
15 @version $Revision: 1.3 $
16 */

17 public class ByteArrayCallback implements Callback JavaDoc
18 {
19     private transient String JavaDoc prompt;
20     private transient byte[] data;
21
22     /** Initialize the SecurityAssociationCallback
23     */

24     public ByteArrayCallback(String JavaDoc prompt)
25     {
26         this.prompt = prompt;
27     }
28
29     public String JavaDoc getPrompt()
30     {
31         return prompt;
32     }
33     public byte[] getByteArray()
34     {
35         return data;
36     }
37     public void setByteArray(byte[] data)
38     {
39         this.data = data;
40     }
41     public void clearByteArray()
42     {
43         this.data = null;
44     }
45 }
46
47
Popular Tags