Spring Web Services Framework

org.springframework.ws.soap.security.xwss.callback
Class SimpleUsernamePasswordCallbackHandler

java.lang.Object
  extended by org.springframework.ws.soap.security.callback.AbstractCallbackHandler
      extended by org.springframework.ws.soap.security.xwss.callback.SimpleUsernamePasswordCallbackHandler
All Implemented Interfaces:
CallbackHandler, InitializingBean

public class SimpleUsernamePasswordCallbackHandler
extends AbstractCallbackHandler
implements InitializingBean

Simple callback handler that supplies a username and password to a username token at runtime.

This class handles UsernameCallbacks and PasswordCallbacks, and throws an UnsupportedCallbackException for others

Since:
1.0.0
Author:
Arjen Poutsma
See Also:
setUsername(String), setPassword(String)

Field Summary
 
Fields inherited from class org.springframework.ws.soap.security.callback.AbstractCallbackHandler
logger
 
Constructor Summary
SimpleUsernamePasswordCallbackHandler()
          Constructs an empty instance of the SimpleUsernamePasswordCallbackHandler.
SimpleUsernamePasswordCallbackHandler(String username, String password)
          Constructs an instance of the SimpleUsernamePasswordCallbackHandler with the given name and password.
 
Method Summary
 void afterPropertiesSet()
           
protected  void handleInternal(Callback callback)
          Template method that should be implemented by subclasses.
 void setPassword(String password)
           
 void setUsername(String username)
           
 
Methods inherited from class org.springframework.ws.soap.security.callback.AbstractCallbackHandler
handle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleUsernamePasswordCallbackHandler

public SimpleUsernamePasswordCallbackHandler()
Constructs an empty instance of the SimpleUsernamePasswordCallbackHandler.


SimpleUsernamePasswordCallbackHandler

public SimpleUsernamePasswordCallbackHandler(String username,
                                             String password)
Constructs an instance of the SimpleUsernamePasswordCallbackHandler with the given name and password.

Method Detail

setPassword

public void setPassword(String password)

setUsername

public void setUsername(String username)

afterPropertiesSet

public void afterPropertiesSet()
                        throws Exception
Specified by:
afterPropertiesSet in interface InitializingBean
Throws:
Exception

handleInternal

protected void handleInternal(Callback callback)
                       throws IOException,
                              UnsupportedCallbackException
Description copied from class: AbstractCallbackHandler
Template method that should be implemented by subclasses.

Specified by:
handleInternal in class AbstractCallbackHandler
Throws:
IOException
UnsupportedCallbackException

Spring Web Services Framework

Copyright © 2005-2013 The Spring Web Services Framework. All Rights Reserved.