src/main/java/br/org/soujava/twitter/controller/TwitterConnect.java
public void following(String stringToFind, int maxMgsPerTime, int TimeoutFollowing) throws IOException {

        String twitterUrl = new PropsUtils().getPropertyValueString(Constants.TWITTER_URL, Constants.TWITTER_URL_DEFAULT);

        logger.debug("Start Following, {} twitters, {} seconds url {}", maxMgsPerTime, TimeoutFollowing, twitterUrl + stringToFind);

        GenericUrl url = new GenericUrl(twitterUrl + stringToFind);
        HttpRequest request = httpRequestFactory.buildGetRequest(url);
        HttpResponse httpResponse = request.execute();

        if (httpResponse.getStatusCode() == HttpStatusCodes.STATUS_CODE_OK) {

            processTwitts(httpResponse.getContent(), maxMgsPerTime, TimeoutFollowing, stringToFind);

        } else {
            logger.error("Error following() {} message: {} ", httpResponse.getStatusCode(), httpResponse.getStatusMessage());

        }

        httpResponse.disconnect();
        logger.debug("Following disconnected!");
    }
/**
     * Start Following for X tweets for X seconds
     *
     * @param stringToFind
     * @param maxMgsPerTime
     * @param TimeoutFollowing
     * @throws IOException
     */
Start Following for X tweets for X seconds
@param stringToFind
@param maxMgsPerTime
@param TimeoutFollowing
@throws IOException
Start Following for X tweets for X seconds @param stringToFind @param maxMgsPerTime @param TimeoutFollowing @throws IOException
public void following(String stringToFind, int maxMgsPerTime, int TimeoutFollowing) throws IOException {
        String twitterUrl = new PropsUtils().getPropertyValueString(Constants.TWITTER_URL, Constants.TWITTER_URL_DEFAULT);
        logger.debug("Start Following, {} twitters, {} seconds url {}", maxMgsPerTime, TimeoutFollowing, twitterUrl + stringToFind);
        GenericUrl url = new GenericUrl(twitterUrl + stringToFind);
        HttpRequest request = httpRequestFactory.buildGetRequest(url);
        HttpResponse httpResponse = request.execute();
        if (httpResponse.getStatusCode() == HttpStatusCodes.STATUS_CODE_OK) {
            processTwitts(httpResponse.getContent(), maxMgsPerTime, TimeoutFollowing, stringToFind);
        } else {
            logger.error("Error following() {} message: {} ", httpResponse.getStatusCode(), httpResponse.getStatusMessage());
        }
        httpResponse.disconnect();
        logger.debug("Following disconnected!");
    }
public void following ( String stringToFind , int maxMgsPerTime , int TimeoutFollowing ) throws IOException { String twitterUrl = new PropsUtils ( ) . getPropertyValueString ( Constants . TWITTER_URL , Constants . TWITTER_URL_DEFAULT ) ; logger . debug ( "Start Following, {} twitters, {} seconds url {}" , maxMgsPerTime , TimeoutFollowing , twitterUrl + stringToFind ) ; GenericUrl url = new GenericUrl ( twitterUrl + stringToFind ) ; HttpRequest request = httpRequestFactory . buildGetRequest ( url ) ; HttpResponse httpResponse = request . execute ( ) ; if ( httpResponse . getStatusCode ( ) == HttpStatusCodes . STATUS_CODE_OK ) { processTwitts ( httpResponse . getContent ( ) , maxMgsPerTime , TimeoutFollowing , stringToFind ) ; } else { logger . error ( "Error following() {} message: {} " , httpResponse . getStatusCode ( ) , httpResponse . getStatusMessage ( ) ) ; } httpResponse . disconnect ( ) ; logger . debug ( "Following disconnected!" ) ; }
Start Following for X tweets for X seconds
 @param stringToFind
 @param maxMgsPerTime
 @param TimeoutFollowing
 @throws IOException
Start Following for X tweets for X seconds @param stringToFind @param maxMgsPerTime @param TimeoutFollowing @throws IOException