* {@inheritDoc}
*/
public void action( LdapMessageContainer<ExtendedResponseDecorator<?>> container ) throws DecoderException
{
// We can allocate the ExtendedResponse Object
ExtendedResponse extendedResponse = null;
// Get the Value and store it in the ExtendedResponse
TLV tlv = container.getCurrentTLV();
// We have to handle the special case of a 0 length matched
// OID
if ( tlv.getLength() == 0 )
{
String msg = I18n.err( I18n.ERR_04017 );
LOG.error( msg );
throw new DecoderException( msg );
}
else
{
String responseName = new Oid( Strings.asciiBytesToString( tlv.getValue().getData() ) )
.toString();
extendedResponse = LdapApiServiceFactory.getSingleton().newExtendedResponse( responseName,
container.getMessageId(), null );
((ExtendedResponseDecorator<?>)extendedResponse).setLdapResult( ((LdapResultDecorator)(container.getMessage().getLdapResult() ) ) );
container.setMessage( LdapApiServiceFactory.getSingleton().decorate( extendedResponse ) );
}
// We can have an END transition
container.setGrammarEndAllowed( true );
if ( IS_DEBUG )
{
LOG.debug( "OID read : {}", extendedResponse.getResponseName() );
}
}