javax.ws.rs.client
Class ClientFactory

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

public abstract class ClientFactory
extends Object

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

Since:
2.0
Author:
Marek Potociar

Field Summary
static String JAXRS_DEFAULT_CLIENT_FACTORY_PROPERTY
          Name of the property identifying the RuntimeDelegate implementation to be returned from RuntimeDelegate.getInstance().
 
Constructor Summary
protected ClientFactory()
          Allows custom implementations to extend the ClientFactory class.
 
Method Summary
protected abstract  Client getClient()
          Get a new client instance.
protected abstract  Client getClient(Configuration configuration)
          Get a new pre-configured client instance.
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

JAXRS_DEFAULT_CLIENT_FACTORY_PROPERTY

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

See Also:
Constant Field Values
Constructor Detail

ClientFactory

protected ClientFactory()
Allows custom implementations to extend the ClientFactory class.

Method Detail

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.

getClient

protected abstract Client getClient()
Get a new client instance.

Returns:
a new client instance.

getClient

protected abstract Client getClient(Configuration configuration)
Get a new pre-configured client instance.

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


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