use of org.apache.directory.api.ldap.model.message.ExtendedResponseImpl in project directory-ldap-api by apache.
the class InitExtendedResponse method action.
/**
* {@inheritDoc}
*/
public void action(LdapMessageContainer<ExtendedResponseDecorator<?>> container) throws DecoderException {
// Now, we can allocate the ExtendedResponse Object
ExtendedResponseDecorator<?> extendedResponse = new ExtendedResponseDecorator<>(container.getLdapCodecService(), new ExtendedResponseImpl(container.getMessageId()));
container.setMessage(extendedResponse);
LOG.debug("Extended Response");
}
use of org.apache.directory.api.ldap.model.message.ExtendedResponseImpl in project directory-ldap-api by apache.
the class DefaultLdapCodecService method newExtendedResponse.
/**
* {@inheritDoc}
*/
@SuppressWarnings("unchecked")
@Override
public <E extends ExtendedResponse> E newExtendedResponse(String responseName, int messageId, byte[] serializedResponse) throws DecoderException {
ExtendedResponseDecorator<ExtendedResponse> resp;
ExtendedOperationFactory extendedRequestFactory = extendedOperationFactories.get(responseName);
if (extendedRequestFactory != null) {
resp = (ExtendedResponseDecorator<ExtendedResponse>) extendedRequestFactory.newResponse(serializedResponse);
} else {
resp = new ExtendedResponseDecorator(this, new ExtendedResponseImpl(responseName));
resp.setResponseValue(serializedResponse);
resp.setResponseName(responseName);
}
resp.setMessageId(messageId);
return (E) resp;
}
Aggregations