public void run()
	{
		// reading the configuration file.
		ConfigurationReader configuration = new ConfigurationReader(_configFile);
		if (!configuration.readConfigurationFile())
		{
			System.out.println("Failed in reading configuration file.");
			return;
		}
		
		_connector = SNConnectorFactory.getConnector(SNConnectorFactory.getConnectorId(configuration.getValue("application", "")));
		if (_connector.configure(configuration))
		{
			if (_connector.connect())
			{
				int numberResults = _connector.query(false);
				List<SNObject> results = new ArrayList<SNObject>();
				while (numberResults > 0)
				{
					results.addAll(_connector.getResults());
					for (SNObject tweet: results)
					{
						_client.sendData(tweet);
					}
					if (_connector.hasNextQuery())
					{
						//numberResults = 0;
						results.clear();
						numberResults = _connector.nextQuery();
					}
					else
					{
						numberResults = 0;
					}
				}
			}
		}
	}