public static HttpWorkerAbstract getWorkerStrategy(final String requestMethod, final HttpClient client) {

        if (requestMethod.equals(HEAD)) {
            return new HttpWorkerHead(client);
        } else if (requestMethod.equals(GET)) {
            return new HttpWorkerGet(client);
        } else if (requestMethod.equals(POST)) {
            return new HttpWorkerPost(client);
        } else if (requestMethod.equals(PUT)) {
            return new HttpWorkerPut(client);
        } else if (requestMethod.equals(DELETE)) {
            return new HttpWorkerDelete(client);
        }

        return new HttpWorkerGet(client);
    }
public static HttpWorkerAbstract getWorkerStrategy ( final String requestMethod , final HttpClient client ) { if ( requestMethod . equals ( HEAD ) ) { return new HttpWorkerHead ( client ) ; } else if ( requestMethod . equals ( GET ) ) { return new HttpWorkerGet ( client ) ; } else if ( requestMethod . equals ( POST ) ) { return new HttpWorkerPost ( client ) ; } else if ( requestMethod . equals ( PUT ) ) { return new HttpWorkerPut ( client ) ; } else if ( requestMethod . equals ( DELETE ) ) { return new HttpWorkerDelete ( client ) ; } return new HttpWorkerGet ( client ) ; }
Returns an instance of a HTTP Worker based on the request method

@param requestMethod One of GET, PUT, POST, DELETE, HEAD
@param client
@return