javax.ws.rs.client
Class ClientFactory

java.lang.Object
  extended by javax.ws.rs.client.ClientFactory

public class ClientFactory
extends java.lang.Object

Main entry point to the client API used to bootstrap Client instances.

Since:
2.0
Author:
Marek Potociar

Field Summary
static java.lang.String JAXRS_DEFAULT_CLIENT_BUILDER_FACTORY_PROPERTY
          Name of the property identifying the RuntimeDelegate implementation to be returned from RuntimeDelegate.getInstance().
 
Constructor Summary
ClientFactory()
           
 
Method Summary
static Client newClient()
          Create new client instance using the default client builder factory provided by the JAX-RS implementation provider.
static Client newClient(Configuration configuration)
          Create new configured client instance using the default client builder factory provided by the JAX-RS implementation provider.
static
<B extends Client.Builder>
B
newClientBy(java.lang.Class<? extends ClientBuilderFactory<B>> builderFactoryClass)
          Create client instance using a custom client builder factory.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

JAXRS_DEFAULT_CLIENT_BUILDER_FACTORY_PROPERTY

public static final java.lang.String JAXRS_DEFAULT_CLIENT_BUILDER_FACTORY_PROPERTY
Name of the property identifying the RuntimeDelegate implementation to be returned from RuntimeDelegate.getInstance().

See Also:
Constant Field Values
Constructor Detail

ClientFactory

public ClientFactory()
Method Detail

newClientBy

public static <B extends Client.Builder> B newClientBy(java.lang.Class<? extends ClientBuilderFactory<B>> builderFactoryClass)
Create client instance using a custom client builder factory.

Type Parameters:
B - client builder type.
Parameters:
builderFactoryClass - client builder factory class.
Returns:
client builder produced by the provided client builder factory,

newClient

public static Client newClient()
Create new client instance using the default client builder factory provided by the JAX-RS implementation provider.

Returns:
new client instance.

newClient

public static Client newClient(Configuration configuration)
Create new configured client instance using the default client builder factory provided by the JAX-RS implementation provider.

Parameters:
configuration - data used to provide initial configuration for the new client instance.
Returns:
new configured client instance.


Copyright © 2007-2012 Oracle Corporation. All Rights Reserved. Use is subject to license terms.