
In this latest release full failover and reconnection support has been added. Using the new connect method, its now possible to configure 100% of the failover and reconnection options available in StreamHub. For example:
StreamHubGWTAdapter streamhub = new StreamHubGWTAdapter();
List servers = new ArrayList();
servers.add("https://push1.stream-hub.com/");
servers.add("https://push2.stream-hub.com/");
servers.add("https://push3.stream-hub.com/");
FailoverParameters failoverParameters = new FailoverParameters(servers);
failoverParameters.setAlgorithm(FailoverAlgorithm.PRIORITY);
failoverParameters.setInitialReconnectDelayMillis(2000);
failoverParameters.setMaxReconnectDelayMillis(30000);
failoverParameters.setUseExponentialBackOff(true);
failoverParameters.setBackOffMultiplier(2.0);
failoverParameters.setMaxReconnectAttempts(20);
streamhub.connect(failoverParameters);
For full details of the API, you can browse the Javadoc online or checkout the projects homepage on Google Code.