Java Doc for ConfirmationCallback.java in  » 6.0-JDK-Core » security » javax » security » auth » callback » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Home
Java Source Code / Java Documentation
1.6.0 JDK Core
2.6.0 JDK Modules
3.6.0 JDK Modules com.sun
4.6.0 JDK Modules com.sun.java
5.6.0 JDK Modules sun
6.6.0 JDK Platform
7.Ajax
8.Apache Harmony Java SE
9.Aspect oriented
10.Authentication Authorization
11.Blogger System
12.Build
13.Byte Code
14.Cache
15.Chart
16.Chat
17.Code Analyzer
18.Collaboration
19.Content Management System
20.Database Client
21.Database DBMS
22.Database JDBC Connection Pool
23.Database ORM
24.Development
25.EJB Server
26.ERP CRM Financial
27.ESB
28.Forum
29.Game
30.GIS
31.Graphic 3D
32.Graphic Library
33.Groupware
34.HTML Parser
35.IDE
36.IDE Eclipse
37.IDE Netbeans
38.Installer
39.Internationalization Localization
40.Inversion of Control
41.Issue Tracking
42.J2EE
43.J2ME
44.JBoss
45.JMS
46.JMX
47.Library
48.Mail Clients
49.Music
50.Net
51.Parser
52.PDF
53.Portal
54.Profiler
55.Project Management
56.Report
57.RSS RDF
58.Rule Engine
59.Science
60.Scripting
61.Search Engine
62.Security
63.Sevlet Container
64.Source Control
65.Swing Library
66.Template Engine
67.Test Coverage
68.Testing
69.UML
70.Web Crawler
71.Web Framework
72.Web Mail
73.Web Server
74.Web Services
75.Web Services apache cxf 2.2.6
76.Web Services AXIS2
77.Wiki Engine
78.Workflow Engines
79.XML
80.XML UI
Java Source Code / Java Documentation » 6.0 JDK Core » security » javax.security.auth.callback 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   javax.security.auth.callback.ConfirmationCallback

ConfirmationCallback
public class ConfirmationCallback implements Callback,java.io.Serializable(Code)

Underlying security services instantiate and pass a ConfirmationCallback to the handle method of a CallbackHandler to ask for YES/NO, OK/CANCEL, YES/NO/CANCEL or other similar confirmations.
version:
   1.23, 05/05/07
See Also:   javax.security.auth.callback.CallbackHandler



Field Summary
final public static  intCANCEL
     CANCEL option.
final public static  intERROR
     ERROR message type.
final public static  intINFORMATION
     INFORMATION message type.
final public static  intNO
     NO option.
final public static  intOK
     OK option.
final public static  intOK_CANCEL_OPTION
     OK/CANCEL confirmation confirmation option.
final public static  intUNSPECIFIED_OPTION
     Unspecified option type.
final public static  intWARNING
     WARNING message type.
final public static  intYES
     YES option.
final public static  intYES_NO_CANCEL_OPTION
     YES/NO/CANCEL confirmation confirmation option.
final public static  intYES_NO_OPTION
     YES/NO confirmation option.

Constructor Summary
public  ConfirmationCallback(int messageType, int optionType, int defaultOption)
     Construct a ConfirmationCallback with a message type, an option type and a default option.

Underlying security services use this constructor if they require either a YES/NO, YES/NO/CANCEL or OK/CANCEL confirmation.


Parameters:
  messageType - the message type (INFORMATION,WARNING or ERROR).

public  ConfirmationCallback(int messageType, String[] options, int defaultOption)
     Construct a ConfirmationCallback with a message type, a list of options and a default option.

Underlying security services use this constructor if they require a confirmation different from the available preset confirmations provided (for example, CONTINUE/ABORT or STOP/GO). The confirmation options are listed in the options array, and are displayed by the CallbackHandler implementation in a manner consistent with the way preset options are displayed.


Parameters:
  messageType - the message type (INFORMATION,WARNING or ERROR).

public  ConfirmationCallback(String prompt, int messageType, int optionType, int defaultOption)
     Construct a ConfirmationCallback with a prompt, message type, an option type and a default option.

Underlying security services use this constructor if they require either a YES/NO, YES/NO/CANCEL or OK/CANCEL confirmation.


Parameters:
  prompt - the prompt used to describe the list of options.

public  ConfirmationCallback(String prompt, int messageType, String[] options, int defaultOption)
     Construct a ConfirmationCallback with a prompt, message type, a list of options and a default option.

Underlying security services use this constructor if they require a confirmation different from the available preset confirmations provided (for example, CONTINUE/ABORT or STOP/GO). The confirmation options are listed in the options array, and are displayed by the CallbackHandler implementation in a manner consistent with the way preset options are displayed.


Parameters:
  prompt - the prompt used to describe the list of options.


Method Summary
public  intgetDefaultOption()
     Get the default option.
public  intgetMessageType()
     Get the message type.
public  intgetOptionType()
     Get the option type.
public  String[]getOptions()
     Get the confirmation options.
public  StringgetPrompt()
     Get the prompt.
public  intgetSelectedIndex()
     Get the selected confirmation option.
public  voidsetSelectedIndex(int selection)
     Set the selected confirmation option.

Field Detail
CANCEL
final public static int CANCEL(Code)
CANCEL option.

If an optionType was specified to this ConfirmationCallback, this option may be specified as a defaultOption or returned as the selected index.




ERROR
final public static int ERROR(Code)
ERROR message type.



INFORMATION
final public static int INFORMATION(Code)
INFORMATION message type.



NO
final public static int NO(Code)
NO option.

If an optionType was specified to this ConfirmationCallback, this option may be specified as a defaultOption or returned as the selected index.




OK
final public static int OK(Code)
OK option.

If an optionType was specified to this ConfirmationCallback, this option may be specified as a defaultOption or returned as the selected index.




OK_CANCEL_OPTION
final public static int OK_CANCEL_OPTION(Code)
OK/CANCEL confirmation confirmation option.

An underlying security service specifies this as the optionType to a ConfirmationCallback constructor if it requires a confirmation which can be answered with either OK or CANCEL.




UNSPECIFIED_OPTION
final public static int UNSPECIFIED_OPTION(Code)
Unspecified option type.

The getOptionType method returns this value if this ConfirmationCallback was instantiated with options instead of an optionType.




WARNING
final public static int WARNING(Code)
WARNING message type.



YES
final public static int YES(Code)
YES option.

If an optionType was specified to this ConfirmationCallback, this option may be specified as a defaultOption or returned as the selected index.




YES_NO_CANCEL_OPTION
final public static int YES_NO_CANCEL_OPTION(Code)
YES/NO/CANCEL confirmation confirmation option.

An underlying security service specifies this as the optionType to a ConfirmationCallback constructor if it requires a confirmation which can be answered with either YES, NO or CANCEL.




YES_NO_OPTION
final public static int YES_NO_OPTION(Code)
YES/NO confirmation option.

An underlying security service specifies this as the optionType to a ConfirmationCallback constructor if it requires a confirmation which can be answered with either YES or NO.





Constructor Detail
ConfirmationCallback
public ConfirmationCallback(int messageType, int optionType, int defaultOption)(Code)
Construct a ConfirmationCallback with a message type, an option type and a default option.

Underlying security services use this constructor if they require either a YES/NO, YES/NO/CANCEL or OK/CANCEL confirmation.


Parameters:
  messageType - the message type (INFORMATION,WARNING or ERROR).


Parameters:
  optionType - the option type (YES_NO_OPTION,YES_NO_CANCEL_OPTION orOK_CANCEL_OPTION).


Parameters:
  defaultOption - the default optionfrom the provided optionType (YES,NO, CANCEL orOK).
exception:
  IllegalArgumentException - if messageType is not eitherINFORMATION, WARNING,or ERROR, if optionType is not eitherYES_NO_OPTION,YES_NO_CANCEL_OPTION, orOK_CANCEL_OPTION,or if defaultOptiondoes not correspond to one of the options inoptionType.




ConfirmationCallback
public ConfirmationCallback(int messageType, String[] options, int defaultOption)(Code)
Construct a ConfirmationCallback with a message type, a list of options and a default option.

Underlying security services use this constructor if they require a confirmation different from the available preset confirmations provided (for example, CONTINUE/ABORT or STOP/GO). The confirmation options are listed in the options array, and are displayed by the CallbackHandler implementation in a manner consistent with the way preset options are displayed.


Parameters:
  messageType - the message type (INFORMATION,WARNING or ERROR).


Parameters:
  options - the list of confirmation options.


Parameters:
  defaultOption - the default option, represented as an indexinto the options array.
exception:
  IllegalArgumentException - if messageType is not eitherINFORMATION, WARNING,or ERROR, if options is null,if options has a length of 0,if any element from options is null,if any element from optionshas a length of 0, or if defaultOptiondoes not lie within the array boundaries ofoptions.




ConfirmationCallback
public ConfirmationCallback(String prompt, int messageType, int optionType, int defaultOption)(Code)
Construct a ConfirmationCallback with a prompt, message type, an option type and a default option.

Underlying security services use this constructor if they require either a YES/NO, YES/NO/CANCEL or OK/CANCEL confirmation.


Parameters:
  prompt - the prompt used to describe the list of options.


Parameters:
  messageType - the message type (INFORMATION,WARNING or ERROR).


Parameters:
  optionType - the option type (YES_NO_OPTION,YES_NO_CANCEL_OPTION orOK_CANCEL_OPTION).


Parameters:
  defaultOption - the default optionfrom the provided optionType (YES,NO, CANCEL orOK).
exception:
  IllegalArgumentException - if prompt is null,if prompt has a length of 0,if messageType is not eitherINFORMATION, WARNING,or ERROR, if optionType is not eitherYES_NO_OPTION,YES_NO_CANCEL_OPTION, orOK_CANCEL_OPTION,or if defaultOptiondoes not correspond to one of the options inoptionType.




ConfirmationCallback
public ConfirmationCallback(String prompt, int messageType, String[] options, int defaultOption)(Code)
Construct a ConfirmationCallback with a prompt, message type, a list of options and a default option.

Underlying security services use this constructor if they require a confirmation different from the available preset confirmations provided (for example, CONTINUE/ABORT or STOP/GO). The confirmation options are listed in the options array, and are displayed by the CallbackHandler implementation in a manner consistent with the way preset options are displayed.


Parameters:
  prompt - the prompt used to describe the list of options.


Parameters:
  messageType - the message type (INFORMATION,WARNING or ERROR).


Parameters:
  options - the list of confirmation options.


Parameters:
  defaultOption - the default option, represented as an indexinto the options array.
exception:
  IllegalArgumentException - if prompt is null,if prompt has a length of 0,if messageType is not eitherINFORMATION, WARNING,or ERROR, if options is null,if options has a length of 0,if any element from options is null,if any element from optionshas a length of 0, or if defaultOptiondoes not lie within the array boundaries ofoptions.





Method Detail
getDefaultOption
public int getDefaultOption()(Code)
Get the default option.

the default option, represented asYES, NO, OK orCANCEL if an optionTypewas specified to the constructor of thisConfirmationCallback.Otherwise, this method returns the default option asan index into theoptions array specified to the constructorof this ConfirmationCallback.




getMessageType
public int getMessageType()(Code)
Get the message type.

the message type (INFORMATION,WARNING or ERROR).




getOptionType
public int getOptionType()(Code)
Get the option type.

If this method returns UNSPECIFIED_OPTION, then this ConfirmationCallback was instantiated with options instead of an optionType. In this case, invoke the getOptions method to determine which confirmation options to display.

the option type (YES_NO_OPTION,YES_NO_CANCEL_OPTION orOK_CANCEL_OPTION), orUNSPECIFIED_OPTION if thisConfirmationCallback was instantiated withoptions instead of an optionType.




getOptions
public String[] getOptions()(Code)
Get the confirmation options.

the list of confirmation options, or null if thisConfirmationCallback was instantiated withan optionType instead of options.




getPrompt
public String getPrompt()(Code)
Get the prompt.

the prompt, or null if this ConfirmationCallbackwas instantiated without a prompt.




getSelectedIndex
public int getSelectedIndex()(Code)
Get the selected confirmation option.

the selected confirmation option represented asYES, NO, OK orCANCEL if an optionTypewas specified to the constructor of thisConfirmationCallback.Otherwise, this method returns the selected confirmationoption as an index into theoptions array specified to the constructorof this ConfirmationCallback.
See Also:   ConfirmationCallback.setSelectedIndex




setSelectedIndex
public void setSelectedIndex(int selection)(Code)
Set the selected confirmation option.


Parameters:
  selection - the selection represented as YES,NO, OK or CANCELif an optionType was specified to the constructorof this ConfirmationCallback.Otherwise, the selection represents the index into theoptions array specified to the constructorof this ConfirmationCallback.
See Also:   ConfirmationCallback.getSelectedIndex




Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.