request.setSaslMechanism( mechanism );
request.setVersion3( true ) ;
// Setup the ASN1 Encoder and Decoder
MessageEncoder encoder = new MessageEncoder();
MessageDecoder decoder = new MessageDecoder( new BinaryAttributeDetector() {
public boolean isBinary( String attributeId )
{
return false;
}
} );
// Send encoded request to server
encoder.encodeBlocking( null, _output_, request );
_output_.flush();
while ( _input_.available() <= 0 )
{
Thread.sleep( 100 );
}
// Retrieve the response back from server to my last request.
return ( InternalBindResponse ) decoder.decode( null, _input_ );
}