/**
* {@inheritDoc}
*/
public void action( LdapMessageContainer<SearchRequestDecorator> container ) throws DecoderException
{
SearchRequest searchRequest = container.getMessage().getDecorated();
TLV tlv = container.getCurrentTLV();
// The current TLV should be a integer
// We get it and store it in sizeLimit
BerValue value = tlv.getValue();
long sizeLimit = 0;
try
{
sizeLimit = LongDecoder.parse( value, 0, Integer.MAX_VALUE );
}
catch ( LongDecoderException lde )
{
String msg = I18n.err( I18n.ERR_04103, value.toString() );
LOG.error( msg );
throw new DecoderException( msg );
}
searchRequest.setSizeLimit( sizeLimit );
if ( IS_DEBUG )
{
LOG.debug( "The sizeLimit value is set to {} objects", Long.valueOf( sizeLimit ) );
}