org.terracotta.express
Class ClientFactory

java.lang.Object
  extended by org.terracotta.express.ClientFactory

public class ClientFactory
extends Object

A static factory for Terracotta client instances.


Constructor Summary
ClientFactory()
           
 
Method Summary
static Client getOrCreateClient(String tcConfig, boolean isUrl, Class[] moduleIntrospectionSources)
          Get or create a client instance using the given configuration.
 
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

getOrCreateClient

public static Client getOrCreateClient(String tcConfig,
                                       boolean isUrl,
                                       Class[] moduleIntrospectionSources)
Get or create a client instance using the given configuration.

The code sources for the supplied classes, are inspected for the presence of any integration modules that should be loaded in to the client.

Parameters:
tcConfig - terracotta configuration
isUrl - true if the configuration is a server URL.
moduleIntrospectionSources - classes to inspect for embedded modules
Returns:
a new or possibly shared client instance


Copyright © 2015 Terracotta, Inc.. All Rights Reserved.