org.yamj.api.common.http.UserAgentSelector Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of api-common Show documentation
Show all versions of api-common Show documentation
Common functions for the APIs used by YAMJ
/*
* 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();
}
}