messageResp = ( ( LdapMessageContainer ) ldapMessageContainer ).getLdapMessage();
if ( messageResp instanceof BindResponse )
{
BindResponse resp = ( ( LdapMessageContainer ) ldapMessageContainer ).getLdapMessage().getBindResponse();
if ( resp.getLdapResult().getResultCode() != ResultCodeEnum.SUCCESS )
{
System.err.println( "Error : " + resp.getLdapResult().getErrorMessage() );
}
}
else if ( messageResp instanceof ExtendedResponse )
{
ExtendedResponse resp = ( ( LdapMessageContainer ) ldapMessageContainer ).getLdapMessage()
.getExtendedResponse();
if ( resp.getLdapResult().getResultCode() != ResultCodeEnum.SUCCESS )
{
System.err.println( "Error : " + resp.getLdapResult().getErrorMessage() );
}
}
( ( LdapMessageContainer ) ldapMessageContainer ).clean();