Skip to content

Commit

Permalink
Merge pull request #26 from WURFL/develop
Browse files Browse the repository at this point in the history
1.0.15
  • Loading branch information
andreacastello authored Jun 8, 2021
2 parents 578d36a + 095632b commit b9fa830
Show file tree
Hide file tree
Showing 12 changed files with 52 additions and 55 deletions.
19 changes: 8 additions & 11 deletions code/client-java.iml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_5">
<component name="CheckStyle-IDEA-Module">
<option name="configuration">
<map />
</option>
</component>
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_7">
<output url="file://$MODULE_DIR$/target/classes" />
<output-test url="file://$MODULE_DIR$/target/test-classes" />
<content url="file://$MODULE_DIR$">
Expand All @@ -12,20 +17,12 @@
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" scope="TEST" name="Maven: org.testng:testng:6.9.8" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: com.beust:jcommander:1.48" level="project" />
<orderEntry type="library" name="Maven: com.jsoniter:jsoniter:0.9.23" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.testng:testng:6.9.8" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: com.beust:jcommander:1.48" level="project" />
<orderEntry type="library" name="Maven: com.jsoniter:jsoniter:0.9.23" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.testng:testng:6.9.8" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: com.beust:jcommander:1.48" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: javax.servlet:servlet-api:2.4" level="project" />
<orderEntry type="library" name="Maven: net.sf.ehcache:ehcache-core:2.5.1" level="project" />
<orderEntry type="library" name="Maven: com.jsoniter:jsoniter:0.9.23" level="project" />
<orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.6.4" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: ch.qos.logback:logback-core:1.0.0" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: ch.qos.logback:logback-classic:1.0.0" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: ch.qos.logback:logback-core:1.2.0" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: ch.qos.logback:logback-classic:1.2.0" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.testng:testng:6.9.8" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.beanshell:bsh:2.0b4" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: com.beust:jcommander:1.48" level="project" />
Expand Down
6 changes: 4 additions & 2 deletions code/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.scientiamobile.wurflcloud</groupId>
<artifactId>client-java</artifactId>
<version>1.0.14</version>
<version>1.0.15</version>
<packaging>jar</packaging>

<name>wurfl-cloud-client</name>
Expand Down Expand Up @@ -62,6 +62,8 @@
<logback.version>1.2.0</logback.version>
<slf4j.version>1.6.4</slf4j.version>
<jackson.version>2.10.2</jackson.version>
<maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.7</maven.compiler.target>
</properties>

<!-- Dependencies -->
Expand Down Expand Up @@ -280,7 +282,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.0.2</version>
<version>3.8.1</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
Expand Down
26 changes: 12 additions & 14 deletions code/src/main/java/com/scientiamobile/wurflcloud/CloudClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,6 @@ public class CloudClient extends Loggable implements ICloudClientRequest, Consta

/**
* The HTTP Headers that will be used to query the WURFL Cloud Server in Map<String, String> format.
*
* @var array
*/
private final Map<String, String> reqHeaders = new LinkedHashMap<String, String>();

Expand Down Expand Up @@ -100,14 +98,14 @@ public class CloudClient extends Loggable implements ICloudClientRequest, Consta
/**
* Construct a new CloudClient object
*
* @param request
* @param response
* @param cfg
* @param searchCapabilities
* @param credentials
* @param cache
* @param recoveryManager
* @param clientManager
* @param request the HTTP servlet request object
* @param response HTTP servlet response object
* @param cfg cloud clinet configuration
* @param searchCapabilities list of capabilities to get
* @param credentials wurfl cloud credentials
* @param cache cache implementation
* @param clientManager cloud client manager
* @param proxy proxy to use for connections
*/
protected CloudClient(HttpServletRequest request, HttpServletResponse response, CloudClientConfig cfg, String[] searchCapabilities, Credentials credentials, IWurflCloudCache cache, CloudClientManager clientManager, Proxy proxy) {
this.response = response;
Expand Down Expand Up @@ -455,7 +453,7 @@ public Object queryCloudForCapability(String capabilityName, AbstractDevice devi
* Queries cache, then cloud.
* If cloud is not available, tries a recovery answer.
*
* @return
* @return an AbstractDevice implementation
* @throws IOException
*/
protected AbstractDevice detectDevice() throws IOException {
Expand Down Expand Up @@ -549,9 +547,9 @@ private long updateListeners(CloudResponse cloudResponse) {
/**
* Reads response from cloud.
*
* @param connection
* @return
* @throws IOException
* @param connection the HTTP connection object
* @return the content from cloud response
* @throws IOException in case of connection issues
*/
private String processContent(URLConnection connection) throws IOException {
final char[] buffer = new char[0x10000];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public class CloudClientLoader extends Loggable implements Constants, Serializab

/**
* Constructs a CloudClientLoader by reading all the configuration properties (including the API Key) from the configuration file.
* @throws Exception
* @throws Exception if any error loading cloud configuration occurs
*/
public CloudClientLoader() throws Exception {
this (null, null, null);
Expand All @@ -53,7 +53,7 @@ public CloudClientLoader() throws Exception {
/**
* Constructs a CloudClientLoader with proxy configuration represented by a {@link Proxy} object
* @param apiKey required key for Cloud Client use.
* @throws Exception
* @throws Exception if any error loading cloud configuration occurs
*/
public CloudClientLoader(String apiKey) throws Exception {
this(apiKey, null, null);
Expand All @@ -64,8 +64,8 @@ public CloudClientLoader(String apiKey) throws Exception {
* @param apiKey the API key
* @param proxyIp the proxy IP
* @param proxyPort the proxy port
* @param proxyType the {@link Proxy.Type} representing the proxy protocol
* @throws Exception
* @param proxyType the {Proxy.Type representing the proxy protocol
* @throws Exception if any error loading cloud configuration occurs
*/
public CloudClientLoader(String apiKey, String proxyIp, int proxyPort, Proxy.Type proxyType) throws Exception {
this(apiKey, new Proxy(proxyType, new InetSocketAddress(proxyIp, proxyPort)));
Expand All @@ -75,17 +75,17 @@ public CloudClientLoader(String apiKey, String proxyIp, int proxyPort, Proxy.Typ
* Constructs a CloudClientLoader with proxy configuration
* @param proxyIp the proxy IP
* @param proxyPort the proxy port
* @param proxyType the {@link Proxy.Type} representing the proxy protocol
* @throws Exception
* @param proxyType the Proxy.Type representing the proxy protocol
* @throws Exception if any error loading cloud configuration occurs
*/
public CloudClientLoader(String proxyIp, int proxyPort, Proxy.Type proxyType) throws Exception {
this(null, new Proxy(proxyType, new InetSocketAddress(proxyIp, proxyPort)));
}

/**
* Constructs a CloudClientLoader without specific proxy configuration
* @param the {@link Proxy} to be used to connect to cloud server
* @throws Exception
* @param proxy Proxy class to be used to connect to cloud server
* @throws Exception if any error loading cloud configuration occurs
*/
public CloudClientLoader(Proxy proxy) throws Exception {
this(null, null, proxy);
Expand All @@ -94,8 +94,8 @@ public CloudClientLoader(Proxy proxy) throws Exception {
/**
* Constructs a CloudClientLoader without specific proxy configuration
* @param apiKey required key for Cloud Client use.
* @param the {@link Proxy} to be used to connect to cloud server
* @throws Exception
* @param proxy Proxy class to be used to connect to cloud server
* @throws Exception if any error loading cloud configuration occurs
*/
public CloudClientLoader(String apiKey, Proxy proxy) throws Exception {
this(apiKey, null, proxy);
Expand All @@ -104,8 +104,8 @@ public CloudClientLoader(String apiKey, Proxy proxy) throws Exception {
/**
* Constructs a CloudClientLoader with proxy configuration represented by a {@link Proxy} object
* @param apiKey required key for Cloud Client use.
* @param the .properties file path to be used
* @throws Exception
* @param propertiesFile .properties file path to be used
* @throws Exception if any error loading cloud configuration occurs
*/
public CloudClientLoader(String apiKey, String propertiesFile) throws Exception {
this(apiKey, propertiesFile, null);
Expand All @@ -114,11 +114,11 @@ public CloudClientLoader(String apiKey, String propertiesFile) throws Exception
/**
* Constructs a CloudClientLoader with proxy configuration
* @param apiKey the API key
* @param the .properties file path to be used
* @param propertiesFile the .properties file path to be used
* @param proxyIp the proxy IP
* @param proxyPort the proxy port
* @param proxyType the {@link Proxy.Type} representing the proxy protocol
* @throws Exception
* @param proxyType the Proxy.Type representing the proxy protocol
* @throws Exception if any error loading cloud configuration occurs
*/
public CloudClientLoader(String apiKey, String propertiesFile, String proxyIp, int proxyPort, Proxy.Type proxyType) throws Exception {
this(apiKey, propertiesFile, new Proxy(proxyType, new InetSocketAddress(proxyIp, proxyPort)));
Expand All @@ -127,9 +127,9 @@ public CloudClientLoader(String apiKey, String propertiesFile, String proxyIp, i
/**
* Constructs a CloudClientLoader without specific proxy configuration
* @param apiKey required key for Cloud Client use.
* @param the .properties file path to be used
* @param the {@link Proxy} to be used to connect to cloud server
* @throws Exception
* @param propertiesFile the .properties file path to be used
* @param proxy the Proxy class to be used to connect to cloud server
* @throws Exception if any error loading cloud configuration occurs
*/
public CloudClientLoader(String apiKey, String propertiesFile, Proxy proxy) throws Exception {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
public interface CloudListener {

/**
* Tells the listener when a specific {@link CloudEvent} has been raised.
* @param {@link CloudEvent} The raised CloudEvent
* Tells the listener when a specific CloudEvent has been raised.
* @param evt CloudEvent The raised CloudEvent
*
*/
void processEvent(CloudEvent evt);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import java.util.Map;

/**
* Cache implementation using Java {@linkplain http://ehcache.org/} Ehcache implementation.
* Cache implementation using Java Ehcache implementation (http://www.ehcache.org/).
*/
public class EhcachePremiumCloudCache extends AbstractUseragentWurflCloudCache {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public interface IWurflCloudCache extends Constants {

/**
* Sets the last loaded WURFL timestamp in the cache provider
* @see IWurflCloudCache.getMtime()
* @link IWurflCloudCache.#getMtime()
*
* @param server_mtime The new time to set
* @return True if the new time was set successfully, false otherwise
Expand All @@ -74,7 +74,7 @@ public interface IWurflCloudCache extends Constants {
/**
* Clears the cache provider
*
* @return True if the purge succeded, false otherwise
* @return True if the purge succeeded, false otherwise
*/
public boolean purge();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public AbstractDevice getDeviceFromID(String key) {
* @param response
* @param key
* @param device
* @return
* @return true if device has been set properly, false if any error occurred
*/
public boolean setDevice(HttpServletResponse response, String key, AbstractDevice device) {
String cookieVal;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public String getId() {

/**
* Gets the response type.
* @see {@link ResponseType}
* @see ResponseType
*
* Possible values are:
* - cache: from local cache
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public class CacheDevice extends AbstractDevice {

/**
* Builds an AbstractDevice object using "cache" as response type.
* @param d The device to use
* @param device The device to use
*/
public CacheDevice(AbstractDevice device) {
super(device.getCapabilities(), ResponseType.cache, device.getId(), device.getErrors());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public interface Constants {
/**
* The version of this client
*/
String CLIENT_VERSION = "1.0.14";
String CLIENT_VERSION = "1.0.15";

/**
* Accepted encoding enum.
Expand Down
2 changes: 1 addition & 1 deletion examples/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>com.scientiamobile.wurflcloud</groupId>
<artifactId>client-example</artifactId>
<version>1.0.14</version>
<version>1.0.15</version>
<packaging>war</packaging>

<name>WURFL Cloud Client example webapp</name>
Expand Down

0 comments on commit b9fa830

Please sign in to comment.