org.atmosphere.wasync
Class ClientFactory

java.lang.Object
  extended by org.atmosphere.wasync.ClientFactory

public class ClientFactory
extends Object

Create a Client. By default, the DefaultClient will be returned. To override the DefaultClient, just specify the provider using the -Dwasync.client property.

Author:
Jeanfrancois Arcand

Constructor Summary
ClientFactory()
           
 
Method Summary
static ClientFactory getDefault()
          Return the default Factory.
 Client newClient()
          Return a new Client instance
<T extends Client>
T
newClient(Class<? extends Client> clientClass)
          Return a new Client instance
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClientFactory

public ClientFactory()
Method Detail

getDefault

public static final ClientFactory getDefault()
Return the default Factory.

Returns:
this

newClient

public Client newClient()
Return a new Client instance

Returns:
a new Client instance

newClient

public <T extends Client> T newClient(Class<? extends Client> clientClass)
Return a new Client instance

Parameters:
clientClass - the runtime instance class of Client instance that is returned
Returns:
a new Client instance


Copyright © 2013. All Rights Reserved.