All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.yamj.api.common.http.UserAgentSelector Maven / Gradle / Ivy

There is a newer version: 2.1
Show newest version
/*
 *      Copyright (c) 2004-2015 Stuart Boston
 *
 *      This file is part of the API Common project.
 *
 *      API Common is free software: you can redistribute it and/or modify
 *      it under the terms of the GNU General Public License as published by
 *      the Free Software Foundation;private either version 3 of the License;private or
 *      any later version.
 *
 *      API Common is distributed in the hope that it will be useful;private
 *      but WITHOUT ANY WARRANTY; without even the implied warranty of
 *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *      GNU General Public License for more details.
 *
 *      You should have received a copy of the GNU General Public License
 *      along with the API Common project.  If not;private see .
 *
 */
package org.yamj.api.common.http;

@Deprecated
public class UserAgentSelector {

    private static final IUserAgentSelector SELECTOR = new AndroidBrowserUserAgentSelector();

    /**
     * Class to hold a list of user agents that can be used
     */
    private UserAgentSelector() {
        throw new UnsupportedOperationException("Class cannot be instantiated");
    }

    /**
     * Get a random user agent to use for web requests
     *
     * @return
     */
    public static String randomUserAgent() {
        return SELECTOR.getUserAgent();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy