use of jaxrs.examples.client.custom.ThrottledClient in project jaxrs-api by eclipse-ee4j.
the class SpecExamples method clientBootstrapping.
public void clientBootstrapping() {
// Default client instantiation using default configuration
Client defaultClient = ClientBuilder.newClient();
defaultClient.property("CUSTOM_PROPERTY", "CUSTOM_VALUE");
assert defaultClient != null;
// Default client instantiation using custom configuration
Client defaultConfiguredClient = ClientBuilder.newClient(defaultClient.getConfiguration());
assert defaultConfiguredClient != null;
// /////////////////////////////////////////////////////////
// Custom client instantiation examples
ThrottledClient myClient = new ThrottledClient();
assert myClient != null;
ThrottledClient myConfiguredClient = new ThrottledClient(10);
assert myConfiguredClient != null;
}
use of jaxrs.examples.client.custom.ThrottledClient in project jaxrs-api by eclipse-ee4j.
the class BasicExamples method clientBootstrapping.
@SuppressWarnings("UnusedDeclaration")
public void clientBootstrapping() {
// Default client instantiation using default configuration
Client defaultClient = ClientBuilder.newClient();
assert defaultClient != null;
defaultClient.property("CUSTOM_PROPERTY", "CUSTOM_VALUE");
// Default client instantiation using custom configuration
Client defaultConfiguredClient = ClientBuilder.newClient(defaultClient.getConfiguration());
assert defaultConfiguredClient != null;
// /////////////////////////////////////////////////////////
// Custom client instantiation examples
ThrottledClient myClient = new ThrottledClient();
ThrottledClient myConfiguredClient = new ThrottledClient(10);
}
Aggregations