// We send the added entry directly to the consumer if it's connected
if ( pushInRealTime )
{
// Construct a new SearchResultEntry
SearchResultEntry resultEntry = new SearchResultEntryImpl( searchRequest.getMessageId() );
resultEntry.setObjectName( entry.getDn() );
resultEntry.setEntry( entry );
// Create the control which will be added to the response.
SyncStateValue syncAdd = createControl( session.getCoreSession().getDirectoryService(), SyncStateTypeEnum.ADD, entry );
sendResult( resultEntry, entry, EventType.ADD, syncAdd );