/** * Get a String representation of the TLV * * @return A String */ public String toString() { StringBuffer sb = new StringBuffer(); sb.append( "TLV[ " ); sb.append( Asn1StringUtils.dumpByte( tag ) ).append( ", " ); sb.append( length ).append( ", " ); sb.append( value.toString() ); sb.append( "]" ); return sb.toString(); }
public void action( IAsn1Container container ) throws DecoderException { LdapMessageContainer ldapMessageContainer = ( LdapMessageContainer ) container; SearchRequestCodec searchRequest = ldapMessageContainer.getSearchRequest(); TLV tlv = ldapMessageContainer.getCurrentTLV(); // The current TLV should be a integer // We get it and store it in timeLimit Value value = tlv.getValue(); int timeLimit = 0; try { timeLimit = IntegerDecoder.parse( value, 0, Integer.MAX_VALUE ); } catch ( IntegerDecoderException ide ) { log.error( I18n.err( I18n.ERR_04104, value.toString() ) ); throw new DecoderException( I18n.err( I18n.ERR_04104, value.toString() ) ); } searchRequest.setTimeLimit( timeLimit ); if ( IS_DEBUG ) { log.debug( "The timeLimit value is set to {} seconds", Integer.valueOf( timeLimit ) ); } return; } } );
public void action( IAsn1Container container ) throws DecoderException { LdapMessageContainer ldapMessageContainer = ( LdapMessageContainer ) container; SearchRequestCodec searchRequest = ldapMessageContainer.getSearchRequest(); TLV tlv = ldapMessageContainer.getCurrentTLV(); // The current TLV should be a integer // We get it and store it in sizeLimit Value value = tlv.getValue(); long sizeLimit = 0; try { sizeLimit = LongDecoder.parse( value, 0, Integer.MAX_VALUE ); } catch ( LongDecoderException lde ) { log.error( I18n.err( I18n.ERR_04103, value.toString() ) ); throw new DecoderException( I18n.err( I18n.ERR_04103, value.toString() ) ); } searchRequest.setSizeLimit( sizeLimit ); if ( IS_DEBUG ) { log.debug( "The sizeLimit value is set to {} objects", Long.valueOf( sizeLimit ) ); } return; } } );
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 Value 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 ) ); } } } );
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 timeLimit Value value = tlv.getValue(); int timeLimit = 0; try { timeLimit = IntegerDecoder.parse( value, 0, Integer.MAX_VALUE ); } catch ( IntegerDecoderException ide ) { String msg = I18n.err( I18n.ERR_04104, value.toString() ); LOG.error( msg ); throw new DecoderException( msg ); } searchRequest.setTimeLimit( timeLimit ); if ( IS_DEBUG ) { LOG.debug( "The timeLimit value is set to {} seconds", Integer.valueOf( timeLimit ) ); } } } );
String msg = I18n.err( I18n.ERR_04102, value.toString() ); LOG.error( msg ); throw new DecoderException( msg );
String msg = I18n.err( I18n.ERR_04101, value.toString() ); LOG.error( msg ); throw new DecoderException( msg );