Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 /*
  * Copyright 2012 Jeanfrancois Arcand
  *
  * Licensed under the Apache License, Version 2.0 (the "License"); you may not
  * use this file except in compliance with the License. You may obtain a copy of
  * the License at
  *
  * http://www.apache.org/licenses/LICENSE-2.0
  *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations under
 * the License.
 */
package org.atmosphere.wasync;
Configure the underlying WebSocket/HTTP client.

Author(s):
Jeanfrancois Arcand
public interface Options {
    
The used Transport

Returns:
Transport
    public Transport transport() ;

    
Reconnect after a network failure or when the server close the connection.

Returns:
reconnect
    public boolean reconnect();

    
The delay, in second, before reconnecting.

Returns:
The delay, in second, before reconnecting.
    public int reconnectInSeconds();

    
When using long-polling and the Request, the delay before considering the long-polling connection has been fully processed by the server. If you use the org.atmosphere.wasync.impl.AtmosphereClient, the server will send some handshake so this value is not needed.

Returns:
the delay before considering the long-polling connection has been fully processed
    public long waitBeforeUnlocking();

    
The com.ning.http.client.AsyncHttpClient used to communicate with server.

Returns:
com.ning.http.client.AsyncHttpClient used to communicate with server.
    public AsyncHttpClient runtime();

    
    public void runtime(AsyncHttpClient client);

    
Return true is the com.ning.http.client.AsyncHttpClient is shared between Socket. Default is false. You need to invoke runtime(com.ning.http.client.AsyncHttpClient) to make it shared.

    public boolean runtimeShared();

    
The time, in seconds to wait before closing the connection.

Returns:
The time, in seconds to wait before closing the connection.
    public int requestTimeoutInSeconds() ;
New to GrepCode? Check out our FAQ X