org.openmdx.security.auth.callback
Class AddressCallbackHandler

java.lang.Object
  extended by org.openmdx.security.auth.callback.AddressCallbackHandler
All Implemented Interfaces:
CallbackHandler

public abstract class AddressCallbackHandler
extends Object
implements CallbackHandler

Address Callback Handler

The Address Callback Handler is able to handle address callback requests and delegate the remaining requests to a delegate callback handler.


Constructor Summary
protected AddressCallbackHandler(CallbackHandler delegate)
          Constructor
 
Method Summary
protected abstract  boolean accept()
          Tells whether callbacks should be handled or delegated
protected abstract  boolean accept(AddressCallback callback)
          Tells whether a given callback should be handled or delegated
protected abstract  void handle(AddressCallback callback)
          Handle a given callback class
 void handle(Callback[] callbacks)
          Handle address callbacks and delegate the remaining ones
protected  void unsupported(Callback callback, String prompt)
          Reject a given callback
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AddressCallbackHandler

protected AddressCallbackHandler(CallbackHandler delegate)
                          throws IOException
Constructor

Parameters:
request -
delegate -
Throws:
IOException
Method Detail

handle

protected abstract void handle(AddressCallback callback)
                        throws IOException,
                               UnsupportedCallbackException
Handle a given callback class

Parameters:
callback - the callback object to be handled
Throws:
UnsupportedCallbackException - if the given callback class is not supported
IOException - if callback handling fails

accept

protected abstract boolean accept()
Tells whether callbacks should be handled or delegated

Returns:
return true if callbacks should be handled

accept

protected abstract boolean accept(AddressCallback callback)
Tells whether a given callback should be handled or delegated

Parameters:
callback -
Returns:
return true if t he callback should be handled

handle

public void handle(Callback[] callbacks)
            throws IOException,
                   UnsupportedCallbackException
Handle address callbacks and delegate the remaining ones

Specified by:
handle in interface CallbackHandler
Parameters:
callbacks -
Throws:
UnsupportedCallbackException - if the given callback class is not supported
IOException - if callback handling fails

unsupported

protected void unsupported(Callback callback,
                           String prompt)
                    throws UnsupportedCallbackException
Reject a given callback

Parameters:
callback - callback
prompt - unsupported prompt
Throws:
UnsupportedCallbackException


This software is published under the BSD license. Copyright © 2003-2008, OMEX AG, Switzerland, All rights reserved. Use is subject to license terms.