org.ldaptive.provider.netscape.NetscapeControlHandler Maven / Gradle / Ivy
/*
$Id: NetscapeControlHandler.java 2885 2014-02-05 21:28:49Z dfisher $
Copyright (C) 2003-2014 Virginia Tech.
All rights reserved.
SEE LICENSE FOR MORE INFORMATION
Author: Middleware Services
Email: [email protected]
Version: $Revision: 2885 $
Updated: $Date: 2014-02-05 16:28:49 -0500 (Wed, 05 Feb 2014) $
*/
package org.ldaptive.provider.netscape;
import org.ldaptive.control.ControlFactory;
import org.ldaptive.control.RequestControl;
import org.ldaptive.control.ResponseControl;
import org.ldaptive.provider.ControlHandler;
/**
* Netscape control handler.
*
* @author Middleware Services
* @version $Revision: 2885 $ $Date: 2014-02-05 16:28:49 -0500 (Wed, 05 Feb 2014) $
*/
public class NetscapeControlHandler
implements ControlHandler
{
/** {@inheritDoc} */
@Override
public String getOID(final netscape.ldap.LDAPControl control)
{
return control.getID();
}
/** {@inheritDoc} */
@Override
public netscape.ldap.LDAPControl handleRequest(
final RequestControl requestControl)
{
return
new netscape.ldap.LDAPControl(
requestControl.getOID(),
requestControl.getCriticality(),
requestControl.encode());
}
/** {@inheritDoc} */
@Override
public ResponseControl handleResponse(
final netscape.ldap.LDAPControl responseControl)
{
return
ControlFactory.createResponseControl(
responseControl.getID(),
responseControl.isCritical(),
responseControl.getValue());
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy