com.endeca.navigation
Class StaticCallbackHandler
java.lang.Object
com.endeca.navigation.StaticCallbackHandler
- All Implemented Interfaces:
- CallbackHandler
public class StaticCallbackHandler
- extends Object
- implements CallbackHandler
Implements a simple CallbackHandler that only provides user name
and password. The CallbackHandler can be used with the
login
method of the AuthHttpENEConnection
class,
as in this simple example:
// Instantiate a connection object for the MDEX Engine
AuthHttpENEConnection nec = new AuthHttpENEConnection("engine.endeca.com", 8000);
// Create a CallbackHandler
CallbackHandler cbh = new StaticCallbackHandler(name, pass);
// Authenticate the user
nec.login(cbh);
In the example, the name
and pass
arguments to
the StaticCallbackHandler
constructor have been set previously
in the application.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
StaticCallbackHandler
public StaticCallbackHandler(String userName,
String passWord)
- Creates the CallbackHandler.
- Parameters:
userName
- The user name to provide to the Endeca Access
Control System.passWord
- The password to provide to the Endeca Access
Control System.
handle
public void handle(Callback[] callbacks)
throws UnsupportedCallbackException,
IOException
- Specified by:
handle
in interface CallbackHandler
- Throws:
UnsupportedCallbackException
IOException
© 2010 Endeca Technologies, Inc.
Endeca Confidential