/** * Initializes a new instance of the <code>CloudQueueClient</code> class using the specified Queue service endpoint * and account credentials. * * @param baseUri * A {@link StorageUri} object that represents the Queue service endpoint used to create the * client. * @param credentials * A {@link StorageCredentials} object that represents the account credentials. */ public CloudQueueClient(final StorageUri baseUri, final StorageCredentials credentials) { super(baseUri, credentials); if (credentials == null || credentials.getClass().equals(StorageCredentialsAnonymous.class)) { throw new IllegalArgumentException(SR.STORAGE_CREDENTIALS_NULL_OR_ANONYMOUS); } QueueRequestOptions.applyDefaults(this.defaultRequestOptions); }
/** * Initializes a new instance of the <code>CloudQueueClient</code> class using the specified Queue service endpoint * and account credentials. * * @param baseUri * A {@link StorageUri} object that represents the Queue service endpoint used to create the * client. * @param credentials * A {@link StorageCredentials} object that represents the account credentials. */ public CloudQueueClient(final StorageUri baseUri, final StorageCredentials credentials) { super(baseUri, credentials); if (credentials == null || credentials.getClass().equals(StorageCredentialsAnonymous.class)) { throw new IllegalArgumentException(SR.STORAGE_CREDENTIALS_NULL_OR_ANONYMOUS); } QueueRequestOptions.applyDefaults(this.defaultRequestOptions); }
/** * Populates the default timeout and retry policy from client if they are not set. * * @param options * The input options to copy from when applying defaults * @param client * The {@link CloudQueueClient} service client to populate the * default values from. */ protected static final QueueRequestOptions populateAndApplyDefaults(QueueRequestOptions options, final CloudQueueClient client) { QueueRequestOptions modifiedOptions = new QueueRequestOptions(options); QueueRequestOptions.populateRequestOptions(modifiedOptions, client.getDefaultRequestOptions()); QueueRequestOptions.applyDefaults(modifiedOptions); return modifiedOptions; }
/** * Populates the default timeout and retry policy from client if they are not set. * * @param options * The input options to copy from when applying defaults * @param client * The {@link CloudQueueClient} service client to populate the * default values from. */ protected static final QueueRequestOptions populateAndApplyDefaults(QueueRequestOptions options, final CloudQueueClient client) { QueueRequestOptions modifiedOptions = new QueueRequestOptions(options); RequestOptions.populateRequestOptions(modifiedOptions, client.getDefaultRequestOptions(), true /* setStartTime */); QueueRequestOptions.applyDefaults(modifiedOptions); return modifiedOptions; }